B4A Library Dropbox SDK V2 - Java

dropbox_blue.png



This is a wrap for the Dropbox JAVA SDK for Android.

It is a request for the community too to parcitipate to this project doing test or writing documentation for the objects.

List of connected Tutorials:
- Dropbox SDK V2 - Authentification
- Dropbox SDK V2 - Uploading big files to Dropbox
- Dropbox SDK - get informed about changes in the used Dropbox


DropboxV2
Comment:
The Dropbox library allows you to communicate with Dropbox
Author: DonManfred (wrapper)
Version: 0.42 (wraps the SDK dropbox-core-sdk-3.0.7)

Wrapped Objects so far
  • DbxAuth
  • DbxClientV2
  • DbxHost
  • Dimensions
  • DbxRequestConfig
  • DbxUserAuthRequests
  • DropboxV2
  • DbxUserFilesRequests
  • FileMetadata
  • FolderMetadata
  • FolderSharingInfo
  • GpsCoordinates
  • Mediainfo
  • MediaMetadata
  • Metadata
  • RelocationPath
  • DbxUserSharingRequests
  • MemberSelector
  • SharedFileMetadata
  • SharedFolderMetadata
  • SharedLinkMetadata
  • BasicAccount
  • FullAccount
  • DbxUserUsersRequests

The Download will always be here in Post #1 of the Thread.

Additional to the provided Library (xml and jar) you need to download:
1. dropbox-core-sdk-3.0.7 Copy the file to your additional libraries folder.
2. jackson-core-2.7.4.jar. Extract from the zip attached and copy the file to your additional libraries folder.


In the following posts i´ll add some more detailed info on the different Objects.
 

Attachments

  • jackson-core-2.7.4.jar.zip
    233.4 KB · Views: 610
  • DropboxV2V0.6.zip
    114.4 KB · Views: 82
Last edited:

Sabotto

Active Member
Licensed User
Please help me.

I downloaded and modified the project and downloaded the libraries
I'm getting an error here

B4X:
Sub Service_Create
    'This is the program entry point.
    'This is a good place to load resources that are not specific to a single activity.
    kvs.Initialize(File.DirDefaultExternal, "datastore2")
End Sub

Logger connesso a: LCL0218907002357
--------- beginning of crash
--------- beginning of system
--------- beginning of main
Copying updated assets files (1)
*** Service (starter) Create ***
Error occurred on line: 16 (Starter)
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (Sqlite code 14 SQLITE_CANTOPEN): Could not open database, (OS error - 2:No such file or directory)
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:231)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:213)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:553)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:215)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:204)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:948)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:927)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:818)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:765)
at anywheresoftware.b4a.sql.SQL.Initialize(SQL.java:44)
at b4a.example3.keyvaluestore._initialize(keyvaluestore.java:362)
at b4a.MioDropbox.starter._service_create(starter.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at b4a.MioDropbox.starter.onCreate(starter.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4521)
at android.app.ActivityThread.access$2600(ActivityThread.java:296)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2243)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8178)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
** Service (starter) Start **


What can it be?
These are the used librarie

1596269886636.png
 

netsistemas

Active Member
Licensed User
Longtime User
Permision?

or

i use this code:
and mayby, review this link:
'https://b4x.com/android/forum/threa...ory-file-dirdefaultexternal-not-exists.93099/

B4X:
Sub RutaDBCorrecta() As String
Dim TargetDir As String

'https://b4x.com/android/forum/threads/no-such-file-or-directory-file-dirdefaultexternal-not-exists.93099/


If File.ExternalWritable  Then'
    'Private rp As RuntimePermissions
    TargetDir =  Starter.rp.GetSafeDirDefaultExternal("") ' File.DirDefaultExternal
Else
    TargetDir = File.DirInternal
End If

Return TargetDir
End Sub

in starter i have this code:

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Public rp As RuntimePermissions


    
    
End Sub
 

DonManfred

Expert
Licensed User
Longtime User
What can it be?
Permission problem.
Change the initialisation of the KVS used. Set the path to File.DirInternal.

For any other problem please create a NEW thred in ther Questionsforum.
Posting to existing threads is a mistake.
 

Pr@do

New Member
View attachment 51210


This is a begin of a wrap for the Dropbox JAVA SDK
In fact v0.4 is a decompiled v0.28 library. I did changed it then to be able to compile it again. In my tests all is working now (all what i tested :D). The Library is still beta. But i´m now able to change things again ;-)

It is a request for the community too to parcitipate to this project doing test or writing documentation for the objects.

