Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I am using dropbox-android-sdk-1.6.2.jar but after successful oauth login, webview is showing "Webpage not available" error page. I have observed this behaviour on android OS 4.0.3, 4.3, 5.0.1, 6.0. Please refer this for screenshot of webview.
Thanks
The error is reporting that the db-<app_key> URL was not available. This is the redirect URI that the SDK uses to receive the user after they go through the app authorization flow.
Did you set up your db-<app_key> URL in your AndroidManifest.xml as instructed for the Android Core SDK?
In any case, I should note that the SDK you're using is for API v1 anyway, which is deprecated. You should migrate to API v2 whenever possible. For Android, you should use the API v2 Java SDK. There's an Android sample app for that to refer to.
I will migrate to API V2 later but the app is already in production and facing this error. I have already specified db-<api_key> [api_key is my apps API key] in AndroidManifest.xml. It was working before but suddenly stopped working. Do you want me to share the exact value of api_key.
Forgot to tell you, my app has been developed for android based device which doesn't have a browser. We have created an activity with webview to be invoked by dropbox API instead of browser and it was working fine.
Thanks Greg.
I want to proceed with this ticket. Below are the declarations of AuthActivity from Dropbox and my own LoadUrlActivity to render Dropbox URLs inplace of Browser. Also, you can find WebView initialization.
<activity
android:name="com.dropbox.client2.android.AuthActivity"
android:screenOrientation="sensorPortait"
android:configChanges="orientation|keyboard"
android:launchMode="singleTask" >
<intent-filter>
<!-- Change this to be db- followed by your app key -->
<data android:scheme="db-exi3o02y0ss2wn5" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".activities.LoadUrlActivity"
android:screenOrientation="sensorPortait"
android:exported="true"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.dropbox.com"
android:scheme="https" >
</data>
</intent-filter>
</activity>
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
webview.loadUrl(getIntent().getData().toString());
Hi Greg.
App is working fine on my device after fresh installation but it is not working on normal android devices. I don't know where is the problem.
Thanks for your time.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!