Tuesday, 21 January 2014

Dropbox file upload

Dropbox API integration Android 


Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. 

You can integrate Dropbox in your app & upload file directly into Dropbox

Its helpful for those who doesn't have server or web space. The free upload data is 2GB from Dropbox

To start with DropBox API

  • Create your account in Dropbox
  • Generate App Key & Secrete Key 
  • Download the SDK from Dropbox
  • Change App Key & Secrete Key 


Create your account in Dropbox

Go to www.dropbox.com/, then create an account, Initially Dropbox provides you 2GB of space free!
Click on Developers Tab

Click on App Console, Now you will be able to see this screen 



Generate App Key & Secrete Key 


Click on Dropbox API app & select Files & Datastores

Can your app be limited to its own, private folder? 
Say Yes

Now click on Create App

Now you done with app creation. Now you will be able to see this screen



Download the SDK from Dropbox

Download the SDK from here
Extract & import into your workspace



Change App Key & Secrete Key 

Change both the keys which are present in DBRoulette.java class

Which are defined like this

 final static private String APP_KEY = "Change_here";

 final static private String APP_SECRET = "Change_here";

Now make changes in AndroidManifest.xml as well

 <data android:scheme="db-Change_here" /> 
In the above tag pug App_Key

Now your app is ready to upload file to Dropbox.



Click on Link With Dropbox, it will redirect do Dropbox page ask your permission to access the folder. 



Customize your code as per you want. 

No comments:

Post a Comment