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.

Not getting the token in android release mode

See original GitHub issue

🐛 Bug Report

In android i am never getting the token if I follow this guideline in release mode:

            //If debug you should reset the token each time.
            #if DEBUG
              FirebasePushNotificationManager.Initialize(this,true);
            #else
              FirebasePushNotificationManager.Initialize(this,false);
            #endif

Expected behavior

Token is generated

Reproduction steps

This never gives me a token:

            //If debug you should reset the token each time.
            #if DEBUG
              FirebasePushNotificationManager.Initialize(this,true);
            #else
              FirebasePushNotificationManager.Initialize(this,false);
            #endif

But this does (true in release too):

            //If debug you should reset the token each time.
            #if DEBUG
              FirebasePushNotificationManager.Initialize(this,true);
            #else
              FirebasePushNotificationManager.Initialize(this,true);
            #endif

Configuration

Version: 3.3.10

Platform:

  • 📱 iOS
  • 🤖 Android
  • 🏁 WPF
  • 🌎 UWP
  • 🍎 MacOS
  • 📺 tvOS
  • 🐒 Xamarin.Forms

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:14

github_iconTop GitHub Comments

2reactions
stesviscommented, Oct 5, 2021

can be used with firebase right?

The firebase set up is the same, you will reuse the same Server API Key.

2reactions
stesviscommented, Oct 5, 2021

Folks as promised I switched to OneSignal: https://documentation.onesignal.com/docs/xamarin-sdk-setup The notifications work like a charm, there’s a lot less configuration on the Xamarin side and it’s easier to use, especially if you send notifications with action buttons. Highly recommended. I think this plugin is dead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FCM notifications working in release mode but *not* from ...
When I create a release apk and test it on my phone, notifications work. But when I upload an appbundle to the play...
Read more >
FCM not generating device token in Release mode using ...
Hi All, I am implementing Push notifications in Xamarin forms(Android). In Debug mode everything works fine. I am able to generate the token...
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 >
Authenticate with Google on Android - Firebase
Your server's client ID, not your Android client ID. ... get the user's Google ID token, exchange it for a Firebase credential, and...
Read more >
Notifications Not Shown - Mobile Push
Common reasons why Mobile Push notifications are not showing on your device. ... If your device is turned off, in airplane mode, has...
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