I am developing a Web-view of my website, my website has PWA already enabled and using Firebase i can send notification on my website + PWA, but same notification is not been received by my web-view application. I am having a Food restaurant website so notification are send when order status changes. so i cant go into firebase again and again and send push notification to my web-view application. although my website and PWA gets the notification.
You can trigger Java/Kotlin method execution from webview when you receive a notification like this
mWebView.addJavascriptInterface(new MyJavaInterface(), "test");
private class MyJavaInterface {
@android.webkit.JavascriptInterface
public String getGreeting() {
return "Hello JavaScript!";
}
}
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.