Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Holger K.
9 years agoNew member | Level 2
Possible API v2 bug on revoking token
I am using the java sdk example and I noticed that when revoking the token via https://www.dropbox.com/account#security the example is stuck with an error.
This is because it continues to use the o...
Holger K.
9 years agoNew member | Level 2
I made the following changes to the example:
Every:
"An error has occurred"
changed to
"An error has occurred: " + e.getMessage()
In UserActivitiy.java I changed loadData to
protected void loadData() {
new GetCurrentAccountTask(DropboxClientFactory.getClient(), new GetCurrentAccountTask.Callback() {
@Override
public void onComplete(FullAccount result) {
((TextView) findViewById(R.id.email_text)).setText(result.getEmail());
((TextView) findViewById(R.id.name_text)).setText(result.getName().getDisplayName());
((TextView) findViewById(R.id.type_text)).setText(result.getAccountType().name());
}
@Override
public void onError(Exception e) {
Log.e(getClass().getName(), "Failed to get account details.", e);
SharedPreferences prefs = getSharedPreferences("dropbox-sample", MODE_PRIVATE);
prefs.edit().putString("access-token", null).apply();
}
}).execute();
}
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!