I have an Android application with a WebView inside it. In this webview, I have a website with ServiceWorkers to send a push notification. The push notification should not be implemented inside the Android App, but only inside the website. When I open the website inside the webview, I receive "Push is not supported", but if I use CustomTabs it works fine. I can't use CustomTabs to do this, and I can only use WebView inside the app. I'm trying with WebChromeClient in the webview. I already have this setted:
[...]
webView.getSettings().setAppCacheEnabled(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
webView.getSettings().setDatabaseEnabled(true);
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setSupportMultipleWindows(true);
webView.setWebChromeClient(new WebChromeClient() { [...]
How can I display push notifications with ServiceWorkers (not using an external API like OneSignal) ?