react-native-push-notification icon indicating copy to clipboard operation
react-native-push-notification copied to clipboard

push notification not show in android 9

Open fatemehmemar123 opened this issue 7 years ago • 5 comments

hi i install react-native-push-notification": "^2.0.1", and notification show in android 6 but not show in android 9 please help me

fatemehmemar123 avatar May 01 '19 07:05 fatemehmemar123

@fatemehmemar123 maybe you should use the newer version of the package, i use version ^3.1.3, and it works fine on my device. But i'm not using the android 9, im on android 8 by the way.

dwadp avatar May 04 '19 05:05 dwadp

I was running into this issue as well. The solution was found in the documentation. You might be missing necessary permissions and metadata in the android manifest: https://github.com/zo0r/react-native-push-notification#android-manual-installation

andrewtremblay-pear avatar May 16 '19 14:05 andrewtremblay-pear

still has an issue although I added all required permissions.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.app"
  android:versionCode="<%= versionCode %>"
  android:versionName="<%= versionName %>">
  <uses-permission android:name="android.permission.WAKE_LOCK" />
<permission
        android:name="<%= bundleId %>.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />
        <uses-permission android:name="<%= bundleId %>.permission.C2D_MESSAGE" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.USE_FINGERPRINT" />
    <application
      android:name=".MainApplication"
      android:label="<%= appName %>"
      android:icon="@mipmap/ic_launcher"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="<%= appName %>"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:launchMode="singleTask"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter android:label="filter_react_native">
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="<%= uriScheme %>" android:host="home" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
      <meta-data  android:name="com.dieam.reactnativepushnotification.notification_channel_name"
                android:value="ALERTS"/>
        <meta-data  android:name="com.dieam.reactnativepushnotification.notification_channel_description"
                    android:value="ALERTS"/>
        <meta-data  android:name="com.dieam.reactnativepushnotification.notification_color"
                    android:resource="@android:color/white"/>
        <receiver
            android:name="com.google.android.gms.gcm.GcmReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <category android:name="<%= bundleId %>" />
            </intent-filter>
        </receiver>
        <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.RNPushNotificationListenerServiceGcm"
            android:exported="false" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            </intent-filter>
        </service>
    </application>
</manifest>

maamounapprise avatar Jun 28 '19 14:06 maamounapprise

I solve the issue by downgrading the version of ‘react-native-push-notification’ to ‘3.1.2’.

faisal3413 avatar Jul 18 '19 16:07 faisal3413

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 18 '20 00:07 github-actions[bot]