cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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: 

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!

View solution in original post

Who's talking

Top contributors to this post

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