1. Summary
  2. Report Spam
  3. Create account
  4. Log in

Projects/AndroidDropboxClient

From marcuswolschon

Jump to: navigation, search

image:sendtodropbox_icon.png image:folderdropbox.png image:sendtodropbox_icon2.png image:dropboxfoldersync-icon2.png image:dropboxfoldersync-icon3.pngimage:IconDropboxFileManager.png

Contents

description

These are the clients for Dropbox for Android that I have written. Some small apps to fill in where the default client is lacking and make Android+Dropbox a more productive and usefull combination.

  • get an account (with me as referral, giving me +250MB as a small gift)

I am in no way affiliated with Dropbox. I am just a developer who used their api.

"Dropbox Authenticator"

image:771339-1281877575118.png

usage

AccountManager mgr =  (AccountManager)getSystemService(Context.ACCOUNT_SERVICE);
final Bundle options = new Bundle();
   	    options.putString("consumer_key", CONSUMER_KEY);
   	    options.putString("consumer_secret", CONSUMER_SECRET);
AccountManagerFuture<Bundle> future = mgr.getAuthToken(account, "key", options, this, null, mHandler);
Bundle result = future.getResult();
String key = result.getString(AccountManager.KEY_AUTHTOKEN);
if (key != null) {
   // we need to invalidate the authToken because it may belong to a different application
   // as the AccountManager caches these keys
   mgr.invalidateAuthToken(SendToFolderApplication.ACCOUNT_TYPE, key);
   future = mgr.getAuthToken(account, "key", options, this, null, mHandler);
   result = future.getResult();
   key = result.getString(AccountManager.KEY_AUTHTOKEN);
}
future = mgr.getAuthToken(account, "secret", options, this, null, mHandler);
result = future.getResult();
String secret = result
if (secret != null) {
   // we need to invalidate the authToken because it may belong to a different application
   // as the AccountManager caches these keys
   mgr.invalidateAuthToken(SendToFolderApplication.ACCOUNT_TYPE, secret);
   future = mgr.getAuthToken(account, "secret", options, this, null, mHandler);
   result = future.getResult();
   secret = result.getString(AccountManager.KEY_AUTHTOKEN);
}

Keep the credentials to your Dropbox -account secret and store them independent of the number of applications that want to use it. Each Application still needs it's own API-keys to use Dropbox.


"Dropbox Authenticator" Version 2.0

status: done


"Dropbox Authenticator" Version 2.0.1

an issue with Android 2.0.1 came up. Until it's solved I changed tha app to required 2.2 .

E/AndroidRuntime(  450): Uncaught handler: thread android.server.ServerThread exiting due to uncaught exception
E/AndroidRuntime(  450): *** EXCEPTION IN SYSTEM PROCESS.  System will crash.
E/AndroidRuntime(  450): java.lang.NullPointerException
E/AndroidRuntime(  450): 	at com.android.settings.ManageAccountsSettings.onSyncStateUpdated(ManageAccountsSettings.java:187)
E/AndroidRuntime(  450): 	at com.android.settings.ManageAccountsSettings.onAccountsUpdated(ManageAccountsSettings.java:244)
E/AndroidRuntime(  450): 	at android.accounts.AccountManager$10.run(AccountManager.java:826)
E/AndroidRuntime(  450): 	at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime(  450): 	at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(  450): 	at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  450): 	at com.android.server.ServerThread.run(SystemServer.java:428)


This is a known bug Bug5009 of Android.


"Dropbox Authenticator" Version 2.0.2

Should be compatible with Android 1.5-2.1 now. (Android 2.2 worked all the time)

"Dropbox Authenticator" Version 2.0.3

Allow acount-creation.

"Dropbox Authenticator" Version 2.0.4

"Dropbox Authenticator" Version 2.0.5

  • nicer icon and uploaded screenshots

"Dropbox Authenticator" Version 2.0.7

  • account-type renamed to "Wolschon's Accounts for Dropbox"

"Dropbox Authenticator" Version 2.0.8

  • handle the phone to be turned in just the wrong millisecond. (minor issue)

"send to dropbox"

image:771362-1281878232693.png

