cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to make sure we keep you updated on the ideas that other users have shared here on the Community? Us too! Check them out over here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1
Ask
2
Comments

How to stop folder access prompt appearing every time?

How to stop folder access prompt appearing every time?

SparkyNZ
Helpful | Level 5

Is it possible to configure or code my Android app so that the below prompt doesn't appear every single time I restart my app?

 

enter image description here

 

I only have the one API call below and yet I see the above prompt every single time I start my app.

 

Auth.startOAuth2Authentication( gContext, APP_KEY );

 

Surely there must be a way to code or configure an app so that this doesn't appear every single time?

1 Accepted Solution

Accepted Solutions

Re: How to stop folder access prompt appearing every time?

SparkyNZ
Helpful | Level 5
I've solved this problem myself. I don't need to call the below line every startup:

Auth.startOAuth2Authentication( gContext, APP_KEY );

Once I get an access token, I can store that for subsequent program restarts and create a DbxClientV2 by using that saved token.

DbxRequestConfig config = new DbxRequestConfig( "dropbox/sample-app" );
DbxClientV2 client = new DbxClientV2( config, savedToken );

No more auth screen, yay!

View solution in original post

1 Reply 1

Re: How to stop folder access prompt appearing every time?

SparkyNZ
Helpful | Level 5
I've solved this problem myself. I don't need to call the below line every startup:

Auth.startOAuth2Authentication( gContext, APP_KEY );

Once I get an access token, I can store that for subsequent program restarts and create a DbxClientV2 by using that saved token.

DbxRequestConfig config = new DbxRequestConfig( "dropbox/sample-app" );
DbxClientV2 client = new DbxClientV2( config, savedToken );

No more auth screen, yay!
Who's talking

Top contributors to this post

  • User avatar
    SparkyNZ Helpful | Level 5
What do Dropbox user levels mean?
Need more support?