Android Programming Press on the image to return to the main documentation page.

DropboxSync

List of types:

DbxAccountManager
DbxFileInfo

DbxAccountManager


Permissions:

android.permission.INTERNET
android.permission.ACCESS_NETWORK_STATE

Events:

AccountReady (Success As Boolean)
SyncCompleted (Success As Boolean)
DownloadCompleted (Success As Boolean, LocalDir As String, LocalFileName As String)

Members:


  AutoSync As Boolean

  DownloadFile (RemoteDir As String, RemoteFile As String, LocalDir As String, LocalFile As String)

  Initialize (AppKey As String, AppSecret As String, EventName As String)

  LinkAccount

  ListFiles (Dir As String) As List

  Sync

  UnlinkAccount

  UploadFile (LocalDir As String, LocalFile As String, RemoteDir As String, RemoteFile As String)

Members description:

AutoSync As Boolean
If True then the cache will be synchronized automatically when a file is downloaded to assure that the latest file is downloaded.
DownloadFile (RemoteDir As String, RemoteFile As String, LocalDir As String, LocalFile As String)
Downloads a file. If the file is not already in the cache then it will be automatically downloaded.
The DownloadComplete event will be raised when the local file is ready.
RemoteDir / RemoteFile - Remote path. The root folder (which is the app folder) is "/".
LocalDir / LocalFile - The local file.
Initialize (AppKey As String, AppSecret As String, EventName As String)
Initializes the object.
AppKey - The app key from Dropbox developer console.
AppSecret - The app secret from Dropbox developer console.
EventName - Sets the subs that will handle the events.
LinkAccount
Links the application with the user's Dropbox account.
If the account was not linked before then the user will be shown an authentication form.
The AccountReady event will be raised when the account is ready.
ListFiles (Dir As String) As List
Returns a List with the infos of the files and folders under the given path.
Each item in the list is a DbxFileInfo object.
Sync
Forces a check for new file info from the server. The SyncCompleted event will be raised when the sync is completed.
UnlinkAccount
Unlinks the application from the user's Dropbox account.
UploadFile (LocalDir As String, LocalFile As String, RemoteDir As String, RemoteFile As String)
Writes a file to the local Dropbox cache. The file will be automatically uploaded to the Dropbox account.
LocalDir / LocalFile - Path to the local file.
RemoteDir / RemoteFile - Remote path. The root folder (which is the app folder) is "/".

No event is raised after this action.

DbxFileInfo


Events:

None

Members:


  IsFolder As Boolean [read only]

  IsInitialized As Boolean

  ModifiedTime As Long [read only]

  Name As String [read only]

  Size As Long [read only]

Members description:

IsFolder As Boolean [read only]
Tests whether this is a folder.
IsInitialized As Boolean
ModifiedTime As Long [read only]
Returns the last modified time based on the local device system clock.
Name As String [read only]
Returns the file or folder name.
Size As Long [read only]
Returns the file size in bytes.
Top