Skip to content Skip to sidebar Skip to footer

Firebase Authentication Is Not Working While The Background Data Is Restricted

Currently I am working on an android app which is based on firebase firestore. I am using firebase auth 15.0.0 for login. But login doesn't work if background data is restricted. I

Solution 1:

Background data is now very restrictive. Some phone can set it in the APP's settings, like my Xiaomi. But that is very manual and can't be a real solution.

Proper way is to use Firebase Cloud Messaging, which keeps a so-called weak-socket-connection. This way saves battery.

The cloud messaging can contain message < 2k, if your message is above that limit, you can create a notification to notify user to wake up your application, and use fore-ground data.

Post a Comment for "Firebase Authentication Is Not Working While The Background Data Is Restricted"