{"id":16223692,"url":"https://github.com/lykmapipo/android-media-provider","last_synced_at":"2026-05-02T06:39:00.343Z","repository":{"id":139148236,"uuid":"194641159","full_name":"lykmapipo/android-media-provider","owner":"lykmapipo","description":"A pack of helpful helpers to gather images, video and audio from media source(s)","archived":false,"fork":false,"pushed_at":"2019-07-18T20:49:07.000Z","size":138,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-26T17:53:14.293Z","etag":null,"topics":["android","audio","capture","image","library","lykmapipo","media","provider","record","video"],"latest_commit_sha":null,"homepage":null,"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/lykmapipo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-01T09:22:26.000Z","updated_at":"2024-12-26T14:49:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b50fd07-b332-45f2-9073-8564a91db55f","html_url":"https://github.com/lykmapipo/android-media-provider","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fandroid-media-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fandroid-media-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fandroid-media-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fandroid-media-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lykmapipo","download_url":"https://codeload.github.com/lykmapipo/android-media-provider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247761030,"owners_count":20991533,"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":["android","audio","capture","image","library","lykmapipo","media","provider","record","video"],"created_at":"2024-10-10T12:19:46.267Z","updated_at":"2026-05-02T06:38:55.325Z","avatar_url":"https://github.com/lykmapipo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"android-media-provider\n======================\n\n[![](https://jitpack.io/v/lykmapipo/android-media-provider.svg)](https://jitpack.io/#lykmapipo/android-media-provider)\n\nA pack of helpful helpers to gather images, video and audio from media source(s).\n\n## Installation\nAdd [https://jitpack.io](https://jitpack.io) to your build.gradle with:\n```gradle\nallprojects {\n    repositories {\n        maven { url \"https://jitpack.io\" }\n    }\n}\n```\nadd `android-media-provider` dependency into your project\n\n```gradle\ndependencies {\n    implementation 'com.github.lykmapipo:android-media-provider:v0.3.0'\n}\n```\n\n## Usage\n\nIn activity(or fragment) capture image or record video and audio\n\n```java\npublic class MainActivity extends AppCompatActivity {\n\n    private static final String TAG = MainActivity.class.getSimpleName();\n    private ImageView ivCapturedImage;\n    private VideoView vvRecordedVideo;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n\n        // capture image\n        ivCapturedImage = findViewById(R.id.ivCapturedImage);\n        Button captureImageButton = findViewById(R.id.btnCaptureImage);\n        captureImageButton.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                MediaProvider.captureImage(MainActivity.this, new MediaProvider.OnImageCapturedListener() {\n                    @Override\n                    public void onSuccess(File file, Uri uri) {\n                        ivCapturedImage.setImageURI(uri);\n                        Toast.makeText(MainActivity.this, \"Image Captured Success: \" + file.getAbsolutePath(), Toast.LENGTH_SHORT).show();\n                    }\n\n                    @Override\n                    public void onFailure(Exception error) {\n                        Toast.makeText(MainActivity.this, \"Image Captured Failed: \" + error.getMessage(), Toast.LENGTH_SHORT).show();\n                    }\n                });\n            }\n        });\n\n        // record video\n        vvRecordedVideo = findViewById(R.id.vvRecordedVideo);\n        Button recordVideoButton = findViewById(R.id.btnRecordVideo);\n        recordVideoButton.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                MediaProvider.recordVideo(MainActivity.this, new MediaProvider.OnVideoRecordedListener() {\n                    @Override\n                    public void onSuccess(File file, Uri uri) {\n                        vvRecordedVideo.setVideoURI(uri);\n                        vvRecordedVideo.start();\n                        Toast.makeText(MainActivity.this, \"Video Recorded Success: \" + file.getAbsolutePath(), Toast.LENGTH_SHORT).show();\n                    }\n\n                    @Override\n                    public void onFailure(Exception error) {\n                        Toast.makeText(MainActivity.this, \"Video Recorded Failed: \" + error.getMessage(), Toast.LENGTH_SHORT).show();\n                    }\n                });\n            }\n        });\n\n        // record audio\n        Button recordAudioButton = findViewById(R.id.btnRecordAudio);\n        recordAudioButton.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                MediaProvider.recordAudio(MainActivity.this, new MediaProvider.OnAudioRecordedListener() {\n                    @Override\n                    public void onSuccess(File file, Uri uri) {\n                        Toast.makeText(MainActivity.this, \"Audio Record Success: \" + file.getAbsolutePath(), Toast.LENGTH_SHORT).show();\n                    }\n\n                    @Override\n                    public void onFailure(Exception error) {\n                        Toast.makeText(MainActivity.this, \"Audio Record Failed: \" + error.getMessage(), Toast.LENGTH_SHORT).show();\n                    }\n                });\n            }\n        });\n    }\n}\n```\n\n\n## Test\n```sh\n./gradlew test\n```\n\n## Contribute\nIt will be nice, if you open an issue first so that we can know what is going on, then, fork this repo and push in your ideas.\nDo not forget to add a bit of test(s) of what value you adding.\n\n## License\n\n(The MIT License)\n\nCopyright (c) lykmapipo \u0026\u0026 Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykmapipo%2Fandroid-media-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flykmapipo%2Fandroid-media-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykmapipo%2Fandroid-media-provider/lists"}