how to have ratchet communicate wtih android sdk api's

187 Views Asked by At

Ratchet Looks real good for constructing easily UI for android. However what if I need to have a hybrid app meaning I want some of my code to be written with android sdk for example open a thread fetch some data from REST then save to local store in android. Then present this data on ratchet html table, not nessesaraly with REST but in general with android sdk

How is it possible to integrate the two? (ratchet + android sdk for example read some data from android local store and populate a table in html with ratchet? how should I approach this problem?)

1

There are 1 best solutions below

0
kindasimple On BEST ANSWER

You should use cordova and write plugins.

Your native java code will live in a cordova plugin and use the android sdk. The plugin, once loaded, exposes these native methods to your javascript and can return data through callbacks.

The task of connecting to a REST api and saving it to local storage could be accomplished entirely in javascript using ajax and localstorage.