I want to save user's data in the background but I don't understand how to connect to the Drive API without user interaction.
From my understanding after the first connect
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstance);
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
}
I'd like to obtain a refresh token which I will use later on to get an access token which I'll use to connect to the API and save user's data. It doesn't look feasible with Drive API for Android
Also I'll appreciate if somebody points me towards how do it it the right way!