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:

17860 questions
350
votes
16 answers

Does Android support near real time push notification?

I recently learned about the ability of iPhone apps to receive nearly instantaneous notifications to apps notifications to apps. This is provided in the form of push notifications, a bespoke protocol which keeps an always on data connection to the…
j pimmel
  • 11,519
  • 6
  • 30
  • 43
300
votes
7 answers

Generate .pem file used to set up Apple Push Notifications

I tried and tried to generate a .pem file, every time generating certificates from the client's account and then generating the .pem file using the terminal, but it's of no use. Can anyone give a step-by-step procedure?
Harsh Parikh
  • 3,773
  • 3
  • 11
  • 14
231
votes
5 answers

How does push notification technology work on Android?

How has Google implemented their push notification feature? Does it work through polling done by a service running in the background or in a different way?
Khawar Raza
  • 14,992
  • 23
  • 63
  • 117
223
votes
7 answers

Will iOS launch my app into the background if it was force-quit by the user?

I am triggering a background fetch by using the content-available flag on a push notification. I have the fetch and remote-notification UIBackgroundModes enabled. Here is the implementation I am using in my AppDelegate.m: -…
Andrew
  • 15,074
  • 6
  • 61
  • 100
214
votes
17 answers

Get push notification while App in foreground iOS

I am using push notification service in my app. When app is in background I am able to see notification on notification screen(screen shown when we swipe down from top of iOS device). But if application is in foreground the delegate method -…
Ab'initio
  • 5,128
  • 4
  • 25
  • 40
212
votes
21 answers

Android Push Notifications: Icon not displaying in notification, white square shown instead

My app generates a notification, but the icon I set for that notification is not being displayed. Instead, I get a white square. I have tried resizing the png of the icon (dimensions 720x720, 66x66, 44x44, 22x22). Curiously, when using smaller…
180
votes
28 answers

Detect if the app was launched/opened from a push notification

Is it possible to know if the app was launched/opened from a push notification? I guess the launching event can be caught here: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if…
173
votes
14 answers

Reset push notification settings for app

I am developing an app with push notifications. To check all possible ways of user interaction, I'd like to test my app when a user declines to have push notifications enabled for my app during the first start. The dialog (initiated by…
hanno
  • 6,034
  • 7
  • 42
  • 77
172
votes
14 answers

Silent pushes not delivered to the app on iOS 11

I noticed that on iOS 11 beta 2, the silent notifications are not delivered to the application:didReceiveRemoteNotification:fetchCompletionHandler regardless the state of the app (background / foreground). I implemented the UIApplicationDelegete…
Jan
  • 6,366
  • 7
  • 40
  • 58
155
votes
24 answers

How to fix "no valid 'aps-environment' entitlement string found for application" in Xcode 4.3?

I've been trying very very hard to create a simple simple iOS app which can recieve push notifications. My only reason for doing this is to establish a procedure for some other team members to use, and have not been able to find an up to date,…
jwl
  • 10,418
  • 13
  • 48
  • 86
143
votes
11 answers

What is the maximum length of a Push Notification alert text?

What is the maximum length of the alert text of an iOS push notification? The documentation states that the notification payload has to be under 256 bytes in total, but surely there must be a specific character limit for the alert text.
hpique
  • 112,774
  • 126
  • 328
  • 461
143
votes
10 answers

Notification Icon with the new Firebase Cloud Messaging system

Yesterday Google presented at Google I/O the new notification system based on the new Firebase. I tried this new FCM ( Firebase Cloud Messaging ) with the example on Github. The icon of the notification is always the ic_launcher despite I have…
137
votes
6 answers

Debugging App When Launched by Push Notification

I am currently developing an app that receives Push Notifications. I have this all working 100% through a PHP page. There are several different types of push notifications my app can receive. The PHP handles this and sends different packets of…
Dutchie432
  • 27,738
  • 20
  • 88
  • 109
133
votes
6 answers

Renew Push certificate and keep current App Store App working

I have an app on app store, which is using an iOS Provisioning Profile (Distribution) which is expired. This Profile contains Push Certificate that's also expired (and does not appear anymore in the portal). Question 1: Is there a way to recreate…
Franck
  • 7,377
  • 8
  • 36
  • 53
129
votes
19 answers

Get the current displaying UIViewController on the screen in AppDelegate.m

The current UIViewController on the screen need to response to push-notifications from APNs, by setting some badge views. But how could I get the UIViewController in methodapplication:didReceiveRemoteNotification: of AppDelegate.m? I tried use…
lu yuan
  • 7,049
  • 9
  • 40
  • 77
1
2 3
99 100