Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

[Xamarin.Firebase.Messaging] Cannot receive push notifications when app is closed #273

Open
@Alexander-Alekseev

Description

Xamarin.Android Version (eg: 6.0):

Xamarin.Forms v4.3.0.908675 (not the latest one, but the "previous" one)
Xamarin.Android.* libs are v28.0.0.3

Operating System & Version (eg: Mac OSX 10.11):

Edition: Windows 10 Pro
Version: 1809
OS Build: 17763.805

Google Play Services Version (eg: 8.4.0):

Xamarin.GooglePlayServices.Base v71.1610.0
Xamarin.Firebase.Messaging v71.1740.0

Describe your Issue:

Title says the problem.
Application receives push notification in both foreground and background, but does not receive them if I force close it.
I followed both Xamarin and Firebase/Google tutorials to 'integrate' Firebase messaging services.
I do have google-services.json in my project (in the Android project, not in the common one).
OnMessageReceived is not called when app is closed (I checked logs).
I payload only data messages, not notification messages.
I'm sure that server side works correctly, because my Java Android application with the same settings (and the same google-services.json) is able to receive push notifications when it's closed.
What else can be checked? Please let me know.

Steps to Reproduce (with link to sample solution if possible):

Implementation of FirebaseMessagingService: https://gist.github.com/Alexander-Alekseev/cb555f0ee5bb56c33229e3fbb1848682.
Android manifest: https://gist.github.com/Alexander-Alekseev/d4a0a603afd6ff7b7038b7f854f1e4d7.

Include any relevant Exception Stack traces, build logs, adb logs:

Metadata

Assignees

Labels

investigatingWe are currently looking into this

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions