• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Are there cross-platform issues with developing Android web apps?

 
Ranch Hand
Posts: 90
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recently read a blog post by Joe Bowser (one of the PhoneGap maintainers) from January 14, 2011, that was titled Android: Your JS Engine is not always V8. I found it interesting because I was under the impression that the WebKit implementation and Javascript engine that are behind WebView would be standard across Android devices running the same Android API level.

Damon and/or Sébastien: In your experience developing Android web apps, have you ever encountered cross-platform issues, either as a result of different API levels or different builds of WebKit?
 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for sharing the link!
 
author
Posts: 33
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are some minor difference between the webkit engine depending the API version you are using (1.5, 2.1, 2.2) but the code shown is the book is cross-api compatible, there some exceptions but which are explained in notes.
 
author
Posts: 23
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Daniel,

I've absolutely encountered differences, both in terms of Javascript performance and the nuances around how particular aspects of an application or library behave. I would say that in the book, most of what we do in the book stays within the "safe bounds" of cross-device mobile web app development, but certainly in my own experience developing a cross-platform HTML5 mapping library I have found quite a few things.

In the book itself, Chapter 7 works through some samples using the HTML5 Canvas and touch events, and both of these are those will probably cause you the most pain as you strive for a cross-platform (which includes dealing with the differences within Android itself) mobile web app solution. In many ways though, you are still better off going this way than developing a purely native application as with the web approach you end up having to tailor and tweak 20% of your code for a specific platform, whereas a native app would probably require a ground up build to target different devices.

I have to say I understand what Joe is saying when he makes this comment in his closing remarks (with reference to a bug that is present in the Android 2.3 SDK):

This is a REALLY bad thing, since it makes web development on Android even more frustrating, and will chase developers away from that platform.



I genuinely hope that this doesn't happen, but it's a genuine risk. The good news is that if you target Android first in your mobile web app development process, then the other platforms actually almost "just work".

Cheers,
Damon.

 
reply
    Bookmark Topic Watch Topic
  • New Topic