简体   繁体   中英

Hybrid android app

I'm trying to develop a Hybrid android app where all by logic to get the data will be in Java and the presentation layer will be HTML embedded in a webview.

My question here is, how to pass the collected data in Java to the HTML in side a webview? Collected data will be of a Java collections type.. like a map.

Option I considered, but DONT want to use

1) PhoneGap kind of solutions - as I'm using some native hardware access features which PhoeGap doesnt support yet.

2) Hosting my Java logic as a server side logic for HTML and build presentation layer in server side itself(like using JSP)

Have a look at the docs . Especially the Basic Usage section which says

// OR, you can also load from an HTML string:
String summary = "<html><body>You scored <b>192</b> points.</body></html>";

webview.loadData(summary, "text/html", null);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM