Private manager As DbxAccountManager
'Dropbox Initalization
Private DropboxKey As String = "myKey"
Private DropboxSecret As String = "mySecret"
manager.Initialize(DropboxKey, DropboxSecret, "manager")
manager.UploadFile(File.DirDefaultExternal & "/testfolder/",".nomedia","/",".nomedia")
manager.UploadFile(File.DirDefaultExternal,"Data.db", "/", "Data.db")
Error occurred on line: 63 (myapp)
java.lang.NullPointerException
at anywheresoftware.b4a.dropbox.DbxAccountManagerWrapper.getFile(DbxAccountManagerWrapper.java:147)
at anywheresoftware.b4a.dropbox.DbxAccountManagerWrapper.UploadFile(DbxAccountManagerWrapper.java:161)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:519)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:235)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:174)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:157)
at com.mycom.myapp.myapp.handleStart(myapp.java:68)
at com.mycom.myapp.myapp.onStartCommand(myapp.java:53)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2833)
at android.app.ActivityThread.access$2000(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1419)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
at dalvik.system.NativeStart.main(Native Method)
Yes ..@mangojack does this uploads file ?
Code:
manager.UploadFile(File.DirDefaultExternal,"Data.db", "/", "Data.db")
manager.UploadFile(file.DirRootExternal,"test.png","/","test.png")