Android Question Can't connect to my DropBox app

Fab117

Member
Licensed User
Longtime User
Hi,

With the help of Klaus, I successfully used Erel's tuto (https://www.b4x.com/android/forum/threads/dropbox-sync-library.30112/) to synchronize my files in a DropBox folder.

In a new application that I am developing, I wanted to repeat this in a new Dropbox folder (same account, but different folder to store the files).

But it doesn't work.

When it reads:

manager.Initialize(key, secret, "manager")

There is an error message:




I don't understand why.

I checked carefully the parameters:




but it is very similar (except App Key & secret for sure) to what I did successfully with my previous application:





Then, I started a new application only with Erel's code (attached to this message), but it is still the same.


Do someone know why it is not working?


Thank you for your support.

Fab
 

Attachments

  • DropBox01.zip
    7.5 KB · Views: 153

Mahares

Expert
Licensed User
Longtime User
You are missing this code in the Manifest Editor:
B4X:
AddApplicationText(
<activity android:name="com.dropbox.sync.android.DbxAuthActivity" />
<activity
  android:name="com.dropbox.client2.android.AuthActivity"
  android:launchMode="singleTask" >
  <intent-filter>
    <data android:scheme="db-wkyhfc3zf3q5pfl" /> <!-- NEED TO UPDATE key here -->
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.BROWSABLE" />
    <category android:name="android.intent.category.DEFAULT" />
  </intent-filter>
</activity>
<service
  android:name="com.dropbox.sync.android.DbxSyncService"
  android:enabled="true"
  android:exported="false"
  android:label="Dropbox Sync" />
  )

The API Sync is being deprecated ( Annulee) by Dropbox. See this link:
https://www.dropbox.com/developers-v1/sync
You need to start using the new API v2 library developed by the magnificient Manfred Ssykor aka @DonManfred. See this link:
https://www.b4x.com/android/forum/threads/dropbox-api-v2-all-http-all-using-httputils2.56842/
Bonne Chance
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Thank you for answering, @Mahares . No need to say more :)
 
Upvote 0

somed3v3loper

Well-Known Member
Licensed User
Longtime User
You forgot to add this to manifest

B4X:
AddApplicationText(
<activity android:name="com.dropbox.sync.android.DbxAuthActivity" />
<activity
  android:name="com.dropbox.client2.android.AuthActivity"
  android:launchMode="singleTask" >
  <intent-filter>
    <data android:scheme="db-wkyhfc3zf3q5pfl" /> <!-- NEED TO UPDATE -->
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.BROWSABLE" />
    <category android:name="android.intent.category.DEFAULT" />
  </intent-filter>
</activity>
<service
  android:name="com.dropbox.sync.android.DbxSyncService"
  android:enabled="true"
  android:exported="false"
  android:label="Dropbox Sync" />
  )
 
Upvote 0

Fab117

Member
Licensed User
Longtime User
Thank you very much for the answer.
It is now working.
I will look at Don Manfred tutorial to update my code.
Have a nice day.

Fab
 
Upvote 0
Top