Bug 27952 - Push notification are not displayed when the app is in background
Summary: Push notification are not displayed when the app is in background
Status: RESOLVED ANSWERED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 5.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2015-03-12 09:27 UTC by idot
Modified: 2017-06-28 15:48 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Boot receiver (458 bytes, text/plain)
2015-03-12 09:28 UTC, idot
Details
Broadcast receiver (1.29 KB, text/plain)
2015-03-12 09:28 UTC, idot
Details
Intent service (5.35 KB, text/plain)
2015-03-12 09:28 UTC, idot
Details
Register push (1.20 KB, text/plain)
2015-03-12 09:29 UTC, idot
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Comment 1 idot 2015-03-12 09:28:13 UTC
Created attachment 10289 [details]
Boot receiver
Comment 2 idot 2015-03-12 09:28:36 UTC
Created attachment 10290 [details]
Broadcast receiver
Comment 3 idot 2015-03-12 09:28:53 UTC
Created attachment 10291 [details]
Intent service
Comment 4 idot 2015-03-12 09:29:44 UTC
Created attachment 10292 [details]
Register push
Comment 5 Jon Douglas [MSFT] 2017-06-28 15:48:05 UTC
> When the app is not running, the notifications are not received, although I can see that from push sharp library I received a successful event of sending the push.

The problem here is that if you kill off your application via the Task Manager, you are also unwiring any BroadcastReceivers associated with it. Thus force killing your application would not allow for push notifications to be received.

There are many guides online regarding how to setup this behavior. I would recommend that you check out Firebase, specifically the "Handle notification messages in a backgrounded app" section:

https://firebase.google.com/docs/cloud-messaging/android/receive