0

I'm trying to develop a hybrid APP that will implement in webview.

In this APP, I want all user interfaces load from server and functions (such as wifi scanning) work by native code.

Is it possible if I click the icon in the UI and it will send me back to implement native code by JavaScript?

(I have tried PhoneGap, but there doesn't have the plugin can support the function I need.)

PeterYu
  • 41
  • 6
  • I think you'll have to write the plugin yourself: http://docs.phonegap.com/en/4.0.0/guide_platforms_android_plugin.md.html#Android%20Plugins – Morrison Chang Mar 25 '15 at 02:50
  • Is there a possible that only use webview with native JAVA code that doesn't use PhoneGap? – PeterYu Mar 25 '15 at 11:34
  • You can do all of the Javascript bindings yourself - http://developer.android.com/guide/webapps/webview.html#UsingJavaScript – Morrison Chang Mar 25 '15 at 13:48
  • I have seen this page. So, can I call the Javascript in native JAVA code from the web page in server site? – PeterYu Mar 26 '15 at 02:55
  • Did you mean this: http://stackoverflow.com/questions/7544671/how-to-call-javascript-from-android – Morrison Chang Mar 26 '15 at 03:15
  • Part of this is the same that the javascript library is in native code, but can js function call from server web page in WebView? – PeterYu Mar 26 '15 at 05:09
  • I think you mean: Can you run Javascript which delivered into Android webview from external webserver and that Javascript call the binding interface? - Yes since there is a Caution/Warning on the page I linked to about possible security risk about visiting sites that aren't under your control which could call your Javascript Binding Interface and execute Java code in your Android app. – Morrison Chang Mar 26 '15 at 05:55
  • Sorry about the unclear question. Yes, it's totally I want to ask. Thanks for your great help. I'll keep to try it :D – PeterYu Mar 26 '15 at 07:20

0 Answers0