Exploiting Maemo


Published on

Slides of my talk at the Maemo Summit 2008 held in Berlin

Published in: Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Exploiting Maemo

  1. 1. On porting application to the Maemo platform Aniello Del Sorbo University of Salerno, Italy
  2. 2. Maemo.org Documentation <ul><li>You will find many of the information I will talk about, in the &quot;Porting Software&quot; HOW-TO: </li></ul><ul><li>http://maemo.org/maemo_release_documentation/maemo4.1.x/node13.html </li></ul><ul><li>that is part of the &quot; Maemo Diablo 4.1 release documentation &quot; </li></ul><ul><li>http://maemo.org/maemo_release_documentation/maemo4.1.x/ </li></ul>
  3. 3. Command Line (CLI) Programs <ul><ul><li>In most cases it is just as simple as recompiling it </li></ul></ul><ul><ul><li>The difficult task is to package it according to the Debain package rules (I won't cover this in this session) </li></ul></ul>
  4. 4. Graphical Applications (GTK ones) <ul><ul><li>It's where the fun is </li></ul></ul><ul><ul><li>It's easier if you get the sources from the Debian repository: </li></ul></ul><ul><ul><li>as you will need much less work in packaging it </li></ul></ul><ul><ul><li>this holds when porting CLI programs, too </li></ul></ul>
  5. 5. Things to consider <ul><li>A very important aspect about porting an application to a Maemo device is to keep in mind the key features (and drawbacks) of the device itself either from the hardware point of view and from the software one: </li></ul><ul><ul><li>hardware limitations/improvements: </li></ul></ul><ul><ul><li>size, touchscreen, input methods, CPU, RAM, disk storage, ... </li></ul></ul><ul><ul><li>software limitations/improvements: </li></ul></ul><ul><ul><li>missing modules, missing kernel features, limited set of features, brand new features, ... </li></ul></ul><ul><li>We'll try to talk about this stuff during this session </li></ul>
  6. 6. Example application <ul><ul><li>I will use my experience in porting Xournal to sometime show how the intrinsic hardware and software capabilities of a Maemo device could be best deployed while porting a desktop application to it </li></ul></ul><ul><ul><li>Of course all the things we'll talk about could (and should) be used when developing a brand new application targeted to the Maemo platform </li></ul></ul>
  7. 7. The impact of the hardware    <ul><li>a Maemo device is usually quite different from a desktop PC </li></ul><ul><ul><li>it has a much smaller screen resolution </li></ul></ul><ul><ul><li>it has much less CPU power </li></ul></ul><ul><ul><li>it has much less memory </li></ul></ul><ul><ul><li>it has much less battery juice </li></ul></ul><ul><ul><li>it has limited input methods (touchscreen & small keyboard compared to a full blown keyboard and a regular mouse) </li></ul></ul><ul><ul><li>you name it.. </li></ul></ul><ul><li>Thus, try to keep in mind the hardware limitations of the device the Maemo platform runs or will run on. </li></ul><ul><li>Do not forget that sometimes the hardware differences can be turned to advantages instead of being a limitation: </li></ul><ul><ul><li>touchscreen and pressure sensitivity, for example </li></ul></ul>
  8. 8. Example <ul><li>The Xournal port has a patch specifically made to take advantage of the pressure sensitivity feature available on the latest Maemo devices. </li></ul><ul><li>Users can enable or disable it at will. </li></ul><ul><li>This simple patch made Xournal appealing not only to note-takers, but also to drawers who much appreciated the possibility to draw thin lines with light touches of the stylus on the screen </li></ul>
  9. 9. The impact of the hardware <ul><li>One of the main issues when porting a desktop application to Maemo is the screen resolution. </li></ul><ul><li>Although it is quite a big screen, compared to other handheld devices, it is really small compared to desktop LCDs. </li></ul><ul><li>This has a huge impact on the application’s UI. </li></ul><ul><li>In most cases you have to consider writing a brand new UI from scratch. </li></ul><ul><li>Usually desktop applications deploy a wide variety of icons, buttons and toolbars to give the user instant access to the tools they need. </li></ul><ul><li>On Maemo you've got ONE toolbar at a time, short length menus and a few other limitations. </li></ul>
  10. 10. The impact of the hardware <ul><li>Another issue comes from the input methods. </li></ul><ul><li>For example, many desktop applications rely on the &quot;mouseOver&quot; feature to let graphical widget appear when the mouse is over a particular area of the screen (menus, toolbars, pop-up balloons and as such). </li></ul><ul><li>Stylus and touchscreen do not provide such a feature, thus when porting your app, you will need to take this into account. </li></ul><ul><li>But you can exploit them and turn them in nice additional features: </li></ul><ul><li>the touchscreen sensitivity, for example. </li></ul><ul><li>It can detect if you're touching the screen with the stylus of with a finger. </li></ul><ul><li>You can use this information to draw widgets on the screen when the user is touching it with the finger and make them disappear when he starts using the stylus again (or the other way around). </li></ul>
  11. 11. Example <ul><li>One of the next version of Xournal will do exactly this: </li></ul><ul><li>as soon as it detects the stylus it will hide the toolbar to bring it back later when it detects a finger touch. </li></ul><ul><li>This will allow me to draw, on the small screen, much more widgets than the regular hildon toolbar would permit. </li></ul>
  12. 12. The impact of the hardware <ul><li>Do not forget about: </li></ul><ul><ul><li>power management: the Maemo platform provides meanings to let your application better understand the context its running in so to better adapt its way of using the device limited resources </li></ul></ul><ul><ul><li>CPU power: this is limited and power hungry. The less you use, the better. The more responsive the application is, the better is the user experience. </li></ul></ul>
  13. 13. The software side <ul><li>When porting your application to the Maemo platform do remember about its Hildonization. </li></ul><ul><li>The Maemo platform provides you several new widgets to help make your application look like a native one: </li></ul><ul><ul><li>HildonWindow </li></ul></ul><ul><ul><li>HildonProgram </li></ul></ul><ul><ul><li>HildonColorButton </li></ul></ul><ul><ul><li>HildonColorChooser </li></ul></ul><ul><ul><li>HildonControlbar </li></ul></ul><ul><ul><li>HildonVolumebar </li></ul></ul><ul><ul><li>HildonCalendarPopup </li></ul></ul><ul><ul><li>HildonWeekdayPicker </li></ul></ul><ul><ul><li>HildonTimePicker </li></ul></ul><ul><ul><li>HildonBanner </li></ul></ul><ul><ul><li>HildonFileChooserDialog,.... </li></ul></ul><ul><li>This is the most boring part, go thru the code and make the </li></ul><ul><li>necessary modifications, the reward is that your application WILL look much better on the Maemo device. </li></ul>
  14. 14. Maemo platform specific features <ul><li>The Maemo platform do provide the developer with some nice features that your application could deploy (and that usually are not available on a desktop): </li></ul><ul><ul><li>state saving and background killing applications: you register your state_save and state_load callback functions. They will handle OSSO state saving messages (usually sent in response to hardware state changes like turning off a device) </li></ul></ul><ul><ul><li>network change events </li></ul></ul><ul><ul><li>The better you integrate this system notifications, the better will be the user experience (again, that’s what matters) </li></ul></ul>