Push notification facility for mobile web app
I have a simple scenario, to receive notification on mobile devices whenever it's generated from Server.
I know this facility is available in native iOS app and Android but I am trying to avoid native path. What I would like that:
- A mobile web app which can be access by visiting a URL
- User have ability to create a bookmark on Home screen so that it gets feeling of native app Icon.
- Getting badges of notification(no of messages in round shape)
- Able to receive notification even if browser is closed.
I know there is a possibility of server side events/Web Sockets but can a web app emulate push notification features?
You can do this without a hybrid app, native app, or requiring users to install Pushover. It is possible to build a "progressive web app" that can send push notifications even after the page has been closed.
These work today in Chrome for Android (and other browsers seem to be implementing support), but there is no support on iOS.
Check out this demo, and this guide explains how to do it: https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/
as mentioned in Can a Webbased app have push notification? you might try Pushover: Simple Mobile Notifications for Android and iOS.
I am using this architecture
sockjs + rabbitmq + stomp
You can use a Plug-in for mobile Push Notification to PhoneGap (mobile web application)
Push notification or server push is the latest way to send data from the server to the client. Have you noticed how Gmail receives and displays the new email that arrives in your inbox? You don’t need to refresh the browser or click some refresh button to send request and receive latest data from the server.
Able to receive notification even if browser is closed.
You cannot use WebSockets for this. You must use the more recent Push API. Currently it is supported by all major browsers, except Safari on iOS.
However adding support for the Push API from scratch is a lot of work: I suggest to use a third party service like Pushpad (I am the founder).
According to my understanding you can build a hybrid app which will allow you to access both native and web functionality. To achieve this you can consider using Phonegap. This will allow you to use Push Notification service too.
You can consider Test Flight a 3rd party software for your app distribution on Android and iOS platform. Test Flight is free and recently acquired Apple.
Firebase is Google's push notification solution for mobile and web.
The company now offers all Firebase users free and unlimited notifications with support for iOS, Android and the Web. source