#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
Private manager As DbxAccountManager
Private key As String = "allo"
Private secret As String = "allo"
End Sub
Sub Globals
Dim Button1 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
manager.Initialize(key, secret, "Manager")
End If
End Sub
Sub Activity_Resume
manager.LinkAccount
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Manager_AccountReady (Success As Boolean)
Log("Account Ready: " & Success)
If Success Then
For Each FileInfo As DbxFileInfo In manager.ListFiles("/")
Log(FileInfo.Name & ", " & FileInfo.IsFolder)
Next
End If
manager.DownloadFile("/", "somefile", File.DirRootExternal, "somefile")
End Sub
Sub Manager_DownloadCompleted (Success As Boolean, LocalDir As String, LocalFileName As String)
Log("DownloadCompleted: " & Success)
End Sub
Sub Button1_Click
manager.linkAccount()
End Sub