0

I am loading my website using webview using android studio. I am able to send bulk push notification, but not able to figure out approach to send personalized push notification like any social app. Please help me in the same.

Thanks

Nadir
  • 126
  • 1
  • 11

2 Answers2

0

If you are using Firebase Cloud Message to send/receive messages, you can control the notification that users see. You do this by overriding the "onMessageReceived" method and implementing whatever logic you want to show a notification on the user's device.

See the documentation for more information: Override onMessageReceived - Firebase Cloud Message

Tom Bailey
  • 682
  • 5
  • 12
0

If you are using your WebView as a WebApp, Service Worker support in chrome webview does exist for Android 5.0+ with a updated System WebView.

As mentioned in the link, each WebView is in its own sandbox so you would need to handle login each time the app is restarted. Alternatively use Chrome Custom Tabs instead as it allows for:

Shared cookie jar and permissions model so users don't have to log in to sites they are already connected to, or re-grant permissions they have already granted.

Morrison Chang
  • 11,691
  • 3
  • 41
  • 77
  • Thank for your help.. Do you have any sample code.. I am very new to android development .. – Nadir Mar 25 '18 at 10:32
  • @Nadir If you are very new to Android development, you should really follow the available free online tutorials/documentation. Or create a new question showing research/code with the specific problem you are having. My answer was directed at working around existing webapp server-side limitations where you can't use a REST API in a native app. – Morrison Chang Mar 25 '18 at 20:21