TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
arvind baldaniya
NA
339
141.2k
Firebase onTokenRefresh() is not called
Mar 3 2017 12:42 AM
I can see the token using
FirebaseInstanceId.Instance.Token
and it display the generated token. But it seems like in my
MyFirebaseInstanceIDService
where it is extends to
FirebaseInstanceIdService
, the
onTokenRefresh()
is not called, where in this function it was said that the token is initially generated here. I needed to call
sendRegistrationToServer()
that's why I'm trying to know why it doesn't go in the
onTokenRefresh()
. but when i am uninstalling the appliction and installing again then it works fine, but it is not proper way to uninstall every time
My Code
[Service]
[IntentFilter(new[] { "com.google.firebase.INSTANCE_ID_EVENT" })]
public class ZFFirebaseIIDService : FirebaseInstanceIdService
{
const string TAG = "MyFirebaseIIDService";
public override void OnTokenRefresh()
{
var refreshedToken = FirebaseInstanceId.Instance.Token;
Log.Debug(TAG, "Refreshed token: " + refreshedToken);
SendRegistrationToServer(refreshedToken);
}
Reply
Answers (
2
)
expandable view in existing expandable view
Push Notification Not Working