firebase android app not working with mobile data

Viewed 6400

My Firebase Android app is not working whenever I connect with mobile data. All features such as auth, database and storage are unreachable. I am currently in India, using an Aircel sim. Is the problem from Firebase server or my network provider.

Error in logcat says:

Network error (such as timeout, interrupted connection or unreachable host) has occurred

Works on wifi though, dunno why

7 Answers

I got same kind of problem, (images are not downloading from Firebase Storage, over mobile data) using from Bangladesh.

So,I mailed it to 'Firebase' & they give me these solution, "Please, try to use a VPN, in similar cases like this it worked and reduced the scope of the issue."

Then, I used VPN with my Mobile data & everything worked fine. :)

In case, you are facing such problem you can simply go to mobile network >> access point names >> check GPRS button and try to change the access point names from the drop down list. Switch off your data and then on. You can reboot your phone if there is still any issue.

I solved it by activating the use of google play services mobile data, in configuration, apps, use of mobile data

I added the code below before declaring databaseReference and it worked well

/*Enable offline access to the data from the Cloud and synchronise when the network connection is established again*/
     
FirebaseDatabase.getInstance().setPersistenceEnabled(true);
        
Related