You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
gcstang
8 years agoExplorer | Level 4
Dropbox API v2 session linked ?
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.
- 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/core/examples/android/DropboxClientFactory.java#L26 - 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#newBuilder-java.lang.String-
- Greg-DBDropbox StaffThe 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/core/examples/android/DropboxClientFactory.java#L26- gcstangExplorer | Level 4
In this example, is 'examples-v2-demo' anything specific or just some text?
DbxRequestConfig.newBuilder("examples-v2-demo")
- Greg-DBDropbox StaffThat 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#newBuilder-java.lang.String-
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 4 days agoIf 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 or Facebook.
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!