Eme Fibonacci Well-Known Member Licensed User Longtime User May 26, 2019 #1 I have an android 8.1. I read a lot topics with same question. Nothing worked for me. I have a basic implementation of FCM and everything works fine. If I hit the home key the application goes to the background and everything still works fine. If I press the right button (I forgot the name) and then click on "clear all" the notification no longer works. If the app is left unused for a long time (Probably the android is killing it) the notification don't work anymore. What better way to solve it? Sorry for this repetitive question. Thank you for you time.
I have an android 8.1. I read a lot topics with same question. Nothing worked for me. I have a basic implementation of FCM and everything works fine. If I hit the home key the application goes to the background and everything still works fine. If I press the right button (I forgot the name) and then click on "clear all" the notification no longer works. If the app is left unused for a long time (Probably the android is killing it) the notification don't work anymore. What better way to solve it? Sorry for this repetitive question. Thank you for you time.
Erel B4X founder Staff member Licensed User Longtime User May 27, 2019 #2 Are you testing it in release mode? Are you sending the message with the B4J tool? Upvote 0
Eme Fibonacci Well-Known Member Licensed User Longtime User May 27, 2019 #3 Erel said: Are you testing it in release mode? Are you sending the message with the B4J tool? Click to expand... Yes release mode. With firebase console and B4J tool. I've tried countless things. I found this in some tutorial. This seems to work. Code: Copy Service.StartForeground(nid, CreateNotification("...")) Maybe this code is incorrect but it seems to work. Upvote 0
Erel said: Are you testing it in release mode? Are you sending the message with the B4J tool? Click to expand... Yes release mode. With firebase console and B4J tool. I've tried countless things. I found this in some tutorial. This seems to work. Code: Copy Service.StartForeground(nid, CreateNotification("...")) Maybe this code is incorrect but it seems to work.
Erel B4X founder Staff member Licensed User Longtime User May 27, 2019 #4 Eme Fibonacci said: With firebase console Click to expand... Don't. It will not work when your app is not running. Eme Fibonacci said: I found this in some tutorial. This seems to work. Click to expand... Wrong solution. The app doesn't need to run for the notification to arrive. Firebase notifications work properly on almost all devices when implemented correctly. On some devices the OS limits background notifications based on all kinds of parameters. However if your app doesn't work on several devices then you did something wrong. Upvote 0
Eme Fibonacci said: With firebase console Click to expand... Don't. It will not work when your app is not running. Eme Fibonacci said: I found this in some tutorial. This seems to work. Click to expand... Wrong solution. The app doesn't need to run for the notification to arrive. Firebase notifications work properly on almost all devices when implemented correctly. On some devices the OS limits background notifications based on all kinds of parameters. However if your app doesn't work on several devices then you did something wrong.