Italian Errore dropbox

luciano

Member
Licensed User
Longtime User
Scusate l'ignoranza, ma mi esce un errore sulla riga manager.initialize che non riesco a risolvere.

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

com.dropbox.sync.android.DbxRuntimeException$BadState: Required Sync API Activity isn't included in application manifest: com.dropbox.sync.android.DbxAuthActivity, com.dropbox.client2.android.AuthActivity

Help!!
 
Probabilmente ti riferisci a questo thread:

nel quale questo è l'esempio di Manifest:
Code:
SetApplicationAttribute(android:label, "@string/app_name") ' NEW in v3.0!!!
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-YOURAPPKEY" /> <!-- 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" />
  )
 
Ho inserito il thread nel file manifest, ma mi da sempre lo stesso errore all'istruzione
manager.Initialize(key, secret, "manager").
 
Non ho avuto ancora il tempo per guardarlo.
Comunque, nel tutorial di Erel c'è:
Resource File (new in V3.0)
Due to a bug/issue in Dropbox SDK we must set the app name with an XML file.
Create a file named strings.xml and put it under Objects\res\values.
The file content should be:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
  <string name="app_name">B4A Example</string>
</resources>
Change B4A Example to the correct app name. Set the file to be read-only.

Questo file va impostato a read-only, affinché non sia cancellato.
 
Gli ho dato un'occhiata. Nel tuo Manifest mancano due riferimenti (almeno rispetto all'esempio di Erel):

1) all'activity: com.dropbox.client2.android.AuthActivity
2) al servizio: com.dropbox.sync.android.DbxSyncService

prova a copiare incollare, nell'EDITOR del Manifest, cioè nell'IDE, tutto il blocco che ho pubblicato in #3 (che poi è nel tutorial di Erel).
 
Ciao Luca,

ora inserendo correttamente nel file manifest i dati corretti sono riuscito, grazie a te, a far funzionare la libreria Dorpbox.
Ho peròancora un problema, quando eseguo la " manager.LinkAccount" , mi esce questo errore sul dispositivo
Errore
The app you were using
submitted a bad request.

Grazie.
 
Ho controllato più volte sia App name che App Key e sono corretti, infatti per un attimo sembra collegarsi, poi esce con l'errore
Se utilizzo quei parametri per collegarmi normalmente, funziona.
 
Back
Top