0
votes

I am using Android Studio and Dropbox Sync API to read files from Dropbox. I am struggling to implement the instructions at the official Dropbox site for SYNC API.

Can someone show me the steps and the java code which reads a simple .txt file from Dropbox which has the text Hello World!.

https://www.dropbox.com/developers/sync/start/android

Thanks in advance.

1
Have you written any code? - Dejan
I have but i am stuck at linking account and creating the dbxfile system. That's why i want help from someone to show me a simple read .txt file(Hello World!) from Dropbox. - kanun
This is complete tutorial here you posted. Have you imported libraries and installed SDK properly? - Dejan
Yes i did. I am sure about it. But i still have error when i put DbxFileSystem dbxFs = DbxFileSystem.forAccount(mDbxAcctMgr.getLinkedAccount()); it says unhandled exception. Unauthorized. - kanun
What error? Please post it here. - Dejan

1 Answers

-1
votes

You must catch all the missing catches, eg

catch(DbxException.Unauthorized unauthorized) { }
catch (DbxPath.InvalidPathException e) { }
catch (DbxException e) {     }
catch (IOException e) {     }

Then you can compile this section :-)