I've read about phonegap which enables users to write web-based apps for android and i was wondering:
i'm planning to write an app which uses google maps service+gps, database access and such, and i'm afraid it's not really possible with phonegap.
thx
I am building an application with Google maps, GPS and uses a back-end Service/Database. I have chosen to use
Having almost finished, I can say that this type of app certainly is do-able with this stack of technologies and the whole cross/platform aspect of it is fantastic. However it has not been particularly easy. In particular, you need to watch out for ...
Phonegap uses file:// based URLs so all kinds of problems with browser 'security' and cross site scripting messing up your Ajax and cookie code. I got around this by using JSONP but it did stop me from using some cool stuff that would otherwise have been possible like SocketIO.
debugging your JavaScript within the browser, within the Phonegap container, within the emulator... is virtually impossible. I got around this by doing most of my debugging on Firefox with Firebug and then using alert('blah') for any issues that popped up only when deployed.
Google Maps hosted inside HTML will only work while connected to the internet, this meant that debugging while mobile (i do a lot of coding while commuting) was a pain. I needed to find reliable mobile internet, no biggie, its cool anyway but, it was something extra.
Google maps InfoView windows suck suck suck. I eventually gave up and pop any necessary dialogs from the map as JQuery Mobile pages.
Hope this helps somebody ;)
The performance of PhoneGap apps is good, but it largely depends on exactly what you are doing (for example animations probably perform better native).
If you are only building it on one platform it might be best to go native since there is going to be a learning curve with both PhoneGap and native Android development. It may also be easier to go native since you are using maps a lot.
I would avoid Phonegap at all costs. I've been working on a project with Phonegap, and we had lots of problems with it. In the end, we turned to coding in native languages (java/objective c/java me).
Maybe something changed in the meanwhile, but at that time (Q2 of 2010) Phonegap was really OK only for iPhone. Android API didn't have half the features documented on their site, and even those features were stuffed with bugs. For instance, their Contacts API had a huge blocker - used some non-existing javascript object. It seemed as if they just copy/pasted the code from iPhone API and didn't even care to check if it worked. I was really disappointed with Phonegap - we couldn't use database, we couldn't get contacts, documentation was false....
One more thing I hated about doing an HTML app for Android was the lack of libraries with native looking Android GUI. Almost all the JS GUI libraries were focused on iPhone, and replicating the iPhone GUI. A few of those that advertized to have support for Android had such a bad components design that they were useless.
Again, these are my experiences from 6 months ago. I hope some things changed in the meanwhile, but I'm sure I won't be using HTML for mobile apps/android any time soon.
The good thing about phonegap
is that it enables you to build cross-platform mobile apps.
If you are doing just android
, I guess it doesn't make sense.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With