Please provide an example, on how to perform background sync task if I were using GoogleSignIn + DriveClient
Our users have a chance to login, to authorize the app access to their Google Drive. We implement based on GoogleSignIn and DriveClient. (Not the yet another deprecated API GoogleApiClient)
https://developers.google.com/drive/android/auth
After the users quit the app, we would like to Google Drive sync process still work seamlessly in background, without further user/UI interaction. (Able to handle case when login token is expired/invalid after few days/hours)
May I know how to achieve so. Any code example is appreciated.
Hi Yan Cheng, we do not have a sample ready for you but in the meantime you can read the documentation here for creating a background service: https://developer.android.com/training/run-background-service/create-service
If you're using Kotlin, here's a related sample: https://github.com/googlesamples/android-JobScheduler
@yccheok Have you got any solution to do this?