Send files of all mime types (e.g. a photo you just made) to your dropbox. A frame comes up and just asks you to select the Dropbox -account and the folder. It's that simple.

image:sendToDropboxMenu.png image:sendToDropboxSelectFolder.png

"send to dropbox" Version 1.0

  • "send to dropbox" for any mime-type and any app on the phone

status: done, waiting for aproval by Dropbox

"send to dropbox" Version 1.5

  • a folder-selection

status: done

"send to dropbox" Version 2.0

  • a folder-selection
  • use Accounts in Android (every app still requires it's own API-key)

status: done

"send to dropbox" Version 2.0.01

an issue with Android 2.0.1 came up. Until it's solved I changed tha app to required 2.2 .


"send to dropbox" Version 2.0.2

Works with earlier Android-versions again.

"send to dropbox" Version 2.0.3 + 2.0.4

"send to dropbox" Version 2.0.5

  • nicer icon

status: done

"send to dropbox" Version 2.1.6

  • disable ui-elements if a login fails
  • Ad-supported version for the countries where no payed apps are possible
  • Invalidate and re-fetch auth-tokens because the stupid AccountManager caches them even though they have different options.

status: done

"send to dropbox" Version 2.1.7

can create remote folders
show visual feedback while folder is beind read from the network

status: done


"send to dropbox" Version 2.1.8

Reacts to SEND.
In theory you could now send a photo from the camera directly to the Dropbox.
In practice the "send to"-dialog does not scroll and there are so many apps in it that I cannot reach "send to dropbox" as it's outside the screen. :(

status: done

"send to dropbox" Version 2.2.0

context-menu on folders

handling of imaged from camera repaired

status: done

"send to dropbox" Version 2.2.1

Caught the case of the calling application not sending Intent.EXTRA_STREAM along with an INTEND_SEND and informed a user "lmjabreu" (Sorry guy, market gives no email-adresses).
(Finaly a bug-report sent from a user via the market.)

status: done

"send to dropbox" Version 2.2.2

INTEND_SEND handled for many more file-types.

status: done

"send to dropbox" Version 2.3.0

  • use my own derivative of the desktop Dropbox-API instead of the limited Android Dropbox Api 0.1
  • allow renaming folders
  • show path in title during folder-selection
  • display progress bar on upload
  • progress bar stays on the screen on orientation-changes

status: done

"send to dropbox" Version 2.3.1

  • minor updates to error-handling inside Dropbox-API
  • major improvements to comments, type-safety and overall documentation of the Dropbox-API code

status: done

"send to dropbox" Version 2.3.2

  • more cleanups in error-handling inside Dropbox-API
  • show connection speed during upload (localized)
  • progress-dialog not cancelable

status: done

"send to dropbox" Version 2.3.3

  • nf.setMinimumFractionDigits(1);
  • show time left (localized)
  • improved error-handling

status: done

"send to dropbox" Version 2.3.4

  • update time left only every 10Kb to not block the UI-thread too often

status: done

"send to dropbox" Version 2.3.5

  • no long->int convertion in progress calculation
  • no more object-creation in UI-thread on progress-update
  • major bugfix in upload-speed

status: done

"send to dropbox" Version 2.3.6

  • fixed a possible NullPointerException reported earlier today

status: done

"send to dropbox" Version 2.3.7

  • fixed a possible IllegalArgumentException reported earlier today

status: done

"send to dropbox" Version 2.3.8

  • button stays visible in large folders
  • support for mime-type text/* (text/html/xml/log/...-files)

status: done

"send to dropbox" Version 2.3.9

  • handle "getIntent().getExtras() == null"
  • a NullPointerException in handling and reporting an error

status: done

"send to dropbox" Version 2.4.0

  • has a launcher intent to select a file to send (and perform some trivial local file operations)
  • handle sharing URLs and Intents with plaintext (non stream) data
  • use licensing instead of copy protection

status: done

"Sync Folder with Dropbox"

image:780857-1282108650684.png

Uses the Android account system and the synchronisation framework to keep a folder on the SD-card of the Android telephone in sync with a selected folder in the Dropbox.

"dropbox folder-sync" Version 1.0

actually sync a folder on the SD-card instead of just providing upload/download

  • use SynchManager

status: done, waiting for review

Notes:

how it works

  1. get the last hash returned and the timestamp of the last (since v1.18 the last successful) sync of that directory
  2. request the list of folder-entries with the hash(or null)
  3. if the folder was not modified on the server, it will return a "HTTP 304 not modified" and we threat it like it was modified at the last sync time
  4. files/folders missing on the SD-card where the directory on the SD-card is older are downloaded
  5. files/folders missing on the SD-card where the directory on the SD-card is newer are deleted on the server
  6. files/folders missing on the server where the directory on the server is older are downloaded
  7. files/folders missing on the server where the directory on the server is newer are deleted on the SD-card
  8. files existing on both sides are downloaded or uploaded or left along depending on their last modification time
  9. folders existing on both sides are recursed into, starting again with step 1.

For "older" and "newer" we use the file-date on the existing side and the last synced date on the server-side or the last directory modification time on the SD-card since on the Dropbox-server the mod-time of a directory is not changed on deletion/rename of it's members.

"dropbox folder-sync" Version 1.5

use new authenticator-version

status: done

"dropbox folder-sync" Version 1.6

periodic sync if Android >=2.2 is detected

status: done

"dropbox folder-sync" Version 1.7

Use stored hashes and if-content-changed to reduce network-load and sync-time

'status: done

"dropbox folder-sync" Version 1.8

Better debug-output.

status: done


"dropbox folder-sync" Version 1.9

Bugfix: file existing on server and phone would always have the same timestamp
Bugfix: if server is unmodified, compare local file-time with time of last sync instead of max(local file time, local dir time)

status: done


"dropbox folder-sync" Version 1.10

Allow sync-times down to 15min instead of 30min
minor improvements to logging
first code for a content-provider that gives access to the local dropbox-folders

known bug: due to modified-time on directories on the Dropbox-server not being set correctly subdirectories on the server that are deleted are not recognized as such and are uploaded again instead.

status: done


"dropbox folder-sync" Version 1.11

Workaround for that bug found.

status: done

"dropbox folder-sync" Version 1.12

Hab the wrong api-key in there. Account needs to be removed and re-added, then foldersync set up again (don't worry, settings are kept and need not be re-entered)

status: done

"dropbox folder-sync" Version 1.13

Would not check subdirectories if server reacted with HTTP 304 - unmodified for parent directory.

status: done

"dropbox folder-sync" Version 1.14

Invalidate and re-fetch auth-tokens because the stupid AccountManager caches them even though they have different options.

status: done

"dropbox folder-sync" Version 1.15

Allow selecting a folder on SD-card via openintents.

status: done

"dropbox folder-sync" Version 1.16

can create folders
show visual feedback while folder is beind read from the network
proper select local folder -dialog (requires an app that handles "org.openintents.action.PICK_DIRECTORY" to be installed, else greyed out)

status: done

"dropbox folder-sync" Version 1.17

button "request immediate sync"
redid the UI of the setup-screen to use less space no matter how many accounts there are

status: done

"dropbox folder-sync" Version 1.18

do not store the "last synced time" and thus retry next time when certain errors occur.

status: done

"dropbox folder-sync" Version 1.19

missing access-permission added
Write a log-file of occuring errors and show a notification that opens that file if something happens.

status: done

"dropbox folder-sync" Version 1.20

error-log contains stack-traces

status: done

"dropbox folder-sync" Version 1.21

closes error-log notification on click after starting intent to view the log.

status: done

"dropbox folder-sync" Version 1.22

Renamed to "Sync Folder with Dropbox" and "Order mit Dropbox Synchronisieren" as per Dropbox Branding Rules "Do: Use "with Dropbox" in your app name".

status: done


"dropbox folder-sync" Version 1.23

due to that rushed rename a serious bug entered the setup-dialog of the app. It is not fixed
A workaround for the "content has already been consumed -issue of the current Dropbox API has been added.

status: done

"dropbox folder-sync" Version 1.24

Handle 404 on subdirectories as a folder removed on the server at the timestamp of the last sync.

status: done

"dropbox folder-sync" Version 1.25

minor corrections

status: done

"dropbox folder-sync" Version 1.26

possible bugfix for infrequent corruption of large files.

status: done

"dropbox folder-sync" Version 1.27

  • issue with large folders (too many files) resolved
  • testing thus complete, version released as non-Beta

status: done

"dropbox folder-sync" Version 1.28

  • buttons stay visible on large folders
  • max 255 remote entries instead of 100
  • local folder selection even if no app installed that provides ACTION_PICK_DIRECTORY
  • suggestions for possible causes in logged error-messages
  • remote and local folders open at last location instead of /
  • local folders can be created in local-folder-selection

status: done

"dropbox folder-sync" Version 1.29

  • using temp-file and extended error-reporting against file-corruption.

status: done

"dropbox folder-sync" Version 1.30

  • Improved file-corruption -workaround

status: done

"dropbox folder-sync" Version 1.31

  • no upload on 304 unless timestamp is newer (use less bandwidth)

status: done

"dropbox folder-sync" Version 1.32

  • reported file-size in comparison in workaround for Dropbox-API-Bug was always 1 byte short

status: done

"dropbox folder-sync" Version 1.33

  • do not leave 0 byte files after an error happened.

status: done

"dropbox folder-sync" Version 1.34

  • lower buttons on setup-screen side by side to save screen real-estate

status: done

"dropbox folder-sync" Version 1.35

  • I MAY have solved the "incomplete file received"-issue.

status: done published on the Android Market

CLICK HERE TO REPORT BUG/SUGGEST FEATURE
see all known bugs/feature requests
log file: The app writes an error-log to "/mnt/sdcard/DropboxSyncErrors.txt" that you can view and mail to Marcus@Wolschon.biz how to debug: 1) grab aLogCat 2) set the filter to "rop" (as in [Dd]rop[Bb]ox) 3) reqzuest a sync or request to sync ever 15min 4) open aLogCat again 5) wait 6) have a look at the debug-output produced and if you thing you see a bug and have a suggestion of how to fix it, click "send" to Marcus@Wolschon.biz

"dropbox folder-sync" Version 1.36

  • new icon
  • notifications while syncing
  • new start-activity

"dropbox folder-sync" Version 1.37

  • improved handling of aborted uploads
  • temp-files from upload ignored in next sync if not deleted


status: done published on the Android Market

"dropbox folder-sync" Version 1.38

  • automatic success if deleting a non-existing file/directory

status: done

"dropbox folder-sync" Version 1.39

  • log non-errors to log-file too for debugging

status: done

"dropbox folder-sync" Version 1.40

  • modified timestamp of downloaded files is set correctly
  • more logging

status: done

"dropbox folder-sync" Version 1.50

  • added the start of a simple file manager seamlessly supporting multiple accounts. It can only up+download at this time.

status: done

known issues:

  • after a download was aborted due to network timeout, the local directory is newer. Thus it's incomplete state is synced back to the server on the next run.

"dropbox folder-sync" Version 1.51

  • file manager can create directories, delete, open and edit files

status: done

...

"dropbox folder-sync" Version 1.54

  • file manager has icons
  • wording in file manager
  • file manager - show context-menu on click

status: done

"dropbox folder-sync" Version 1.55

  • allow restriction of syncing to times of no-roaming,wifi/wimax-connectivity,wireless-connectivity
  • file manager: icons for account/add account

status: done

"dropbox folder-sync" Version 1.56

  • landscape-layout for tablets (real NC-style view)
  • supports AndroidPit AppCenter
  • renaming local files/folders in file manager
  • some wordings corrected
  • file manager goes up a directory on pressing back

status: in development

planned "dropbox folder-sync" Version 2.0

  • 3 sync modes "two-way", "server->phone", "phone->server"
  • sync multiple folders (e.g. /sdcard/Music with Dropbox Mymusic and /sdcard/photos with Dropbox /public/photos

Workarond for "Content has been consumed"

status: planned


Remote File Manager for Dropbox

image:IconDropboxFileManager.png

image:DropboxFileManagerQRCode.png

version 1.0

status: done

version 1.1

  • todo: allow recursive folder upload/download
  • todo: progress bar on upload
  • todo: progress bar on download
  • todo: allow canceling upload
  • todo: allow canceling download


status: in development

links

answered questions on the developers-forum:

open questions on the developers-forum:

other threads

Personal tools