android - Embedding Cordova WebView call native method -


i have added embedding cordova webview in native radio stream player app, , thats works perfekt.

but want change native view (viewflipper) javascript calling native function, how can this? ..

please help, have googled hours now!

finaly got work!!!

i had make cordova plugin, , call native function way...

@override public boolean execute(string action, jsonarray args, final callbackcontext callbackcontext) throws jsonexception {     if (action.equals("radio")) {         cordova.getactivity().runonuithread(new runnable() {             public void run() {                 // button click                 //cordova.getactivity().findviewbyid(r.id.playbutton).performclick();                  // method call                 ((radioapp) cordova.getactivity()).setviewflipper(0);                 ((radioapp) cordova.getactivity()).startstream();                  // todo: not in use yet!                 callbackcontext.success(); // thread-safe.             }         });         return true;     }     return false; } 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -