Dropbox has dropped support for this API. It doesn't work anymore.
The iDropboxSync library allows you to use Dropbox Sync service to manage an app specific folder inside the user Dropbox account.
It is similar to B4A DropboxSync library: http://www.b4x.com/android/forum/threads/dropbox-sync-library.30112/
The user can easily access these files from any device or computer:
When the user runs the app for the first time they will be asked to grant access to your app. If Dropbox app is installed then the user only needs to click on the button. Otherwise they will need to log-in to their account.
You can see the authorization step in this video:
Using this library
1. You need to register an app with Dropbox that has access to a unique folder:
https://www.dropbox.com/developers/apps
You need to get two values: app key and app secret.
2. If you are using a local mac builder then you need to download the SDK to your Mac computer and copy Dropbox.framework to the Libs folder.
3. The authorization step happens outside of your app. To allow Dropbox app (or the browser) to return back to your app you need to add the following attribute:
Change the value after db- to your app key.
Application_OpenUrl will be called after the authorization step. You need to call manager.HandleOpenUrl:
The AccountReady event is raised when the account is ready or when there was a problem with linking the account.
Now you can download or upload files to the account and manage your app specific folder.
When you download a file the DownloadCompleted event is raised when the file is ready. Note that the library always checks that the file is up to date (similar to B4A AutoSync flag).
The iDropboxSync library allows you to use Dropbox Sync service to manage an app specific folder inside the user Dropbox account.
It is similar to B4A DropboxSync library: http://www.b4x.com/android/forum/threads/dropbox-sync-library.30112/
The user can easily access these files from any device or computer:
When the user runs the app for the first time they will be asked to grant access to your app. If Dropbox app is installed then the user only needs to click on the button. Otherwise they will need to log-in to their account.
You can see the authorization step in this video:
Using this library
1. You need to register an app with Dropbox that has access to a unique folder:
https://www.dropbox.com/developers/apps
You need to get two values: app key and app secret.
2. If you are using a local mac builder then you need to download the SDK to your Mac computer and copy Dropbox.framework to the Libs folder.
3. The authorization step happens outside of your app. To allow Dropbox app (or the browser) to return back to your app you need to add the following attribute:
B4X:
#UrlScheme: db-ret331arjio70t6
Application_OpenUrl will be called after the authorization step. You need to call manager.HandleOpenUrl:
B4X:
Private Sub Application_OpenUrl(Url As String, Data As Object) As Boolean
Log("openurl: " & Url)
manager.HandleOpenUrl(Url)
Return True
End Sub
The AccountReady event is raised when the account is ready or when there was a problem with linking the account.
Now you can download or upload files to the account and manage your app specific folder.
When you download a file the DownloadCompleted event is raised when the file is ready. Note that the library always checks that the file is up to date (similar to B4A AutoSync flag).
Attachments
Last edited: