{"id":20159571,"url":"https://github.com/transloadit/android-sdk","last_synced_at":"2025-04-09T23:36:18.599Z","repository":{"id":27730847,"uuid":"110493809","full_name":"transloadit/android-sdk","owner":"transloadit","description":"Transloadit's official Android SDK","archived":false,"fork":false,"pushed_at":"2024-03-20T15:03:50.000Z","size":202,"stargazers_count":6,"open_issues_count":2,"forks_count":8,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-24T01:25:19.705Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/transloadit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-11-13T03:08:05.000Z","updated_at":"2025-01-16T17:56:25.000Z","dependencies_parsed_at":"2024-03-19T12:28:40.684Z","dependency_job_id":"f84db754-c16c-40aa-a841-2a752bd93d82","html_url":"https://github.com/transloadit/android-sdk","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transloadit%2Fandroid-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transloadit%2Fandroid-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transloadit%2Fandroid-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transloadit%2Fandroid-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/transloadit","download_url":"https://codeload.github.com/transloadit/android-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248130862,"owners_count":21052814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T00:09:00.756Z","updated_at":"2025-04-09T23:36:18.582Z","avatar_url":"https://github.com/transloadit.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/transloadit/android-sdk/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/transloadit/android-sdk/actions/workflows/CI.yml)\n\n# android-sdk\n\nAn **Android** Integration for [Transloadit](https://transloadit.com)'s file uploading and encoding service\n\n## Intro\n\n[Transloadit](https://transloadit.com) is a service that helps you handle file uploads, resize, crop and watermark your images, make GIFs, transcode your videos, extract thumbnails, generate audio waveforms, and so much more. In short, [Transloadit](https://transloadit.com) is the Swiss Army Knife for your files.\n\nThis is an **Android** SDK to make it easy to talk to the [Transloadit](https://transloadit.com) REST API.\n\n## Install\n\nThe JARs can be downloaded manually from [Maven Central](https://search.maven.org/artifact/com.transloadit.android.sdk/transloadit-android).\n\n**Gradle:**\n\n```groovy\nimplementation 'com.transloadit.android.sdk:transloadit-android:0.0.10'\n```\n\n**Maven:**\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.transloadit.android.sdk\u003c/groupId\u003e\n  \u003cartifactId\u003etransloadit-android\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.10\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\nAll interactions with the SDK begin with the `com.transloadit.android.sdk.Transloadit` class.\n\n### Create an Assembly\n\nTo create an assembly, you use the `newAssembly` method.\n\nTo use this functionality in it's full glory, you need implement the `AssemblyProgressListener`\ninterface.\n\n```java\n\npublic class MyAssemblyProgressListener  implements AssemblyProgressListener {\n    @Override\n    public void onUploadFinished() {\n        System.out.println(\"upload finished!!! waiting for execution ...\");\n    }\n\n    @Override\n    public void onUploadProgress(long uploadedBytes, long totalBytes) {\n        System.out.println(\"uploaded: \" + uploadedBytes + \" of: \" + totalBytes);\n    }\n\n    @Override\n    public void onAssemblyFinished(AssemblyResponse response) {\n        System.out.println(\"Assembly finished with status: \" + response.json().getString(\"ok\"));\n    }\n\n    @Override\n    public void onUploadFailed(Exception exception) {\n        System.out.println(\"upload failed :(\");\n        exception.printStackTrace();\n    }\n\n    @Override\n    public void onAssemblyStatusUpdateFailed(Exception exception) {\n        System.out.println(\"unable to fetch status update :(\");\n        exception.printStackTrace();\n    }\n}\n\n```\n\nAnd in your activity you can have something like this\n\n```java\npublic class MainActivity extends AppCompatActivity {\n    private ProgressBar progressBar;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n\n        progressBar = (ProgressBar) findViewById(R.id.progressBar);\n\n        AssemblyProgressListener listener = new MyAssemblyProgressListener();\n\n        AndroidTransloadit transloadit = new AndroidTransloadit(\"key\", \"secret\");\n        AndroidAsyncAssembly assembly = transloadit.newAssembly(listener);\n        assembly.addFile(new File(\"path/to/file.jpg\"), \"file\");\n\n        Map\u003cString, Object\u003e stepOptions = new HashMap\u003c\u003e();\n        stepOptions.put(\"width\", 75);\n        stepOptions.put(\"height\", 75);\n        stepOptions.put(\"resize_strategy\", \"pad\");\n        assembly.addStep(\"resize\", \"/image/resize\", stepOptions);\n\n        assembly.save();\n    }\n}\n\n```\n\n## Example\n\nFor fully working examples take a look at [examples/](https://github.com/transloadit/android-sdk/tree/main/examples).\n\n## Documentation\n\nSee [Javadoc](https://javadoc.io/doc/com.transloadit.android.sdk/transloadit-android/latest/index.html) for full API documentation.\n\n## License\n\n[The MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransloadit%2Fandroid-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftransloadit%2Fandroid-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransloadit%2Fandroid-sdk/lists"}