I am new to Android.
I embedded Cordova WebView on my Android app by following the tutorial.
I already successfully load a webpage from my server by using CordovaWebView.
Let’s say that I have a button on that webPage called “Capture Photo”, what should I do to call the local API so that I can use the camera?
The tutorial suggest that I need to implement the CordovaInterface to use camera in the way as follow.
@Override
public void setActivityResultCallback(CordovaPlugin plugin) {
this.activityResultCallback = plugin;
}
I don’t know what exactly is activityResultCallback. Is there another tutorial to show me how to implement this interface?
Since nobody answer my question.
I find a tutorial that can solve this problem.
Update:
Given that the link is broken, I’ll post my own code for implementing the Cordova Interface.