Hi Everyone ๐Ÿ‘‹๐Ÿผ,

I'm in a bit of a pickle, hopefully someone can provide some guidance.

I have stale Firebase notification tokens in a database for an existing Xamarin application, initially (years back) the application never contained logic to refresh notification tokens.

With the most recent update to the application a background job was implemented with the intention of refreshing tokens, the problem is refreshing existing stale tokens, it doesn't seem that the job runs automatically after the application update is installed (I know this may seem dumb to the more experienced dev, please excuse me).

Technical information:

I've made use of Shiny.Jobs to implement the background job.
I'm currently using Xamarin version number 4.8.0.1451

Recommended Answers

All 4 Replies

Is there absolutely no way of having this issue resolved?

I wish I could offer you some assistance, but unfortunately this topic is completely outside my wheelhouse. Iโ€™m sorry. :(

Iโ€™ll tweet your post and see if someone on my social comes to your rescue.

commented: Thanks for trying Dani, it seems I may have to look else where for guidance +6

Technical information:
I've made use of Shiny.Jobs to implement the background job.
I'm currently using Xamarin version number 4.8.0.1451

To refresh existing stale Firebase notification tokens in a Xamarin application using Shiny.Jobs, you can follow these steps: Create a new Shiny.Jobs job to refresh the tokens.
In the job, use the FirebaseMessaging.Instance.GetTokenAsync() method to get the current token.
If the token is stale, refresh it using the FirebaseMessaging.Instance.RefreshTokenAsync() method.
Update your database with the new token.
Maybe this can help

To refresh existing stale Firebase notification tokens in a Xamarin application using Shiny.Jobs, you can follow these steps: Create a new Shiny.Jobs job to refresh the tokens.
In the job, use the FirebaseMessaging.Instance.GetTokenAsync() method to get the current token.
If the token is stale, refresh it using the FirebaseMessaging.Instance.RefreshTokenAsync() method.
Update your database with the new token.
Maybe this can help

Thank you for your response ๐Ÿ‘Œ๐Ÿผ, I've basically done what you suggested, not precisely, but essentially, even then if I did, the problem that still remains is, the job hadn't existed before, how is it going to run after an application update if the user with a stale device token doesn't open the application?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.