
Enables access to Dropbox, Google Drive, and OneDrive through a single library. Features include lightweight integration, app folder access, and plans for mobile and desktop support.
Multiple clouds, one Kotlin Multiplatform bridge. Currently only supporting web, but desktop and Android support are planned.
Limited access scopes by using app folders are preferred by the library wherever possible.
| Mobile (Android) |
Desktop (JVM) |
Web (JS/WASM) |
|
|---|---|---|---|
| Dropbox | ⏳ | ⏳ | ✅ |
| Google Drive | ⏳ | ⏳ | ✅ |
| Microsoft OneDrive | ⏳ | ⏳ | ✅ |
✅ = Supported.
⏳ = Planned.
See Compatibility.md for important remarks about each service.
See Compatibility.md for details.
This library is not yet stable. The API will change.
The library is published to Maven Central.
dependencies {
implementation("nl.jacobras:cloudbridge:0.4.0")
}The main entry point is CloudBridge.dropbox(), CloudBridge.googleDrive() or CloudBridge.oneDrive().
Here's an example with Dropbox. First instantiate the service:
val service = CloudBridge.dropbox(clientId = "yourClientId")Then, have the user authenticate on the authenticate URL:
val authenticator = service.getAuthenticator(redirectUri = "yourRedirectUri")
val authenticateUrl = authenticator.buildUrl()
// Now redirect the user to `authenticateUrl`The user will grant access and get redirected to your redirect URI. Here, read
the ?code=xxx parameter from the URL and pass it to the authenticator:
authenticator.exchangeCodeForToken(code = code)Now the service is ready to be used!
val service = CloudBridge.dropbox(clientId = "yourClientId")
try {
service.listFiles()
} catch (e: CloudServiceException) {
// Handle...
}The library only supports limited/private app folders, no full access.
The library prefers to work with IDs over paths.
Only one account per service is supported as of now.
id and path variables are typed as much as possible, to prevent
accidental mix-ups.
Dropbox will throw 409 when it can't find a path. Other services throw
404 CloudBridge turns them both into CloudServiceException.NotFoundException.
Feel free to open an issue if you have a different use case for any of these.
Next to Kotlin Multiplatform, this library uses:
Multiple clouds, one Kotlin Multiplatform bridge. Currently only supporting web, but desktop and Android support are planned.
Limited access scopes by using app folders are preferred by the library wherever possible.
| Mobile (Android) |
Desktop (JVM) |
Web (JS/WASM) |
|
|---|---|---|---|
| Dropbox | ⏳ | ⏳ | ✅ |
| Google Drive | ⏳ | ⏳ | ✅ |
| Microsoft OneDrive | ⏳ | ⏳ | ✅ |
✅ = Supported.
⏳ = Planned.
See Compatibility.md for important remarks about each service.
See Compatibility.md for details.
This library is not yet stable. The API will change.
The library is published to Maven Central.
dependencies {
implementation("nl.jacobras:cloudbridge:0.4.0")
}The main entry point is CloudBridge.dropbox(), CloudBridge.googleDrive() or CloudBridge.oneDrive().
Here's an example with Dropbox. First instantiate the service:
val service = CloudBridge.dropbox(clientId = "yourClientId")Then, have the user authenticate on the authenticate URL:
val authenticator = service.getAuthenticator(redirectUri = "yourRedirectUri")
val authenticateUrl = authenticator.buildUrl()
// Now redirect the user to `authenticateUrl`The user will grant access and get redirected to your redirect URI. Here, read
the ?code=xxx parameter from the URL and pass it to the authenticator:
authenticator.exchangeCodeForToken(code = code)Now the service is ready to be used!
val service = CloudBridge.dropbox(clientId = "yourClientId")
try {
service.listFiles()
} catch (e: CloudServiceException) {
// Handle...
}The library only supports limited/private app folders, no full access.
The library prefers to work with IDs over paths.
Only one account per service is supported as of now.
id and path variables are typed as much as possible, to prevent
accidental mix-ups.
Dropbox will throw 409 when it can't find a path. Other services throw
404 CloudBridge turns them both into CloudServiceException.NotFoundException.
Feel free to open an issue if you have a different use case for any of these.
Next to Kotlin Multiplatform, this library uses: