Firebase Authentication on Android Foreground service

Multi tool use
up vote
0
down vote
favorite
I am using Firebase custom authentication on my Android app. When the user logs in, I generate a custom firebase token on my server and send it to the app. The app then uses this token to authenticate with Firebase.
However, after completing this authentication when I do
FirebaseUser firebaseUser = firebaseAuth.getCurrentUser();
in a foreground service, I get null.
Is the firebase authentication done on activity not valid in a service?


add a comment |
up vote
0
down vote
favorite
I am using Firebase custom authentication on my Android app. When the user logs in, I generate a custom firebase token on my server and send it to the app. The app then uses this token to authenticate with Firebase.
However, after completing this authentication when I do
FirebaseUser firebaseUser = firebaseAuth.getCurrentUser();
in a foreground service, I get null.
Is the firebase authentication done on activity not valid in a service?


take look at stackoverflow.com/questions/37661747/… this may helps you
– Ashvin solanki
2 days ago
I am not able to relate that question to my problem. It seems related to User's information not being present in the expected field. Can you please explain more on this?
– Pravesh Jain
2 days ago
It's impossible to see what's going wrong from rhat single line of code. The problem is likely in how you use it. Please have a look at how to create a complete, minimal, verifiable example.
– Frank van Puffelen
2 days ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am using Firebase custom authentication on my Android app. When the user logs in, I generate a custom firebase token on my server and send it to the app. The app then uses this token to authenticate with Firebase.
However, after completing this authentication when I do
FirebaseUser firebaseUser = firebaseAuth.getCurrentUser();
in a foreground service, I get null.
Is the firebase authentication done on activity not valid in a service?


I am using Firebase custom authentication on my Android app. When the user logs in, I generate a custom firebase token on my server and send it to the app. The app then uses this token to authenticate with Firebase.
However, after completing this authentication when I do
FirebaseUser firebaseUser = firebaseAuth.getCurrentUser();
in a foreground service, I get null.
Is the firebase authentication done on activity not valid in a service?




asked 2 days ago


Pravesh Jain
1,26231428
1,26231428
take look at stackoverflow.com/questions/37661747/… this may helps you
– Ashvin solanki
2 days ago
I am not able to relate that question to my problem. It seems related to User's information not being present in the expected field. Can you please explain more on this?
– Pravesh Jain
2 days ago
It's impossible to see what's going wrong from rhat single line of code. The problem is likely in how you use it. Please have a look at how to create a complete, minimal, verifiable example.
– Frank van Puffelen
2 days ago
add a comment |
take look at stackoverflow.com/questions/37661747/… this may helps you
– Ashvin solanki
2 days ago
I am not able to relate that question to my problem. It seems related to User's information not being present in the expected field. Can you please explain more on this?
– Pravesh Jain
2 days ago
It's impossible to see what's going wrong from rhat single line of code. The problem is likely in how you use it. Please have a look at how to create a complete, minimal, verifiable example.
– Frank van Puffelen
2 days ago
take look at stackoverflow.com/questions/37661747/… this may helps you
– Ashvin solanki
2 days ago
take look at stackoverflow.com/questions/37661747/… this may helps you
– Ashvin solanki
2 days ago
I am not able to relate that question to my problem. It seems related to User's information not being present in the expected field. Can you please explain more on this?
– Pravesh Jain
2 days ago
I am not able to relate that question to my problem. It seems related to User's information not being present in the expected field. Can you please explain more on this?
– Pravesh Jain
2 days ago
It's impossible to see what's going wrong from rhat single line of code. The problem is likely in how you use it. Please have a look at how to create a complete, minimal, verifiable example.
– Frank van Puffelen
2 days ago
It's impossible to see what's going wrong from rhat single line of code. The problem is likely in how you use it. Please have a look at how to create a complete, minimal, verifiable example.
– Frank van Puffelen
2 days ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53350320%2ffirebase-authentication-on-android-foreground-service%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
9jrqipqGK,MeyRZQlb9PJCdyW FHMx1Ef,jzwbrAOj15dCE9yZc N54o7gCadB,krj9w0KlGKO bDwT5NraEPvky
take look at stackoverflow.com/questions/37661747/… this may helps you
– Ashvin solanki
2 days ago
I am not able to relate that question to my problem. It seems related to User's information not being present in the expected field. Can you please explain more on this?
– Pravesh Jain
2 days ago
It's impossible to see what's going wrong from rhat single line of code. The problem is likely in how you use it. Please have a look at how to create a complete, minimal, verifiable example.
– Frank van Puffelen
2 days ago