Skip to content

Sync with Dropbox on Android - #373

Merged
tiendc merged 1 commit into
mainfrom
sync/dropbox-android
Dec 5, 2026
Merged

tiendc merged 1 commit into
mainfrom
sync/dropbox-android

Conversation

@tiendc

@tiendc tiendc commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

Android can now sync the vault with Dropbox. On the phone, Settings › Sync › Dropbox comes after iCloud, as on the desktop (#372).

Sign-in. It opens a Custom Tab that comes back to com.hivepaas.shellwing://auth. That is OneDrive's redirect, already registered on the Dropbox app; the authorize page was measured to accept it in the spike.

  • dropbox::AppSignIn builds the authorize address (PKCE, token_access_type=offline).
  • When the address comes back, it checks state, turns access_denied into "not allowed", and exchanges the code.
  • query_value moved to server.rs, so OneDrive and Dropbox share it.

Mobile crate.

  • New DropboxSignIn object and Place::Dropbox { account, account_id }, mapped to and from the config's DropboxSync.
  • connect_sync records the account id, as the desktop does.
  • dropbox_account_before() is how the app asks before switching accounts.
  • Stop syncing revokes the Dropbox token, as it does Google's.

Android.

  • OneDrive.kt → SignInTab.kt, shared by Microsoft and Dropbox. Only one sign-in waits at a time; whichever was started takes the address.
  • The Sync screen gets the Dropbox chip, the hint and the button.
  • A dialog asks before signing in to another account than this vault's last.
  • Start over is offered for Dropbox too.

iOS. Only names the new place in placeName, so the exhaustive switch still compiles. The sign-in is left for the Mac session.

Docs: docs/configuration.md, docs/design/sync.md (Dropbox step 4) and android/README.md.

Tested

  • New test signing_in_on_a_phone_comes_back_to_the_app (fake Dropbox: the state check, the redirect sent to the token endpoint). Remote has 116 tests; mobile and config tests pass.
  • make lint, clippy --features ui-tests, and clippy for aarch64-linux-android (core and mobile, as CI runs it).
  • make android builds.
  • On the emulator, Dropbox shows after iCloud, with its hint and button, and the button opens the browser.
  • Not done yet: a full sign-in on the phone. The emulator's Chrome is stopped at its first-run screen, and the user signs in themselves.

🤖 Generated with Claude Code

Android signs in to Dropbox in a Custom Tab that comes back to
com.hivepaas.shellwing://auth, the redirect OneDrive already uses and
the Dropbox app already registers. dropbox::AppSignIn builds the
authorize address (PKCE, offline token) and checks the state when the
address comes back; the mobile crate wraps it as DropboxSignIn and
gains Place::Dropbox, so the phone keeps the account and its id as the
desktop does, and Stop syncing revokes the token.

OneDrive.kt becomes SignInTab.kt, shared by both: one sign-in waits at
a time, and whichever was started takes the address. Signing in to
another account than this vault's last asks first, as on the desktop.

iOS only names the new place for now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tiendc
tiendc merged commit b6937e1 into main Dec 5, 2026
5 checks passed
@tiendc
tiendc deleted the sync/dropbox-android branch December 5, 2026 06:34
tiendc added a commit that referenced this pull request Dec 5, 2026
Dropbox was on the desktop and Android; the iPhone and iPad have it now.
Settings > Sync > Dropbox signs in through SwiftUI's
webAuthenticationSession, coming back to com.hivepaas.shellwing://auth as
OneDrive's does, with the mobile crate's DropboxSignIn (#373). Another
account than this vault's of before is asked about first. Joining a vault
there offers Start over here: Dropbox's app folder is the app's own.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant