how to upload offline clicked photos ,after restarting mobile in android firebase -
i facing issue uploading photos in firebase storage in particular scenario. example, have clicked 10 photos in offline mode , mobile goes switched off when switched on mobile again lost photo path using uploading photos on firebase, when mobile didn't switch off photo uploading working fine.
i doing way https://www.simplifiedcoding.net/firebase-storage-tutorial-android/
you need maintain persistent storage (e.g. sqlite database) store pending operations takes longer time , depends upon many circumstances (e.g. network availability, whether activity killed etc). can maintain flag there upload status is, example, set "pending" when user clicked photo , changed "done" on upload success (or can erased) in onsuccesslistener.
and each time when device starts, application starts or dependent circumstances changes back, upload status database need checked whether there pending work.
using dedicated service whole process reliable.
have of handling firebase transactions offline , across device restarts:
Comments
Post a Comment