|
FOROS PROFESIONALES WINDEV, WEBDEV y WINDEV Mobile |
| | | | | |
| WM2x Push Notifications issue |
| Iniciado por guest, 05,sep. 2017 17:20 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 05,septiembre 2017 - 17:20 |
Hi.
I have an Android App using Firebase Push Notifications at a day time. It works fine, when the notification arrive the app execute and show device notifications with procedure result. All perfect.
The problem is if i want execute the app from launcher (clicking the app icon) it doesn't open and the device log say:
09-05 17:14:10.335: E/StrictMode(2510): class com.clarionero.wm.boletinesoficiales.wdgen.GWDPBoletines_Oficiales$WDLanceur; instances=2; limit=1 09-05 17:14:10.335: E/StrictMode(2510): android.os.StrictMode$InstanceCountViolation: class com.clarionero.wm.boletinesoficiales.wdgen.GWDPBoletines_Oficiales$WDLanceur; instances=2; limit=1
How can i solve this issue?
If i use EndProgram after execute the Push Notifications then the app is launched with issues.
Thank you
Rubén |
| |
| |
| | | |
|
| | |
| |
| Publicado el 05,septiembre 2017 - 17:29 |
Hi,
There is a startupflag you can check to see if your program is launched normally or from pushnotification. This in order to manage the startup according.
bLaunchedFromPN is boolean = (ExeInfo(exeLaunch) = exePushNotification) (Find more details in the help)
It should normally be no problem in lauching your app (when it is not running) from an incoming push notification. Depending on the options inside the push notifications the app will start topmost or the app will start silently and then run the registered procedure to handle the content of the push notification.
When your app is already running, the registered procedure for push notifications is just run.
You have to make sure that the app can start (silently) when a push notification is arrived. And also when the user clicks on the app icon. When the application is already active, and the user presses the app icon, the application is just shown top most.
I have an app on Android, receiving lots of push notifications. So concept is working perfectly.
!! I Do run the Old GMC instead of Firebase at this moment. Still needs to 'upgrade' to firebase.
Hope this helps Danny |
| |
| |
| | | |
|
| | |
| |
| Publicado el 05,septiembre 2017 - 17:53 |
Hi Danny, thank you for your response.
I yet contemplate all your recommendations and Push works fine, it's very easy to implement it.
IF ExeInfo(exeLaunch) <> exePushNotification THEN // Executed by Launcher ... ... ... ELSE // Executed by Push ... ... ... END
The issue is when the push is executed and i show the notifictions to user. The app continue running by the notifications tu user and when i want open it from launcher then it doesn't open and show the errors in device log.
Rubén |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|