-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Notifications appear ONLY after opening the app! #1574
Comments
Hi @wmonecke Does that occure every time ? or only in some users ? |
Hi, I have the same Issue, after updating my phone to android 10, it's happening for local notifications, don't know what is causing this. |
Hi @hikkary |
Can someone share the logic that define the date ? |
Hi! This is mainly happening with Android devices. I can't be sure because 90% of my users are Android users.
This is not the issue. I actually had the issue that the notification fired right away if set on the same date but earlier than the current time. I set the date to the next day if the user schedules a day for the current day but for an earlier hour.
The current issue is different and has happened many times. You won’t receive the notification at the time you set them but once you open the app in the future you will receive ALL scheduled notifications at once. So for example, if you schedule notifications for 6 pm, 7 pm, and 8 pm, then by 9 pm you won't have received any notification. |
Can you share the code when you plan the notification ? (parameters) The example project doesn't have this issue even with API 29. I need a reproducible example to investigate. |
@Dallas62 Yes of course 👍 Schedule Notification:
Android Manifest:
android/app/build.gradle
|
Were you able to reproduce it ? Or just user's report ? I will test on a device tomorrow, I don't see anything that should block (Android Guidelines, Stack Overflow). Do you see a kind of device in report or Android version to find something in common between users ? |
@Dallas62 I am not able to reproduce it. It seems the first few notifications work well and it starts sometime in the future. |
Hi @wmonecke Wasn't able to reproduce it actually, but I think one of my application as this kind of bug. Maybe reboot, low battery or Android system which kill the alarm manager. |
I am getting same reports from my Android users, but I also couldn't find a way to reproduce yet! Some users receive the notifications only when they open the app. Will keep you updated if I can find a way to reproduce this. One thing that I once could see is that low battery caused the app to not send notifications anymore on a friends phone, maybe its related to that? |
Also just received a report that it happened to a user after updating the phone |
Hi @zwenza |
@Dallas62 I gathered some informations about users who have this problem and you can see a very clear trend: One user reported it happened after upgrading to Android 10. Also getting reports about the issue from people with a Samsung Galaxy S7 edge, Samsung Galaxy S9, Samsung Galaxy A50, Samsung Galaxy J7 Prime 2, Samsung Galaxy A51, Samsung Galaxy A20. So seems that the Samsung Galaxy phones are the ones causing the trouble... |
@Dallas62 I don't think the problem is with the Android update. I haven't received any update for my old Elephone S7 (Android 7.1.1) for years and it doesn't work. All other devices work... |
Hi @phan21 I will recheck from scratch how this is working, there is probably information in stackoverflow or specialized forum. |
Of course. But my manifest is almost the same as in the example on github here Hope it helps |
Same problem here, using a Samsung M30 Android 10, all notifications came after user enter the app |
Just to be sure that tis is a "library issue" are you sure that the notifications was scheduled before the app start ? |
Yes! The notification time is set correctly and the notif should have fired
before opening the app. I am experiencing this currently on my personal
Xiaomi phone.
All the best and stay safe,
Walter Monecke
software engineer @ urban hero
…On Tue, Aug 18, 2020, 23:19 Boris Tacyniak ***@***.***> wrote:
Just to be sure that tis is a "library issue" are you sure that the
notifications was scheduled before the app start ?
Then do you know if this behavior appear after a restart / reboot or
always ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1574 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFZB7VMQXPUQMEDYBD2KLPDSBLV6NANCNFSM4PRW2K5Q>
.
|
Here is a video: |
This video is using the options like in the comment: #1574 (comment) If yes, do you see the notification pop-up in the next 24h without openning the application ? I will take time today on this. |
@Dallas62 Yes it has
I will test this out today and let you know :) Thank you for your hard work! |
I will link some threads with possible workarounds, since I'm not able to reproduce this, I try to find workaround without editing library at first: https://stackoverflow.com/questions/35380310/alarmmanager-not-working-on-samsung-devices-in-lollipop
https://stackoverflow.com/questions/34074955/android-exact-alarm-is-always-3-minutes-off/34085645#340856457
Need changes in library: https://stackoverflow.com/questions/35915326/how-to-schedule-alarm-without-alarmmanager-api Replace As far as I search, rename the app package seems to be the best solution. https://developer.android.com/studio/build/application-id
Maybe a application-variant could work... |
Does someone able to test the workaround with the application id ? |
Was just looking through your shared link https://stackoverflow.com/questions/34074955/android-exact-alarm-is-always-3-minutes-off/34085645#340856457 Can anyone test if simply adding a package containing If changing the application id is the only way this can work, it would be really terrible 😅 |
I think if this is only package name, this is "not" a problem. I read somewhere that application id and package can be different in AndroidManifest. But without a test, it's hard to know... |
@Dallas62 Hi there! I waited 24H but no notification appeared sadly. I had to open the app for it to show :( |
Facing the same issue. When the app is closed and also removed from recent item then the scheduled notification does not appear and only after opening the app, I receive the notification. And if it is left in recent items then the notification appears on correct time. Tried removing battery optimisation for the app and then also the notification does not appear. My android version is 9 and device is Asus Zenfone Max Pro M1. Any suggestions are most welcomed. |
Did you try to add,
in your androidmanifest? |
any solution ? |
I’ve been battling the same issue for a while now. Notification comes only when app is in foreground or background. It does not come when the app is killed |
I have used both. This has nothing to do with the notification channel but with the OS suppressing notifications. If I go into settings and apply "No restrictions" in regards to battery consumption, it works as expected. Currently, I implemented a FAQ in my app that tells the user what to do in case the notifications are not arriving. Not the ideal. Let's just hope vendors stop with this practice. If notifications (specifically locally scheduled notifications) are mission critical for your app then I recommend you take the (android) user to settings and disable any restrictions during your app onboarding. |
Hi @wmonecke |
I am able to reproduce this and what I can debug that debugger hits notificationManager.notify(notificationID, info); under RNPushNotificationHelper.java , It detects the notifications correctly but looks it doesn't show that on notification bar |
Had the same problem but it seems to be working now after I added:
in |
@Balthazar33 Wow! You solution worked perfectly on my Xiaomi device. Although TypeScript keeps saying it's incompatible. But it works. Thanks! |
Thanks for your thread! |
I'm experiencing this with local notifications on iOS and react-native-push-notification |
I am also facing same issue any solution for this and could anyone please tell me what is best way to set time for schedule notification |
I have 2 Local scheduled notifications every day and it only appear one notifications per day. Yes, the app is in quit mode. I tried to make different channel but seems not working. |
Update: |
hii! |
Its is because of Create channel, once you will create channel before
creating push notification it will work , also remove channel from manifest
file .
…On Thu, Jul 15, 2021 at 12:37 AM Bhumil Lakhtariya ***@***.***> wrote:
hii!
I am facing the same issue. My scheduled notification is not arriving when
the app is in background or killed mode and notification arrives when the
app is opened. And If I change the scheduled time while the app is in
foreground mode the notification arrives immediately and not on scheduled
time. Please help!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1574 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQNRDPKAFDVJNWLFDUV5CD3TXXN63ANCNFSM4PRW2K5Q>
.
--
Sanchit Srivastava | Associate IT
Daffodil Software <http://daffodilsw.com>
IND: +91.124.681.7000
US: +1.201.984.1549
|
In my case, I'm in this kind of scenario with local notifications:
I'm looking for a way to avoid this happening, and any suggestions are appreciated! It might honestly be more related to my Pusher implementation than the local notifications themselves, but I'm leaving a comment here in case anyone finds themselves in a similar situation. |
The solution you provide is actually worked for me and i get the notification on the second day but i am not getting the notification on the third day as i have implemented the notification for five consecutive days. Also i did not open the app on the second day because i have scheduled the five days notification altogether on first day. Can you give any solution for that ? |
Can you share your code? (for scheduling the notifications) |
yeah sure below is my code for scheduling daily notifications for (let i = 0; i < 3; i++) { |
But you didn't specify the repeatType @raturiji |
Yes because i don't want them to repeat daily instead i want to repeat them for a limited number of days that's why i am using for loop to schedule them for next consecutive days. |
@raturiji but your loop only iterates twice. So it'll only work for tomorrow and next |
No, it is actually running three times for i value 0,1 and 2 which is for today , tomorrow and next |
@raturiji it max 64 local push :( |
Can u explain a little bit ? |
I'm doing a lesson reminder function. Almost like an alarm. But on ios, It only gives maximum 64 schedule. |
Any solution? |
Bug
Hi there!
Amazing work with this package and it is working almost flawlessly.
However, some of my android users have reported that their
scheduled
notifications are not arriving and are only being shown AFTER they have opened the app.This can be many notifications being shown at once if more than one scheduled notification already passed.
I did not see any other similar issue being open and wanted to see if anyone else has experienced this issue? All notifications within the app are scheduled locally.
On iOS it hasn't been reported!
Environment info
react-native info
output:Library version:
"react-native-push-notification": "^3.5.1",
The text was updated successfully, but these errors were encountered: