-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Question about localNotification on Android #2162
Comments
Hi, |
Hi,
Here is the function for push local notification, and I used a Pressable to trigger this function. |
I'm current using "react-native-push-notification": "^8.1.0", but I tried like 8.0.1 and 7.x.x something. They are also not working for me... |
Did you at least create the channel? |
Yes, I created a channal |
Can you share all the code used to trigger the notification ? |
Code for creating channel:
code in index.js
and the above is code for triggering notification, and the function is called on a onPress |
The same is happening for me as well, I just tried with all the settings as given and followed everything step by step, still nothing happening on Android. Local notifications not showing up at all. No console logs as well. Please advise. |
Did you change the value of:
To Again |
Yes made it to true already. This is my manifest
I have copied the NotifService.js and the NotificationHandler.js from the example repo and called the methods exactly as given in the document. As I am working on a functional component, only the object definition in constructor had to be changed as below. Would that make any difference?
and then I invoked the local notification method on a TouchableOpacity as
What else needs to be done from my end? I am using the latest versions.
|
I don't understand why everybody want to put no-component features inside a component. You can use a global variable to store the service, this will avoid lifecycle issue and double calls and allow background process in some cases. To investigate, you can add some extra |
Tried console in localNotif and its showing, but in logcat its showing this error
|
@binobose did you find a solution ? Having the same issue |
@bulby97 Infact when I tried it in a real device it worked. I made an apk and installed it in my mobile, it worked without any issue. Just give it a try. |
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. |
Hi team,
I set up everything correctly on android, but the local push notification is not working. Is there any clue of this issue?
I created channel at beginning of app.
Also tried to use firebase to send notification and it worked.
Thanks!
The text was updated successfully, but these errors were encountered: