0
votes

I am having some issues with connecting dropbox to my app. I have printed the exception stack, and it shows that the error was caused by a dropboxunlinkedexception. I am not exactly sure what is wrong in my code. If anyone can take a look and help me figure out dropbox's API that would be great.

Full code: http://pastebin.com/2ZAZgwEC

Dropbox relevant code: http://pastebin.com/T2C1AiLz

1
I dont know about your problem but i fully recommend you to start searching on how to use the for loop!!! It will be very useful in your case based on your code lines... - Pavlos

1 Answers

0
votes

https://www.dropbox.com/developers/start/setup#android

I think documentation is very clear about what to do integrate dropbox in your application.

Does your manifest file contains

<activity
  android:name="com.dropbox.client2.android.AuthActivity"
  android:launchMode="singleTask"
  android:configChanges="orientation|keyboard">
  <intent-filter>
    <!-- Change this to be db- followed by your app key -->
    <data android:scheme="db-INSERT-APP-KEY-HERE" />
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.BROWSABLE"/>
    <category android:name="android.intent.category.DEFAULT" />
  </intent-filter>
</activity>

and also internet permission?

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

dropboxunlinkedexception occurs when you try to download or upload a file without successful login. Check authentication part here https://www.dropbox.com/developers/start/authentication#android and this should sort your problem