question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android: Not getting notification when app closed/killed

See original GitHub issue

everything is working fine when the app is in foreground/background. the notification is working and I m getting the JSON. but when the app is killed or closed, nothing.

Here is AndroidManifest.xml:

`<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.boondate">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission
    android:name="${applicationId}.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />

<application
  android:name=".MainApplication"
  android:label="@string/app_name"
  android:icon="@mipmap/ic_launcher"
  android:allowBackup="false"
  android:theme="@style/AppTheme">
  <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>

  <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
  <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver">
      <intent-filter>
          <action android:name="android.intent.action.BOOT_COMPLETED" />
      </intent-filter>
  </receiver>
  <service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService"/>
  <service
      android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
      android:exported="false" >
      <intent-filter>
          <action android:name="com.google.firebase.MESSAGING_EVENT" />
      </intent-filter>
  </service>

  <activity
    android:name=".MainActivity"
    android:label="@string/app_name"
    android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
    android:windowSoftInputMode="adjustPan">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
  </activity>
  <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>

build.glade dependencies { … implementation ‘com.google.firebase:firebase-core:16.0.7’ implementation ‘com.google.firebase:firebase-messaging:17.3.4’ }

apply plugin: ‘com.google.gms.google-services’ com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true`

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:11

github_iconTop GitHub Comments

6reactions
oswaldjaroslavcommented, Sep 2, 2019

So its about 5 months from opening this issue and still no answer. Can someone provide solution? I mean this is really important issue. Without that the library is kind of useless. At least for me.

4reactions
mehdizarepourcommented, Apr 7, 2019

same problem…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Notifications Not Shown - Mobile Push
"Delivered" notifications in OneSignal means we have successfully sent the notification to the push servers (FCM/APNS/WNS etc..). These push servers then ...
Read more >
Is it possible to receive FCM push notifications when app is ...
There are 2 types of push notifications: Data messages and Notification messages. If you are using the Data messages you will be in...
Read more >
Android push notification not working when the app is closed
We have come across like making many individuals android apps, which helps the user to achieve their goals in a simple way.
Read more >
Android Not getting push notifications when app is closed ...
App receiving push notifications when the app is in foreground and using it , but when app is closed/ killed/in background not receiving...
Read more >
Service | Android Developers
mNM.cancel(NOTIFICATION); // Tell the user we stopped. Toast. ... We are communicating with our // service through an IDL interface, so get a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found