App Cordova Android - Firestore does not reestablish connection after the OS puts the app in Sleep mode

0

Develop an app with Cordova for Android and Firestore (v 4.12.1) to save documents. After Android puts the app in Sleep mode, when it returns to the foreground again, I can not read or create a document in Firestore, apparently the connection is lost. If I manually disable the connection to the Internet on my cell phone and then re-enable it, Firestore works again. Does anyone have any idea why this is happening and if there is a way to fix it?

Thank you very much!

    
asked by Fernando141 28.07.2018 в 03:35
source

1 answer

0

I found the reason and you have to see that I had the cell phone in battery saving mode, apparently in that case the OS does not keep the connection to Firestore. I will ask a new question with the corresponding tag, how to know from Cordova when Android is in saving mode. Thank you. Greetings

    
answered by 29.07.2018 в 00:00