Dropbox Sync Library

freedom2000

Well-Known Member
Licensed User
Longtime User
The Try / Catch block will most probably not work here as this error is considered a critical error.

You need to add these folders from the SDK to DropboxSync jar:

@Erel Thank you for your precious help

So what I did :
1) download the dropbox sync lib : https://www.dropbox.com/developers/sync/sdks/android
2) open it and copy the proposed folders with 7zip into the DropBoxSync.jar in B4A libraries folder
Dropbox_sync_lib_bug.jpg


I will see if it corrects the crash :)
 

freedom2000

Well-Known Member
Licensed User
Longtime User
See the answer here: http://stackoverflow.com/questions/20417027/dropbox-sync-api-unsatisfied-link-error

Seems like you will need to copy the arm file to the two other folders if you add the x86 file.
Thank you Erel for this answer

I have thus copied the Armeabi/libDropboxSync.so file into a newly created Armeabi-V7a folder.

bug_dropbox.jpg


I am not sure of the result and can't test it...
With my Nexus 5 everything was Ok since the beginning
Anytime I add a new dropboxSync.so file, my Apk increases by 1MB ... that's a pity :confused:
 

msucho

Member
Licensed User
Longtime User
Hi Erel:
I was trying to use DropBox library for an application and I always get this error:
···························································································································
** Activity (main) Resume **
** Service (backgeo) Create **
Error occurred on line: 43 (backgeo)
java.lang.RuntimeException: java.lang.NullPointerException
at anywheresoftware.b4a.dropbox.DbxAccountManagerWrapper.LinkAccount(DbxAccountManagerWrapper.java:96)
at b4a.wifilocation1.backgeo._service_create(backgeo.java:215)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:636)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:302)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:158)
at b4a.wifilocation1.backgeo.onCreate(backgeo.java:45)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2687)
at android.app.ActivityThread.access$1700(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1404)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
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:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at anywheresoftware.b4a.dropbox.DbxAccountManagerWrapper.LinkAccount(DbxAccountManagerWrapper.java:94)
... 22 more
·····························································································································································
Where could be the problem?

Thank's in advance.

Marcelo
 

GMan

Well-Known Member
Licensed User
Longtime User
What line initialized that error ?
Try to run in Debug-Mode to get the exact code line

May be better you post your code that we have a look at it...
 

msucho

Member
Licensed User
Longtime User
I will try.
One more question:
If I write mi app like a service on boot phone scenario, can I use the dropboxsync to store the data?

Thank you very much.
 

msucho

Member
Licensed User
Longtime User
Amazing!!!
It works perfect from the activity.
Thank you for the quick answers.

PD:
I have note I posted mi app containing the key and secret dropbox developer keyd. Sorry
I will delete only this post.

Marcelo
 

ValDog

Active Member
Licensed User
Longtime User
Erel,

"2. Copy the attached wrapper files to the libraries folder."



What are the "wrapper files?"
 

tsteward

Well-Known Member
Licensed User
Longtime User
Hello Erel,
Is there a way list the files that need downloading? Ie aren't in sync with the local files.

When requesting to download a file (with Autosync set to True) is the file still downloaded even if it is the same as the local file.

Procedure flow to download files?
Manager.Sync
then inside sub Manager_SyncCompleted is where you might do Manager.DownloadFile(.....)

Have I got that right?

Thanks Heaps
 

tsteward

Well-Known Member
Licensed User
Longtime User
To to make it clear currently I do this
B4X:
For Each FileInfo As DbxFileInfo In DBoxManager.ListFiles("/")
            DBoxManager.DownloadFile("/", FileInfo.Name, DBFileDir, FileInfo.Name)
        Next
This downloads all files. (There are only files no folders)
I really only want to download the files necessary. Either missing or not up to date.
 

Steini1980

Active Member
Licensed User
Longtime User
Thank you Erel for the great Library, but how can I delete files stored on DropBox Account?
I want to delete the already downloaded files on my account, I use it only for data transfer.
 
Top