Firestore fails to retrieve data after reconnecting to the Internet

后端 未结 4 697
臣服心动
臣服心动 2021-02-02 12:44

I\'m using Firestore with the Android SDK (11.6.2) and I\'m hitting an exception when my device was offline and reconnects to the Internet.

When requesting a document, f

4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-02 13:02

    this may help

    Java:

    FirebaseFirestore db = FirebaseFirestore.getInstance();
    
    //to reconnect
    db.terminate();
    db = FirebaseFirestore.getInstance();
    

    Kotlin:

    var db = Firebase.firestore
    
    //to reconnect
    db.terminate()
    db = Firebase.firestore
    

提交回复
热议问题