Android : onNotification not working in local notification
See original GitHub issueHi, how can i acces onNotification in local notification? despite all the advice on the net nothing works
` <uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_name" android:value="localpush"/> <meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_description" android:value="localpush"/>
<!-- Change the value to true to enable pop-up for in foreground (remote-only, for local use ignoreInForeground) -->
<meta-data android:name="com.dieam.reactnativepushnotification.notification_foreground" android:value="true"/>
<!-- Change the value to false if you don't want the creation of the default channel -->
<meta-data android:name="com.dieam.reactnativepushnotification.channel_create_default"
android:value="true"/>
<!-- Change the resource name to your App's accent color - or any other color you want -->
<meta-data android:name="com.dieam.reactnativepushnotification.notification_color"
android:resource="@color/white"/> <!-- or @android:color/{name} to use a standard color -->
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" />
<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.RNPushNotificationListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>`
Issue Analytics
- State:
- Created 3 years ago
- Comments:28 (1 by maintainers)
Top Results From Across the Web
react-native-push-notification - local notifications not working ...
Called when a remote is received or opened, or local notification is opened onNotification: function(notification) { console.
Read more >react-native-push-notification - npm
React Native Local and Remote Notifications for iOS and Android ... Read the troubleshooting guide before raising an issue.
Read more >How to use the react-native-push-notification.configure ... - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix ... or local notification is opened or...
Read more >Implementing React Native Push Notifications in Android Apps
There are two main ways you can send push notifications to your app users: local and remote. Local notifications are sent from a...
Read more >React Native Local Push Notifications | by Saad Khan - Medium
Basically, the push notification does not trigger from a cloud service, for example, ... In this post, I will be showing the android...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Check if you have created channel or not because without channel notifications won’t work now. Checkout this: https://github.com/zo0r/react-native-push-notification#channel-management-android And for more reference you can go through the /example directory of this repository.
@Dallas62 thanks for this awesome lib now, localNotification and ScheduleNotification only gives me vibration, and don’t appear. Can you tell me why?
Version: ^7.2.1 RN: 63.3 Google Services 4.3.5 Mobile: Huawei, Android 9.0