Firebase data save/retrieve stops working on Android after device sleeps for 3 minutes -
i using firebaserecycleradapter on android, , works great except 1 major issue - database updates stop functioning if sleep device 3 minutes or longer. unfortunately cannot reproduce debugger attached (or usb cable connected , watching logcat output).
the steps reproduce bug simple, , occur 100% of time using stock android firebase quickstart app found here: https://github.com/firebase/quickstart-android
repro steps:
- run app on device (i using android 5.1 tablet), verify can save post , write comments, works fine
- push power button on android device put device sleep
- wait 3 minutes (the bug not occur after 1 min or 2 mins, 100% reproducible after 3 mins)
- push sleep button again wake device , swipe view still running app.
- bug: cannot save posts or write comments, , have log out/in or force quit , restart app database functionality back.
i have tried following no luck:
- creating/destroying adapter in
onstop/onstart - added
completionlistener==>oncompletenever called - checked auth has current user via
firebaseauth.getinstance().getcurrentuser()==> does - checked exception in completion handler when getting user token call:
firebaseauth.getinstance().getcurrentuser().gettoken()(from advice stock overflow post, can't find link similar post: https://groups.google.com/forum/?hl=sl#!topic/firebase-talk/cje9ra_nwrw) ==> task successful, no exception
any ideas needed fix this?
Comments
Post a Comment