Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

Please provide an example, on how to perform background sync task if I were using GoogleSignIn + DriveClient #77

Open
yccheok opened this issue May 20, 2018 · 2 comments

Comments

@yccheok
Copy link

yccheok commented May 20, 2018

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.

@asrivas
Copy link
Contributor

asrivas commented May 24, 2018

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

@parmarravi
Copy link

@yccheok Have you got any solution to do this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants