Questions tagged [push-notification]

Push notifications are alerts, badges, or sounds which are pushed to a mobile device from a remote server. Apple delivers push notifications via the Apple Push Notification Service (APNS). Android devices receive push notifications via the Google Cloud Messaging (GCM) service. In the past, Android devices used the Cloud to Device Messaging (C2DM) framework. Windows Phone apps receive push notifications either via MPNS or the newer WNS.

Push notifications are alerts, badges, sounds and/or data which are pushed to a mobile device from a remote server.

  • In , push notifications are delivered via Apple's Apple Push Notification Service (), triggered by a message from developers' servers to Apple's APN servers, which in turn push the message to iOS devices. Apple first released push notifications in iOS 3.0. Push notifications should not be confused with local notifications, which are a way for an app to post a notification to a device locally, with no interaction with push notification servers. New in , you can add flags to push notifications to make them silent or to trigger a background fetch.

  • In , push notifications are delivered via Firebase Cloud Messaging (). (Previously called Google Cloud Messaging ()). This replaces Google's Android Cloud to Device Messaging Framework ().

  • Push Notifications for Windows Store apps are delivered via the Windows Push Notification Service (), which enables third-party developers to send toast, tile, badge, and raw updates from their own cloud service.

  • Push Notifications for Amazon devices running (Kindle tablets, Fire TV and Fire TV Stick) are delivered via the Amazon Device Messaging () service.

References:

19151 questions
57
votes
6 answers

Android emulator not receiving push notifications

I'm using push notifications on google cloud, however for some reason i cant receive push notifications on the emulator. The same application does receive notifications when i test it on a real device however. Has anyone else encountered this or…
Christopher Lawless
  • 1,057
  • 2
  • 12
  • 19
56
votes
6 answers

Push notification issue with iOS 10

I've developed one application in that i've implemented push notification. Currently it's live on apple store. Upto iOS 9 push is working fine but after iOS 10 it is not working. What is the issue with the code?
Mohsin Sabasara
  • 701
  • 1
  • 7
  • 13
56
votes
8 answers

Firebase: Cannot upload production APNs certificate

I am currently testing an app in TestFlight and need a production APNs certificate in order to test Notifications in Firebase. I have followed all of the steps in this video and successfully configured the development APNs…
55
votes
6 answers

Weird push message received on app start

I'm getting a weird push message captured by my push service: Bundle[{CMD=RST_FULL, from=google.com/iid, android.support.content.wakelockid=1}] Just started to happen yesterday and I can't really spot which code change is to blame for this. Has…
vkislicins
  • 3,331
  • 3
  • 32
  • 62
54
votes
3 answers

didReceiveRemoteNotification: fetchCompletionHandler: open from icon vs push notification

I'm trying to implement background push notification handling, but I'm having issues with determining whether the user opened the app from the push notification that was sent as opposed to opening it from the icon. - (void)application:(UIApplication…
52
votes
1 answer

WebSockets Energy Consumption

On a mobile device (iPhone/Android), what is the impact on battery consumption by implementing WebSockets vs HTTP? Suppose I'm building an instant messaging app and have two options: Rely on Push Notifications to notify the device of a new message,…
Hundley
  • 3,167
  • 3
  • 23
  • 45
52
votes
8 answers

How to get back "Allow Push Notifications" dialog after it was dismissed once?

I am building an app that is heavily relies on APN. Upon the very first start of my app, iOS asks if this app is allowed to use APN (as a result of registerForRemoteNotificationTypes: call). However once dismissed, this dialog is never popping up…
52
votes
4 answers

How to do push notification from server to android mobile

I don't know anything about push notification. I am trying to learn. but I don't understand. I have one table MySQL database in server system. When any changes are made in the table I want display notification on an android mobile app. Can anyone…
naveen
  • 721
  • 3
  • 11
  • 16
51
votes
11 answers

Why "add Push notification feature to your app id" warning even after push-notification showing enabled in App ID?

I am using Xcode8, swift 3, iOS 10 In Targets -> capabilities showing "add the Push notification feature to your app id". I check my APP ID and it is showing pushnotfication enabled in both development and distribution. With same APP IS and…
New iOS Dev
  • 1,937
  • 7
  • 33
  • 67
51
votes
3 answers

Is Silent Remote Notifications possible if user has disabled push for the app?

In my settings tabbar: I have a feature specific switch which can be turned OFF or ON based on API response. From website only admin is authorized to turn ON/OFF. I can make /user API call everytime on settings tap to check the current settings for…
Tariq
  • 9,861
  • 12
  • 62
  • 103
51
votes
10 answers

Apple PNS (push notification services) sample code

Is there a sample project showing how to use APNS on the IPhone and how to set up things? I'm currently looking at the documentation but it would be nice to have some working code to pick apart and see how it all works together? I can't seem to find…
froh42
  • 5,190
  • 6
  • 30
  • 42
49
votes
3 answers

For a push notification, is a websocket mandatory?

I have PHP on the server side, and HTML and javascript on the client side. I am making an app where a stakeholder types a message that is broadcasted to multiple recievers of a group in real time. I did some research on google and I understand I…
John Franky
  • 1,012
  • 1
  • 14
  • 33
48
votes
6 answers

Firebase silent apns notification

Is there a way to send a silent APNS using google's firebase? It seems that if the app is in the background it will always show a notification to the user. Thanks?
48
votes
3 answers

GCM - Max length for Registration ID

Update: GCM is deprecated, use FCM What is the maximum length for a Registration ID issued by GCM servers? GCM documentation do not provide this info. Googling for this reveals that Registration ID is not fixed length in nature and can be up to 4K…
Raj Chaudhari
  • 880
  • 2
  • 7
  • 10
47
votes
4 answers

Android "hello world" pushnotification example

I am new to android application development and I am learning little bit. I am in a hard mission for sending push notification ( cloud messaging ) from my web server ( PHP ) to android application ( just a "helloworld" ). I did some "googling" and…
ramesh
  • 4,008
  • 13
  • 72
  • 117