Sunday, November 2, 2014

Android : Accessing native service from webview



I have a native app (if it helps, it's a JAR) that stores data. There is a GUI made out of HTML and JavaScript that simply runs in the browser. Right now, I can run this service behind a webserver and use it on the my local machine or server.


The part I can't figure out though is how I could translate this system to a mobile app. I know I can load my GUI with webviews, but then how would it communicate with my service? Some of my research into running a webserver on a mobile device seems to be that is isn't a good idea (maybe that's wrong though). So, I'm basically looking for a way for my HTML/JS code to AJAX in data from a service that is running on the device natively. Or, maybe I would have to give up the AJAX idea, but either way, I just need the data to be accessible to the HTML/JS.


No comments:

Post a Comment