question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OnNotificationOpened fired but not completely execute in release & debug mode

See original GitHub issue

Hello,

Version Number of Plugin: 2.1.3 Device Tested On: Samsung A5 2017 Android Nougat Simulator Tested On: Version of VS: 15.4.4 Version of Xamarin: 2.4.0.282 Versions of other things you are using:

Everything works fine for this plugin except when handling open notification in release & debug mode (for Android only atm, did not test for iOS)

I configured everything as documented (in mainActivity, mainApplication, process intent and so), listening to the OnNotificationOpened in the OnStart() Method :


        CrossFirebasePushNotification.Current.OnNotificationOpened += async (s, p) =>
            {
                await PushNotificationService.ProcessReceivedPushNotificationAsync(p);
            };

Update : the event seems to be fired but it seems that in release & debug when my ProcessReceivedPushNotificationAsync is called and execute it does not wait until end of task and just leave the handler before the end of the execution

This is a dataMessage with ids stored in the Data Dictionary<>.

Wanted behavior : When a notification is received and the user clicks on it, process data sent and doing some work on the UI.

I can’t find out what’s going on as when I put break points it works, w/o it depends … sometimes it executes everything well, sometimes nothing happens …

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rdelrosariocommented, Jan 4, 2018

either OnStart or constructor should be good.

0reactions
vincentcastagnacommented, Jan 4, 2018

Okay, solved the prob … was a code of mine that was causing issue. I ran loadingService on UIThread but did not have any link with the prob too. Thanks for your fast support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OnNotification Work fine on Debug but not being called ...
Hi guys, Have the same issue, all events fires in debug mode, but not in release. However the notification displayed even in foreground....
Read more >
release mode error, but not in debug mode
When you run in Release, all bets are off. If your code is not correct, you're much more likely to crash in Release...
Read more >
App works in debug mode but not does work in release mode
Try running it in release mode on your device, you'll get logs. If you haven't done it before, the command is flutter run...
Read more >
Troubleshooting with Tag Assistant
The debug UI in the Tag Assistant window shows detailed information about your gtag() commands and hits, including how tags fired and what...
Read more >
Set debug and release configurations in Visual Studio
The release configuration of your program has no symbolic debug information and is fully optimized. For managed code and C++ code, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found