List of connected Tutorials:
- Dropbox SDK V2 - Authentification
- Dropbox SDK V2 - Uploading big files to Dropbox
- Dropbox SDK - get informed about changes in the used Dropbox


DropboxV2
Comment:
The Dropbox library allows you to communicate with Dropbox
Author: DonManfred (wrapper)
Version: 0.42 (wraps the SDK dropbox-core-sdk-3.0.7)

Wrapped Objects so far
  • DbxAuth
  • DbxClientV2
  • DbxHost
  • Dimensions
  • DbxRequestConfig
  • DbxUserAuthRequests
  • DropboxV2
  • DbxUserFilesRequests
  • FileMetadata
  • FolderMetadata
  • FolderSharingInfo
  • GpsCoordinates
  • Mediainfo
  • MediaMetadata
  • Metadata
  • RelocationPath
  • DbxUserSharingRequests
  • MemberSelector
  • SharedFileMetadata
  • SharedFolderMetadata
  • SharedLinkMetadata
  • BasicAccount
  • FullAccount
  • DbxUserUsersRequests

The Download will always be here in Post #1 of the Thread.

Additional to the provided Library (xml and jar) you need to download:
1. dropbox-core-sdk-3.0.7 Copy the file to your additional libraries folder.
2. jackson-core-2.7.4.jar. Extract from the zip attached and copy the file to your additional libraries folder.


In the following posts i´ll add some more detailed info on the different Objects.
Hi, I'm researching how to develop an Android app that reads and writes some files from my Dropbox.
The app in question would only be used for my Dropbox and therefore I would like to use only my app tocken for authentication.
From the following forum I read about using the DropboxV2V0.44 library, the jackson-core-2.7.4.jar and dropbox-core-sdk-3.0.7 (which is obsolete today).
Are these files still valid for my app?
Thank you and good day.
 

DonManfred

Expert
Licensed User
Longtime User
Do you intend to modify the DropboxV2.xml file by replacing "dropbox-core-sdk-3.0.10" with "dropbox-core-sdk-4.0.1" or "dropbox-core-sdk-5.0.0"?
You can do it by yourself- It is one line to edit in the xml.
I don´t know whether i tested it with the v5 jar or not.
With v4 i am working with the lib.

For any other question/issie; please create a new thread in the questionsforum.
 

NGUYEN TUAN ANH

Active Member
Licensed User
View attachment 51210


This is a wrap for the Dropbox JAVA SDK for Android.

It is a request for the community too to parcitipate to this project doing test or writing documentation for the objects.

List of connected Tutorials:
- Dropbox SDK V2 - Authentification
- Dropbox SDK V2 - Uploading big files to Dropbox
- Dropbox SDK - get informed about changes in the used Dropbox


DropboxV2
Comment:
The Dropbox library allows you to communicate with Dropbox
Author: DonManfred (wrapper)
Version: 0.42 (wraps the SDK dropbox-core-sdk-3.0.7)

Wrapped Objects so far
  • DbxAuth
  • DbxClientV2
  • DbxHost
  • Dimensions
  • DbxRequestConfig
  • DbxUserAuthRequests
  • DropboxV2
  • DbxUserFilesRequests
  • FileMetadata
  • FolderMetadata
  • FolderSharingInfo
  • GpsCoordinates
  • Mediainfo
  • MediaMetadata
  • Metadata
  • RelocationPath
  • DbxUserSharingRequests
  • MemberSelector
  • SharedFileMetadata
  • SharedFolderMetadata
  • SharedLinkMetadata
  • BasicAccount
  • FullAccount
  • DbxUserUsersRequests

The Download will always be here in Post #1 of the Thread.

Additional to the provided Library (xml and jar) you need to download:
1. dropbox-core-sdk-3.0.7 Copy the file to your additional libraries folder.
2. jackson-core-2.7.4.jar. Extract from the zip attached and copy the file to your additional libraries folder.


In the following posts i´ll add some more detailed info on the different Objects.
Dear Sir,
I have successfully connected my B4A application to Dropbox, and in my code I have copied my test.txt file into the Dropbox folder, but I don't know how in the runtime code how to share the test.txt file and get the url link to the shared test.txt file for me send to my friend, in my runtime code. Could you please help me do this,
PS: I used code:
B4X:
Dim SST As SharedLinkSettings
SST.Initialize("PUBLIC","",DateTime.DateParse("01/01/2050"))
dbxSharing.createSharedLinkWithSettings("/TT1/test.txt",SST)
But I don't know how to get url of share file
thank you very much.!
Best Regards
 
Last edited:
Top