45

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:

  1. A mobile web app which can be access by visiting a URL
  2. User have ability to create a bookmark on Home screen so that it gets feeling of native app Icon.
  3. Getting badges of notification(no of messages in round shape)
  4. 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?

Zoe
  • 23,712
  • 16
  • 99
  • 132
Volatil3
  • 11,721
  • 33
  • 112
  • 218
  • Why would you avoid the platform notification schemes? They've done a LOT of work for you and will probably do a better job with battery life than you can do (former head of an engr group that did mobile push email). – jfriend00 Feb 06 '12 at 05:58
  • @jfriend00 thanks for reply. One of the reason is platform incompatibility. One to make for iOS and then for Android,BB etc. Submission to Apple Store and Android etc itself is time taking. – Volatil3 Feb 06 '12 at 06:08
  • I'm not aware of how a pure web app can do all the things in your requirements so I was assuming that you were going to at least have a component that was a native app that had to get submitted to the appropriate store. – jfriend00 Feb 06 '12 at 06:12
  • Did you ever implement a solution for this? I am looking to do something similar. – jallen Mar 09 '15 at 01:39

7 Answers7

17

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/

owencm
  • 6,909
  • 4
  • 32
  • 52
7

as mentioned in Can a Webbased app have push notification? you might try Pushover: Simple Mobile Notifications for Android and iOS.

Community
  • 1
  • 1
Kai Carver
  • 1,954
  • 24
  • 23
2

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).

collimarco
  • 29,854
  • 31
  • 89
  • 120
1

I am using this architecture

sockjs + rabbitmq + stomp

References:

  1. http://www.rabbitmq.com/blog/2012/05/14/introducing-rabbitmq-web-stomp/
  2. http://jmesnil.net/stomp-websocket/doc/
Pranav 웃
  • 8,094
  • 5
  • 36
  • 48
Luffy
  • 11
  • 1
1

You can use a Plug-in for mobile Push Notification to PhoneGap (mobile web application)

https://github.com/awysocki/C2DM-PhoneGap

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.

Tekinnn
  • 19
  • 4
0

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.

0

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

Freek Nortier
  • 710
  • 1
  • 10
  • 24