B4A Class Dropbox API V2. All HTTP! All using httputils2

georgelbs

Member
Licensed User
Longtime User
Hello DonManfred, I have exactly the same problem that divinglog reported in Post #71

"When I download large files (around 50 MB, sometimes less), my app is closed by Android because of an OutOfMemoryError. Is there a workaround for this problem? "
 

Paulsche

Well-Known Member
Licensed User
Longtime User
Can i change the date and time format from Metadata server_modified to german format ?
 

Paulsche

Well-Known Member
Licensed User
Longtime User
I want to download all files in a folder and then exit the app.
How can I ensure that all files have been downloaded before the APP
is terminated?
 

Paulsche

Well-Known Member
Licensed User
Longtime User
I want to download all files in a folder and then exit the app.
How can I ensure that all files have been downloaded before the APP
is terminated?
Is there really no solution to this?
 

Paulsche

Well-Known Member
Licensed User
Longtime User
Get the list of all files.
create a queue
download first item
when finish get the next item from queue and download

You need to do it by yourself. There is no such method in dropbox at all.
How do I know when the download is finish ?
 

jpvniekerk

Active Member
Licensed User
Longtime User
I've read through this whole thread and I'm still confused (or just being stupid!), but I am looking to do the following in an app:
I want to let the user create a backup of the data and then send it to himself (or anyone else) as an email attachment, or to HIS DropBox. The email part is working, but I'm not sure how to accomplish the dropbox part. I've seen a lot of comments and snippets for this, but I'm having problems getting it all together!
Can someone please give me a simple (but detailed!) example of how to do this: Save a file to the user's dropbox.

Help will be much appreciated!!!
 

DonManfred

Expert
Licensed User
Longtime User

jpvniekerk

Active Member
Licensed User
Longtime User

jpvniekerk

Active Member
Licensed User
Longtime User
Thanks.

I've got it working (basically!). I'm trying to get my own client ID - it works with the one in your sample, but I assume it's yours and I don;t want to use it in my app. I can't find a client id anywhere on the dropbox developer area... Help!!!
 

jpvniekerk

Active Member
Licensed User
Longtime User
Got it...
I found out I must use the app key for the client ID! Why can't they call it the same???
 

RafaelC

Member
Licensed User
Hi, Don

I am trying your DropboxV2_library. It works very well if I use my Dropbox Generated Access Token and –as intended- allows me to access all the folders in my Dropbox.

Now, I’d like to allow access to a single folder, which I have already specified as “Permission folder: App folder” in the Dropbox console.

I understand that it can be done using the ClientId and Secret parameters, but could not find any example of where and how to do it. Could you please post a simple example of how to use the lib with these two parameters. Thanks
 

DonManfred

Expert
Licensed User
Longtime User
in the Dropbox console
I dont understand. You did create another app and set this app to use only the app´s folder?

Your request sounds like you want to use just the files and folders inside the apps folder, not the complete dropbox.

- Create a new app in dropbox console and set its Permissions to App folder. (i guess you already did)
- Get the App key for this app

Permission type
App folder

App folder name
b4aDrop

App key
xxxxxxxxx

App secret
Show

Use this AppKey in your b4a app then.
 

RafaelC

Member
Licensed User
Yes. It is exactly as you say.


In order to clarify a little my question I have performed some batches of tests as follows:


1.- First, I Set up two Dropbox Apps on the Dropbox Console:

ICR1 as a Full Dropbox

ICR2 as an App Dropbox


2.- I wrote down their App keys as well as their generated access tokens. For the sake of clarity let’s say that they are:

ICR1 AppKey=”11111” Access token = “AAAAA” Secret=”ssss1”

ICR2 AppKey=”22222” Access token = “BBBBB” Secret=”ssss2”


3.- I performed several tests of Uploading/Downloading files for the two apps. Only one initialization and uploading or downloading operation every time:

dbx.Initialize(Me,"DropBox", “11111”, True)

dbx.Upload("/storage/extSdCard/Android/data/b4a.example/files","Test.pdf","/","MyUploadFromICR1.Pdf")

or, the download:

dbx.Download("/Aplicaciones/ICR1/DownloadTestICR1.txt", "/storage/extSdCard/Android/data/b4a.example/files", "MyDownloadFromICR1.Txt")


4.- I repeated the tests for both Apps (FullDropbox and AppDropbox), using each time its corresponding AppKey


5.- The results I got are:


a) Every attempt to Initialize with the AppKey (“11111” or “22222” failed with a message "The given OAuth2 access token is malformed". That happened for both Apps ICR1 and ICR2


b) Every attempt to Initialize using the Generated Access Token “AAAAA” or “BBBBB” in place of my AppKey was successful both in upload and download.

That would be fine, except for the fact that it allows access to all my Dropbox, not just the two ICR1 and ICR2 folders.


c) I didn’t find any use of the “secret” keys. I wonder what are the for,


Obviously, I am doing something wrong but I can’t imagine what. That’s why I asked if you could provide an short example of how to perform both basic operations Up/download in Dropbox

Please, excuse this long post
 

DonManfred

Expert
Licensed User
Longtime User
Please create a NEW Thread in the questions forum for each issue you have.
I´ll not try to read the post

short example of how to perform both basic operations Up/download in Dropbox
Crawl this thread. A sample is somewhere.
Even for Authentification to the users dropbox.

ICR1 as a Full Dropbox

ICR2 as an App Dropbox
You can not use both in ONE app. You app is tied to one of the dropbox-apps. See manifest and the key you need to use.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…