cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We are making some updates so the Community might be down for a few hours on Monday the 11th of November. Apologies for the inconvenience and thank you for your patience. You can find out more 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: 

Dropbox API v2 session linked ?

Dropbox API v2 session linked ?

gcstang
Explorer | Level 4
Go to solution

How do I migrate this to the v2 Core API?

 

DropBoxUtils.mDBApi.getSession().isLinked()

I previously had been using dropbox-android-sdk-1.6.3 but I don't see anything that allows me to check this status in the core api v2 for Dropbox.

 

 

2 Accepted Solutions

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
The API v2 Java SDK works a little differently than the v1 SDK, so there isn't a direct equivalent. The isLinked method could be called on the Session object to determine if it had an access token, but the v2 SDK doesn't have an equivalent session object.

Instead, you can should just check if you have a DbxClientV2 object. The DbxClientV2 is constructed using the access token in the first place.

You can see how the example app does this here:

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/java/com/dropbox/c...

View solution in original post

Greg-DB
Dropbox Staff
Go to solution
That should be a string that identifies your app, generally your app name and app version. You can find more information here under newBuilder:

https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/DbxRequestConfig.html#ne...

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution
The API v2 Java SDK works a little differently than the v1 SDK, so there isn't a direct equivalent. The isLinked method could be called on the Session object to determine if it had an access token, but the v2 SDK doesn't have an equivalent session object.

Instead, you can should just check if you have a DbxClientV2 object. The DbxClientV2 is constructed using the access token in the first place.

You can see how the example app does this here:

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/android/src/main/java/com/dropbox/c...

gcstang
Explorer | Level 4
Go to solution

In this example, is 'examples-v2-demo' anything specific or just some text?

DbxRequestConfig.newBuilder("examples-v2-demo")

Greg-DB
Dropbox Staff
Go to solution
That should be a string that identifies your app, generally your app name and app version. You can find more information here under newBuilder:

https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/DbxRequestConfig.html#ne...
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    gcstang Explorer | Level 4
What do Dropbox user levels mean?