cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

How to stop folder access prompt appearing every time?

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
Highlighted

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

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
Highlighted

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

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

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?