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
46
votes
8 answers

didReceiveRemoteNotification not working in the background

I'm working on a big app with a huge chunk of legacy code. Currently - there's an implementation for: - (void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo The problem is that it is only called when…
YogevSitton
  • 10,068
  • 11
  • 62
  • 95
46
votes
10 answers

"no valid aps-environment entitlement found for application"

I am encountering this error when I am loading an Ad Hoc build of my Push Notification enabled iPhone app onto my device: no valid aps-environment entitlement found for application What does it mean, and how do I repair it?
Simon Woodside
  • 7,175
  • 5
  • 50
  • 66
46
votes
9 answers

Handling Push Notifications when App is NOT running

When my App is not running and receives a Push Notification, if I click on that notification, the App is launched - but then it doesn't prompt the user with the Alert-View I set up, asking them whether they want to view the Notification's contents…
sirab333
  • 3,662
  • 8
  • 41
  • 54
46
votes
7 answers

Customizing the iOS permission dialog for push notifications

When an iOS app attempts to register for push notifications for the first time, the system pops up a permissions dialog asking the user for permission to receive push notifications. Is it possible to customize the text of this dialog, to explain why…
45
votes
6 answers

GET_ACCOUNTS permission while using GCM - Why is this needed?

I have an app, with Push notifications implemented. I want to understand the reason why we need "GET_ACCOUNTS"(android.permission.GET_ACCOUNTS), while implementing GCM? Some users are raising concerns with this permission. I have used this…
Vamsi Challa
  • 11,038
  • 31
  • 99
  • 149
44
votes
2 answers

How would you create a notification system like on SO or Facebook in RoR?

I'm thinking that notifications would be it's own resource and have a has_many, through relationship with the user model with a join table representing the associations. A user having many notifications is obvious, and then a notification would have…
44
votes
3 answers

How to start Power Manager of all android manufactures to enable background and push notification?

Some Android devices due to custom Android tweaks are done by manufacturers has some politics about Power Management that breaks some features like push notifications. Huawei - Only Pre-EMUI 5.0 / Android 7 - Go to Settings > "Protected apps",…
Alessandro Scarozza
  • 4,273
  • 6
  • 31
  • 39
44
votes
4 answers

Notifications fail to display in Android Oreo (API 26)

I get this message when trying to display a notification on Android O. Use of stream types is deprecated for operations other than volume control The notification is straight from the example docs, and displays fine on Android 25.
Sky Kelsey
  • 19,192
  • 5
  • 36
  • 77
44
votes
7 answers

Chrome Push Notification: This site has been updated in the background

While implementing the chrome push notification, we were fetching the latest change from our server. While doing so, the service-worker is showing an extra notification with the message This site has been updated in the background Already tried…
44
votes
5 answers

APN (Apple Push Notification) payload size limit

In official documentation you can find the info: Each push notification includes a payload. The payload contains information about how the system should alert the user as well as any custom data you provide. The maximum size allowed for a…
Jakub
  • 13,712
  • 17
  • 82
  • 139
44
votes
5 answers

Increment the Push notification Badge iPhone

Is it possible to increment the badge value on receiving the notification. OR Should I send the count as payload? If i am sending the badge value as "1" every time, how could i increment the badge-value in the icon of the app if the app is not…
user825841
43
votes
3 answers

Basic Steps for Using MQTT in android

I am new to Android and want to use MQTT as a push notifier for Android from Server. I have read about MQTT but I do not understand it very well. If anyone has used this library, please tell me what I have to do to start using it. I have a Java…
Johni Deep
  • 563
  • 1
  • 8
  • 10
43
votes
11 answers

How to test Push Notification is working in my application

In my application I am implementing the Push Notification Service. I have a Content Provider server, which contains some products in it. I have generated the SSL Client Certificate and attached it to my development Provisioning profile. This profile…
Naved
  • 4,020
  • 4
  • 31
  • 45
43
votes
8 answers

iOS Push Notification Banner shown twice for a single Push

I've noticed that sending a Push notification results in the following behavior: See how the banner is shown a second time, after a short delay? At first I thought that our backend was mistakenly sending 2 push notifications, one after the…
pkamb
  • 33,281
  • 23
  • 160
  • 191
43
votes
4 answers

GCM Error=MissingRegistration sending messages via JSON

I'm testing push GCM via Fiddler Headers: User-Agent: Fiddler Authorization: key=AIzaSyAkXfcuLLCZ-5n18wwO6XeJ13g-z9ja Host: android.googleapis.com Content-Length:…
takayoshi
  • 2,789
  • 5
  • 36
  • 56