How to call js from android webview


#1

Hi guys,
I’m trying to use ionic in a native android app with webview.
How can I call java from ts and make a callback from java to ts ?
Since functions in ts are not in global scope, I dont not wether this can be done or not ?
The question may be How can java call ionic function in ts?
Hope I made myself clear.


#2

Hi

Basically you are talking about cordova and how to create plugins

There are many available which provide you source code (read: all on github) and tons of documentation


#3

Thanks for your reply. But I’m not using corodva. It’s a native app using webview to load htmls/js.


#4

See: