由于一个android 平台上面的应用程序要做dropbox的集成,所以研究了下dropbox官网的一些文档,记下此笔记方便日后查看。
1,打开dropbox 官网
https://www.dropbox.com/developers,选择 my apps,然后点击右侧create an App,输入APP name (最好和应用程序名称相同),Description(说明,可以不填写),Access level 选择需要模式就好,
App folder - Your app only needs access to a single folder within the user's Dropbox (recommended).
Full Dropbox - Your app needs access to the user's entire Dropbox.(此模式需要dropbox官方审查)。
刚刚申请的应用是开发状态,如果应用开发完成,点击Apply for production status 进行操作。
2,下面点击 Getting started ,进行API的一个大致了解。
点击Core concepts ,选择android,
3,安装环境,测试例子
1,下载,https://www.dropbox.com/developers/reference/sdk ,下载android SDK,
2,然后eclipse导入dropbox-android-sdk-1.2.1\examples\DBRoulette
3,修改 AndroidManifest.xml ,增加以下内容
<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-INSERT-APP-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>
<!-- 在application标签后增加--><uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>4,搜索并修改所有CHANG_ME为创建应用,生成的应用App key,App secret.在sdk自带列子代码中有注释5,修改ACCESS_TYPE 为应用申请的模式,AccessType.DROPBOX;AccessType.APP_FOLDER;
本文档记录了在Android应用程序中集成Dropbox API的过程,包括在Dropbox官网上创建应用,选择访问级别(App Folder或Full Dropbox),以及如何开始使用API和SDK。开发者将学习如何下载SDK,导入Eclipse并修改AndroidManifest.xml来测试示例项目。
1121





