Android API Client
Android (Kotlin and Java) integration handles uploads and file operations by wrapping Uploadcare Upload API and REST API. This comprehensive API client lets you use most of the Uploadcare features from within your Android app. It also includes a native uploading widget.
Features
Concise and easy-to-use library without extra resources and drawables.
Uploading (Upload API):
- Upload files from a file, byte array, URL, URI and cloud sources (up to 5 TB)
- Multipart uploading for large files
- Uploading network to speed uploading jobs (like CDN)
File uploading widget:
- Upload files from a local disk, camera, and cloud sources
- Track, pause and continue multipart uploading
- Background uploading
- Bulk file uploading
- Material design Uploader appearance customization and styles
File management (REST API):
- Get file info and perform various operations (store/delete/copy) with them
- Work with groups of files
- Get info about account project
- Manage webhooks
- Convert documents
- Encode and transform videos
- Paginated resource fetching
- Synchronous and asynchronous operation modes
Image processing (URL API):
- CDN path builder
- Compression
- Geometry
- Colors
- Definition
- Image and text overlays
- Rotations
- Recognition
- File info
- Proxy (fetch)
Security:
- Secure authentication
- Secure uploads (signed uploads)
- Secure delivery (signed URLs)
Installation from Maven Central
The latest stable versions are available at Maven Central.
To include API client and the uploading widget in your Android project, add this line to the ‘gradle.build’ file:
Initialization
REST API requires both public and secret keys. If you use Upload API only, you can specify just “YOUR_PUBLIC_KEY”. Get your Public and Secret API keys.
Kotlin
Java
For uploading widget, place your Uploadcare public/private keys into ../res/strings.xml
file:
Using REST API
You can use both synchronous and asynchronous operations.
Asynchronous file info fetch
Kotlin
Java
Synchronous file info fetch
Kotlin
Java
Find out more examples in the API client documentation for Android at GitHub.
Using Upload API
You can use both synchronous and asynchronous operations.
Asynchronous file upload
Kotlin
Java
Synchronous file upload
Kotlin
Java
Find out more examples in the API client documentation for Android at GitHub.
Using uploading widget
You can select and upload file from any available local file, camera, external source, Activity/Fragment.
Kotlin
Java
Find out more examples in the uploading widget documentation for Android at GitHub.
Related guides
- Integration with Java