Skip to content

Configuring android app for parse push notifications #941

Open
@cool2apps

Description

@cool2apps

New Issue Checklist

Issue Description

When configuring android app for parse push notification as described in this document:
https://docs.parseplatform.org/parse-server/guide/#android-apps
If I add this code to AndroidManifest.xml, app will crash if app receives an FCM message.

       <service
           android:name="com.parse.fcm.ParseFirebaseMessagingService"
           android:exported="false">
           <intent-filter>
               <action android:name="com.google.firebase.MESSAGING_EVENT"/>
           </intent-filter>
       </service>

Steps to reproduce

Actual Outcome

If I add that code to AndroidManifest.xml, app will crash if app receives an FCM message.

Expected Outcome

So I removed that code from AndroidManifest.xml, and tried again. This time app does not crash, if app receives an FCM message and looks like app is working fine without this code. No problem I faced by removing that code.

So what my app is missing by removing that code?
Or documentation needs to be updated?

Environment

Parse Flutter SDK

  • SDK version: 5.0.1
  • Flutter version: 3.10.5
  • Dart version: 3.0.5
  • Operating system version: ubuntu server 22.04.2 LTS

Server

  • Parse Server version: 5.4.0

Logs

E/AndroidRuntime(32221): FATAL EXCEPTION: Firebase-Messaging-Intent-Handle
E/AndroidRuntime(32221): Process: com.company.appid, PID: 32221
E/AndroidRuntime(32221): java.lang.NullPointerException
E/AndroidRuntime(32221): 	at com.parse.PushRouter.getInstance(Unknown Source:15)
E/AndroidRuntime(32221): 	at com.parse.fcm.ParseFirebaseMessagingService.onMessageReceived(Unknown Source:89)
E/AndroidRuntime(32221): 	at com.google.firebase.messaging.FirebaseMessagingService.dispatchMessage(Unknown Source:66)
E/AndroidRuntime(32221): 	at com.google.firebase.messaging.FirebaseMessagingService.passMessageIntentToSdk(Unknown Source:119)
E/AndroidRuntime(32221): 	at com.google.firebase.messaging.FirebaseMessagingService.handleMessageIntent(Unknown Source:12)
E/AndroidRuntime(32221): 	at com.google.firebase.messaging.FirebaseMessagingService.handleIntent(Unknown Source:66)
E/AndroidRuntime(32221): 	at m6.g.lambda$processIntent$0(Unknown Source:1)
E/AndroidRuntime(32221): 	at m6.g.b(Unknown Source:0)
E/AndroidRuntime(32221): 	at m6.f.run(Unknown Source:6)
E/AndroidRuntime(32221): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
E/AndroidRuntime(32221): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
E/AndroidRuntime(32221): 	at l4.c.run(Unknown Source:6)
E/AndroidRuntime(32221): 	at java.lang.Thread.run(Thread.java:1012)
W/FlutterJNI(  897): FlutterJNI.loadLibrary called more than once
W/FlutterJNI(  897): FlutterJNI.init called more than once

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:docsOnly change in the docs or README

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions