I've started working on the Android version for my young letters application.
Because I'm working with phonegap, I was quite sure that Android porting would work seamlessly, and boy was I wrong...
Getting started was easy. Download Eclipse, Android plugin and SDKs, define the project and setup the phonegap plugin was quick and painless.
However, my code didn't work.
First off, the newest version of phonegap (2.0.0) has some bugs. Seems like after the major overhaul from 1.x, several things (Like playing sound...) were left undone. So I've decided to revert to the same phonegap version I'm using in iOS (1.8.1), which solved the problem.
Some code issues, like resource file paths (Base path on android is different) and HTML5 canvas behaving differently than iOS webview were solved.
Orientation handling is also different than iOS: With Android, it's harder to define orientation changes behaviours (Young Letters is only landscape, for now). In iOS it's a breeze, just select the supported orientations, and you're good to go.
And then I was left with one major issue, which I'm handling now: The variety of android devices and viewports. With iOS, there's only one variation of a screen. The width/ height ratios stay the same between iPhone versions (iPhone 5 supports that ratio as well by framing the extra inch), but with android devices, you have to implement an adaptive HTML view.
Though it was solved in the native environment, the major lesson I've learned was to use percentages and dynamic placements of buttons, rather than set layout (Like I'm doing on iOS).
Then I need to test it with several devices, and see that it works.
Finally there's the whole publishing process in the Google Play store, but we'll get to that once the app is ready!
No comments:
Post a Comment