File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Does Pro Android Web Apps cover how to expose native functionality to the JS runtime? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Does Pro Android Web Apps cover how to expose native functionality to the JS runtime?" Watch "Does Pro Android Web Apps cover how to expose native functionality to the JS runtime?" New topic
Author

Does Pro Android Web Apps cover how to expose native functionality to the JS runtime?

Daniel Trebbien
Ranch Hand

Joined: Jul 10, 2007
Posts: 57
If PhoneGap does not expose a native feature that I wish to use in a web app, does Pro Android Web Apps cover how I could go about exposing this "extra" native functionality to the JS engine?
Sebastien Blanc
author
Ranch Hand

Joined: Nov 18, 2004
Posts: 33
Yes there is entire chapter on PhoneGap, how to install, to get it run and off course getting benefit of the extra lib that are exposed through JS (camera, vribrate etc ...)


Sebastien Blanc
Pro Android Web Apps: Developing HTML5, JavaScript, CSS, and Chrome OS Web Apps
Damon Oehlman
author
Greenhorn

Joined: Jan 26, 2011
Posts: 23
Hey Daniel,

Good question. As Seb pointed out we do have quite a bit of coverage around the PhoneGap topic, and in Chapter 12 we do make use of an excellent PhoneGap plugin by Boris Smus to integrate with Android intents inside a web app.

With the book having a focus on the web side of mobile application development I decided not to throw people into the deep end with writing any Java code, but the process is reasonably easy to understand and I would be more than happy to provide some information on the topic online somewhere if this is something you can't find elsewhere. I think Boris' post provides some good information on the process though and is an excellent starting point.

I think the guys at Nitobi (creators and maintainers of PhoneGap) will provide improved documentation on how to write PhoneGap plugins in time, but for now if you have happy reading some source code, then there is a repository on GitHub that has some pre-built plugins that you can have a look at.

Hope that helps.

Cheers,
Damon.


Damon Oehlman
@DamonOehlman - Web - Blog
Daniel Trebbien
Ranch Hand

Joined: Jul 10, 2007
Posts: 57
Hi Damon,

Those are excellent resources. Thank you.
Dr Madder
Greenhorn

Joined: Feb 23, 2011
Posts: 1
This is all very interesting indeed... but doesn't that miss the whole point of using web technology (namely HTML5, CSS, Javascript, PHP) ?
If I have to use a middleware such as PhoneGap, that means I have to develop an app on the Android phone, install it (post it in the Android market if I want other users to be able to access my web-based pages), and only then shall I be able to use web-page-based apps taking advantage of the webcam interface...
Or am I missing something ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does Pro Android Web Apps cover how to expose native functionality to the JS runtime?