android dropbox API 学习笔记。

本文档记录了在Android应用程序中集成Dropbox API的过程,包括在Dropbox官网上创建应用,选择访问级别(App Folder或Full Dropbox),以及如何开始使用API和SDK。开发者将学习如何下载SDK,导入Eclipse并修改AndroidManifest.xml来测试示例项目。


 由于一个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 keyApp secret.在sdk自带列子代码中有注释
5,修改ACCESS_TYPE 为应用申请的模式,AccessType.DROPBOX;AccessType.APP_FOLDER;

评论 5
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值