Skip to content

TranceLove/android-omh-storage

Β 
Β 

Repository files navigation


Android OMH Storage

NPM version License

Chat on Discord Follow on Twitter


Android OMH Storage streamlines the integration of various cloud storage providers into your Android application by offering a unified API for different storage providers. It supports both Google Mobile Services (GMS) and non-GMS configurations, making it easy to incorporate Google Drive, OneDrive, Dropbox, and other supported third-party storage providers.

Features

  • πŸ“± GMS and non-GMS support for all storage providers
  • πŸ–‡οΈ Identical API across all storage providers
  • πŸ“¦ Official storage provider SDK integration
  • πŸš€ Easy configuration and setup
  • πŸ’¨ Lightweight modules

OMH Storage Modules

This is the main directory of the mono-repo for Android OMH Storage. If you're searching for a particular package, please click on the corresponding package link below.

Documentation

Supported functionality

  • βœ…Β - supported
  • 🟨 - partially supported
  • ❌ - not supported
Features Google Drive (GMS) Google Drive (non-GMS) OneDrive Dropbox
File listing βœ… βœ… βœ… βœ…
File searching βœ… βœ… 🟨 βœ…
Folder creation βœ… βœ… βœ… βœ…
File creation (by mime type) βœ… βœ… ❌ ❌
File creation (by extension) ❌ ❌ βœ… βœ…
File update βœ… βœ… βœ… βœ…
File deletion βœ… βœ… βœ… βœ…
File permanent deletion βœ… βœ… ❌ ❌
File upload βœ… βœ… βœ… βœ…
File download βœ… βœ… βœ… βœ…
File export βœ… βœ… ❌ ❌
File metadata βœ… βœ… 🟨 🟨
File versioning βœ… βœ… βœ… βœ…
File permissions 🟨 🟨 🟨 🟨
File URL βœ… βœ… βœ… βœ…

File metadata

Show details

OmhStorageEntity.OmhFile

Property Google Drive (GMS) Google Drive (non-GMS) OneDrive Dropbox
id βœ… βœ… βœ… βœ…
name βœ… βœ… βœ… βœ…
createdTime βœ… βœ… ❌ ❌
modifiedTime βœ… βœ… βœ… βœ…
parentId βœ… βœ… βœ… βœ…
mimeType βœ… βœ… βœ… βœ…
extension βœ… βœ… βœ… βœ…
size βœ… βœ… βœ… βœ…

OmhStorageEntity.OmhFolder

Property Google Drive (GMS) Google Drive (non-GMS) OneDrive Dropbox
id βœ… βœ… βœ… βœ…
name βœ… βœ… βœ… βœ…
createdTime βœ… βœ… ❌ ❌
modifiedTime βœ… βœ… βœ… ❌
parentId βœ… βœ… βœ… βœ…

OmhStorageMetadata.originalMetadata

Storage provider Type
Google Drive (GMS) com.google.api.services.drive.model.File
Google Drive (non-GMS) String
OneDrive com.microsoft.graph.models.DriveItem
Dropbox com.dropbox.core.v2.files.Metadata

File versioning

Show details

OmhFileVersion

Property Google Drive (GMS) Google Drive (non-GMS) OneDrive Dropbox
fieldId βœ… βœ… βœ… βœ…
versionId βœ… βœ… βœ… βœ…
lastModified βœ… βœ… βœ… βœ…

File permissions

Show details

OmhPermission.IdentityPermission

Property Google Drive (GMS) Google Drive (non-GMS) OneDrive Dropbox
id βœ… βœ… βœ… 🟨
role βœ… βœ… βœ… βœ…
isInherited 🟨 🟨 βœ… βœ…
identity βœ… βœ… βœ… βœ…

Google Drive: isInherited is present only for shared drive items. Dropbox: id equals to underlying identity ID.

OmhIdentity

Type Google Drive (GMS) Google Drive (non-GMS) OneDrive Dropbox
User βœ… βœ… βœ… βœ…
Group βœ… βœ… βœ… βœ…
Domain βœ… βœ… ❌ ❌
Anyone βœ… βœ… ❌ ❌
Device ❌ ❌ βœ… ❌
Application ❌ ❌ βœ… ❌

OmhIdentity.User

Property Google Drive (GMS) Google Drive (non-GMS) OneDrive Dropbox
id ❌ ❌ βœ… βœ…
displayName βœ… βœ… βœ… 🟨
emailAddress βœ… βœ… ❌ βœ…
expirationTime βœ… βœ… βœ… ❌
deleted βœ… βœ… ❌ ❌
photoLink βœ… βœ… ❌ ❌
pendingOwner ❌ βœ… ❌ ❌

Dropbox: Invited users without a Dropbox account will not have a displayName.

OmhIdentity.Group

Property Google Drive (GMS) Google Drive (non-GMS) OneDrive Dropbox
id ❌ ❌ βœ… βœ…
displayName βœ… βœ… βœ… βœ…
emailAddress βœ… βœ… ❌ ❌
expirationTime βœ… βœ… βœ… ❌
deleted βœ… βœ… ❌ ❌

OmhPermissionRole

Role Google Drive (GMS) Google Drive (non-GMS) OneDrive Dropbox
OWNER βœ… βœ… βœ… βœ…
WRITER βœ… βœ… βœ… 🟨
COMMENTER βœ… βœ… ❌ βœ…
READER βœ… βœ… βœ… 🟨

Dropbox:

  • Dropbox does not support granting a READER role, although it is documented as available in the API. An exception will be thrown with user message: viewer_no_comment isn’t yet supported
  • Dropbox does not support granting a WRITER role to uploaded files. An exception will be thrown with user message: You don’t have permission to perform this action..

OmhPermissionRecipient

Type Google Drive (GMS) Google Drive (non-GMS) OneDrive Dropbox
User βœ… βœ… βœ… βœ…
Group βœ… βœ… βœ… ❌
Domain βœ… βœ… ❌ ❌
Anyone βœ… βœ… ❌ ❌
WithObjectId ❌ ❌ βœ… βœ…
WithAlias ❌ ❌ βœ… ❌

Dropbox: to invite Group, use WithObjectId and provide group ID

OmhStorageClient.createPermission

Dropbox: this method returns null when permission is successfully created.

OmhStorageClient.updatePermission

Dropbox: this method returns null when permission is successfully updated.

OmhStorageClient.getWebUrl

Dropbox: a folder needs to be a shared folder to return web URL.

OmhStorageClient.getFilePermissions

Dropbox: a folder needs to be a shared folder to return any permissions, including OWNER permission.

Contributing

License

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Kotlin 99.8%
  • Shell 0.2%