Android Question Dropbox NullPointerExeption

bus1963

Member
Licensed User
Longtime User
Hi hardworking volunteers.

Have a problem with my little program you want to download a Daten.csv in the dropbox.

The error occurs during the execution of the -> manager.FileUpload - line
Did the folder changed as well as the file itself ... does not help .. !!

The error message:

My Code:

B4X:
#Region  Project Attributes
    #ApplicationLabel: SQPM
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
  
Dim manager As DbxAccountManager  
Dim key As String = "x9t0ymypxxxxx"
Dim secret As String = "5xm9h1hdaxxxxxxx"

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private Button1 As Button

End Sub

Sub Activity_Create(FirstTime As Boolean)

        If FirstTime Then
            manager.Initialize(key, secret, "manager" ,True)
          End If

        Activity.LoadLayout("Main")

End Sub

Sub Manager_AccountReady (Success As Boolean)
  
    If Success Then

        ToastMessageShow("Link to Dropbox successfull ...",False )

        manager.UploadFile(File.DirDefaultExternal,"Svenner.txt","/","Svenner.txt")
        Msgbox("Daten gesendet","UP OK")
      
    Else
  
         ToastMessageShow("Unable to Link to Dropbox  ...",False )
      
    End If

End Sub

Sub Button1_Click

    manager.LinkAccount

End Sub

My Manifest-Code:


Here are the PMSQ file for testing:
I sit now been 3 days in this problem and can not find the error.
In advance thanks for the help.
 

Attachments

  • PMSQ.zip
    7.8 KB · Views: 277
Last edited:

bus1963

Member
Licensed User
Longtime User
Hello parijs,

I can only say ... thank you thank you thank you .. !!
It runs perfectly !! I still can not believe it.
I thank you that you have not given up ... now I can go on.

This is a really good forum and I thank all who have tried to help me.
1000 thanks

I'm happy ... thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…