首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安卓DropBox API-与DropBox链接失败(DBRoulette)

安卓DropBox API-与DropBox链接失败(DBRoulette)
EN

Stack Overflow用户
提问于 2014-01-21 18:40:04
回答 1查看 371关注 0票数 0

当我尝试使用DBRoulette访问dropbox API时,我在模拟器中得到以下两条消息:链接到DropBox (我单击它)然后-Unfortunately浏览器已停止。我有一个来自dropbox的APP_KEY,SECRET_KEY,我的清单文件是:

代码语言:javascript
复制
<uses-sdk android:minSdkVersion="19" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<application android:icon="@drawable/icon" android:label="@string/app_name">
  <activity
    android:name=".DBRoulette"
    android:label="@string/app_name"
    android:configChanges="orientation|keyboard">
  <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
  </intent-filter>
  </activity>

<activity
  android:name="com.dropbox.client2.android.AuthActivity"
  android:launchMode="singleTask"
  android:configChanges="orientation|keyboard">
  <intent-filter>
    <!-- Change this to be db- followed by your app key -->
    <data android:scheme="db-XXXXXXX" />
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.BROWSABLE"/>
    <category android:name="android.intent.category.DEFAULT" />
  </intent-filter>
</activity>

我的主文件是DBRoulette,与示例应用程序完全相同:

代码语言:javascript
复制
com.dropbox.android.sample;
public class DBRoulette extends Activity {
private static final String TAG = "DBRoulette";

///////////////////////////////////////////////////////////////////////////
//                      Your app-specific settings.                      //
///////////////////////////////////////////////////////////////////////////

// Replace this with your app key and secret assigned by Dropbox.
// Note that this is a really insecure way to do this, and you shouldn't
// ship code which contains your key & secret in such an obvious way.
// Obfuscation is good.
final static private String APP_KEY = "xxxxxx";
final static private String APP_SECRET = "xxxx";
....

我使用了所有建议的jars :dropbox-api、http-mime、json-simple和Android4.4作为版本。为什么我无法访问dropbox?是因为模拟器吗?

EN

回答 1

Stack Overflow用户

发布于 2014-01-22 18:29:03

它不能工作,因为它在模拟器上运行,而不是在手机上运行。在电话里用过了,没问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21255698

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档