cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Api V1 to V2 migration difficulties

Api V1 to V2 migration difficulties

JeremyConnor
Explorer | Level 4
Go to solution

I'm the maintainer for an app with dropbox API v1 integration with about 4000 daily requests to DropBox (has been working well for nearly 2 years and I've been hands free on it). I realise I've got to support V2 in the impending future, and I've been attempting to do just that but I'm having a great deal of trouble getting a hello-world implementation of V2 on android to just work out of the box; it's been surprisingly difficult.

 

In particular I've found triggering the user to authenticate the DropBox App (new instance to support API 2 since File permissions is deprecated) via OAuth to be difficult; the diagrams are great for understanding the flow, but not very helpful as a consumer of the java API.. 

 

I've downloaded the demo application (https://github.com/dropbox/dropbox-sdk-java/tree/master/examples/android) and after much fiddling have the android project open and close to running, but I couldn't get the dependency for dropbox-core-sdk to gradle sync, which prevents me running it and getting a better understanding of the workflow, especially around users authenticating my DropBox app to view their content.

 

compile group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '0-SNAPSHOT', changing: true

 

Replacing the above with this below line doesn't help, as a multitude of classes are not found in the OpenWithActivity class (e.g. DbxOfficialAppConnector, DropboxParseException, DropboxUidNotInitializedException).

 

compile 'com.dropbox.core:dropbox-core-sdk:2.1.1'

I'm sure I've missed something obvious and I know this will be the first step on the V2 road; but any help would be appreciated.

 

Cheers

Jeremy

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Hi Jeremy, the "0-SNAPSHOT" configuration would be used if you're building the SDK from source locally, but that's not strictly necessary.

 

You should be able to install a specific version via gradle as you mentioned. In the gradle setup that you posted though, you appear to be trying to load an older version of the SDK (v2.1.1). Can you try the latest version (v3.0.3), as shown here, and let me know if that doesn't help?

 

https://github.com/dropbox/dropbox-sdk-java#setup

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

Hi Jeremy, the "0-SNAPSHOT" configuration would be used if you're building the SDK from source locally, but that's not strictly necessary.

 

You should be able to install a specific version via gradle as you mentioned. In the gradle setup that you posted though, you appear to be trying to load an older version of the SDK (v2.1.1). Can you try the latest version (v3.0.3), as shown here, and let me know if that doesn't help?

 

https://github.com/dropbox/dropbox-sdk-java#setup

JeremyConnor
Explorer | Level 4
Go to solution

Thank you; much appreciated! It had been a long day; I posted at midnight as I gave up and dragged myself off to bed  😛

Need more support?
Who's talking

Top contributors to this post

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