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
357
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,617
  • 6
  • 33
  • 43
307
votes
8 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,845
  • 3
  • 14
  • 14
269
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
  • 15,870
  • 24
  • 70
  • 127
255
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…
235
votes
20 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,368
  • 4
  • 28
  • 40
227
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,357
  • 6
  • 66
  • 101
192
votes
29 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…
178
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,401
  • 8
  • 48
  • 80
176
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
  • 7,444
  • 9
  • 50
  • 74
162
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…
159
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,268
  • 14
  • 53
  • 91
149
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
  • 119,096
  • 131
  • 338
  • 476
149
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
  • 8,939
  • 8
  • 39
  • 57
143
votes
15 answers

iOS push notification: how to detect if the user tapped on notification when the app is in background?

There are a lot of stackoverflow threads regarding this topic, but I still didn't find a good solution. If the app is not in the background, I can check launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] in…
Bao Lei
  • 3,515
  • 3
  • 19
  • 17
141
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
  • 28,798
  • 20
  • 92
  • 109
1
2 3
99 100