start writing applications - how?

Thomas Wood thomas at
Thu Nov 15 22:16:31 CET 2007

On Thu, 2007-11-15 at 19:37 +0100, Andreas Jellinghaus wrote:
> Thomas Wood wrote:
> > A simple hello world tutorial is available on the wiki:
> >
> That one needs an openmoko build system, and to create one you need many
> hours and gigabytes of free disk space. maybe not the preferred way for
> a new comer?
> I wrote up what I learned, and with ~15 minutes (flashing included) I had a
> python hello world on my moko:
> but of course writing in C has certain advantages, so the link Thomas
> posted is valid and the investment in a local openmoko build system might
> be worth your time.

Yes, I agree the cross compiling does require a local OpenMoko build,
and that can take some time to set up and get running. Personally, I
develop my applications on x86 first and then only when I have something
that is near completion do I test it on the phone. Using Xephyr and
installing the OpenMoko theme locally is a quick way of testing
applications on the desktop. Of course, this applies to applications
written in any language as well.

> > To be honest, it isn't that hard to write programs in C. C is a really
> > simple language. The only tricky bit in this case is cross compiling.
> > 
> > If you really don't want to write applications in C, then I suspect
> > Python will be the next best supported language.
> I agree. but while I don't know what my application will look like at the
> end, creating some prototype and example code is much faster done in
> python. Later I can rewrite some or all parts in C.

Yes, python is an excellent language for prototyping and you can still
test your applications on the desktop as well.

> > Common sense applies most of the time. Don't make your application wake
> > up excessively (e.g. avoid polling anything). Only keep in memory what
> > you need, unless you are likely to need it quickly. Basically, if you
> > apply good general programming techniques and practises, you probably
> > won't run into any problems.
> still it would be good to have some examples of nice working application
> designs for mobile phones. for example in the android video I saw they
> require each gui app to save the state with some system daemon when it is
> not on top and the system daemon can kill it whenever it wants.
> I wonder if a similar design would be nice for moko? what is the current
> strategy? hope not to run out of memory, and if we do the linux oom handler
> does it job (we hope it kills the right app)?

As far as I know, there is know OOM policy for OpenMoko yet. In fact,
there are (as yet) very few system wide policies yet. The only example I
can think of right now is that it was decided that single instance
applications should use use the Matchbox single instance handling rather
than implementing it themselves. Perhaps it would be a good idea to
start a page on the wiki were we can discuss system policies.

> > Well, a lot of people are excited about the project, but most of them
> > don't have the time to contribute anything more useful than the
> > occasional e-mail on the community mailing list. :-)
> still that is very welcome. I now found out how easy it is to get started
> with python and gtk, so I hope I can create some app too :)

Good to hear!



OpenedHand Ltd.

Unit R Homesdale Business Center / 216-218 Homesdale Road /
Bromley / BR1 2QZ / UK             Tel: +44 (0)20 8819 6559

Expert Open Source For Consumer Devices -

More information about the openmoko-apps mailing list