{"id":21739570,"url":"https://github.com/hyunjinno/foregroundaudiorecorder","last_synced_at":"2026-05-18T04:02:14.681Z","repository":{"id":189071475,"uuid":"679986277","full_name":"HyunJinNo/ForegroundAudioRecorder","owner":"HyunJinNo","description":"A library for audio recording at foreground.","archived":false,"fork":false,"pushed_at":"2023-10-12T03:22:06.000Z","size":399,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T07:55:42.967Z","etag":null,"topics":["android","foreground-service","jitpack","recorder"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HyunJinNo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2023-08-18T04:42:16.000Z","updated_at":"2024-01-06T11:56:53.000Z","dependencies_parsed_at":"2025-01-25T21:24:07.677Z","dependency_job_id":"7e8cf2e3-c235-4648-99f1-85e3c5d160a8","html_url":"https://github.com/HyunJinNo/ForegroundAudioRecorder","commit_stats":null,"previous_names":["hyunjinno/foregroundaudiorecorder"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/HyunJinNo/ForegroundAudioRecorder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HyunJinNo%2FForegroundAudioRecorder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HyunJinNo%2FForegroundAudioRecorder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HyunJinNo%2FForegroundAudioRecorder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HyunJinNo%2FForegroundAudioRecorder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HyunJinNo","download_url":"https://codeload.github.com/HyunJinNo/ForegroundAudioRecorder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HyunJinNo%2FForegroundAudioRecorder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33164672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","foreground-service","jitpack","recorder"],"created_at":"2024-11-26T06:09:28.578Z","updated_at":"2026-05-18T04:02:14.663Z","avatar_url":"https://github.com/HyunJinNo.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ForegroundAudioRecorder\nA library for audio recording at foreground.\n\n[![](https://jitpack.io/v/HyunJinNo/ForegroundAudioRecorder.svg)](https://jitpack.io/#HyunJinNo/ForegroundAudioRecorder)\n\n\u003cbr/\u003e\n\n## Index\n\n[1. Examples](#example)\n\n[2. Gradle Setup](#gradle-setup)\n\n[3. How to use](#how-to-use)\n\n\u003cbr/\u003e\n\n## Example\n\n\u003cimg src=\"screenshots/Screenshot1.png\" height=\"300\" /\u003e\n\n\u003cimg src=\"screenshots/Screenshot3.png\" height=\"300\" /\u003e\n\n\u003cimg src=\"screenshots/Screenshot2.png\" height=\"300\" /\u003e\n\n\u003cbr/\u003e\n\n## Gradle Setup\n\nTo get this library into your build:\n\n#### Step 1. Add the JitPack repository to your build file.\n\nAdd it in your settings.gradle at the end of repositories:\n\n```gradle\nrepositories {\n    ...\n    maven { url 'https://jitpack.io' }\n}\n```\n\n#### Step 2. Add the dependency.\n\nAdd it in your build.gradle (:app):\n\n```gradle\ndependencies {\n    ...\n    implementation 'com.github.HyunJinNo:ForegroundAudioRecorder:0.0:3'\n}\n```\n\n\u003cbr/\u003e\n\n## How to use\n\n#### Step 1. Add the following permissions to your AndroidManifest.xml.\n\n```xml\n\u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\u003e\n\n    ...\n    \u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" /\u003e\n    \u003cuses-permission android:name=\"android.permission.POST_NOTIFICATIONS\" /\u003e\n    \u003cuses-permission android:name=\"android.permission.RECORD_AUDIO\" /\u003e\n    \u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" /\u003e\n    ...\n\n\u003c/manifest\u003e\n```\n\n#### Step 2. Request permissions before calling startService() method.\n\n```kotlin\nclass MainActivity : AppCompatActivity() {\n    private var permissions: Array\u003cString\u003e = arrayOf(\n        Manifest.permission.RECORD_AUDIO,\n        Manifest.permission.WRITE_EXTERNAL_STORAGE\n    )\n\n    companion object {\n        private const val REQUEST_PERMISSIONS = 200\n    }\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        ...\n        requestPermissions(permissions, REQUEST_PERMISSIONS)\n    }\n\n    override fun onRequestPermissionsResult(\n        requestCode: Int,\n        permissions: Array\u003cout String\u003e,\n        grantResults: IntArray\n    ) {\n        super.onRequestPermissionsResult(requestCode, permissions, grantResults)\n        val flag = if (requestCode == REQUEST_PERMISSIONS) {\n            grantResults.all { it == PackageManager.PERMISSION_GRANTED }\n        } else {\n            false\n        }\n\n        if (!flag) {\n            Toast.makeText(applicationContext, \"Permissions rejected.\", Toast.LENGTH_SHORT).show()\n            finish()\n        }\n    }\n}\n```\n\n#### Step 3. After the permissions granted, call startService() method.\n\n```kotlin\nval intent = Intent(applicationContext, AudioService::class.java)\nstartService(intent)\n```\n\n#### Step 4. call stopService() method if you don't use the service anymore.\n\nIf you call stopService() method during audio recording, a recorded audio file is automatically created.\n\n```kotlin\nval intent = Intent(applicationContext, AudioService::class.java)\nstopService(intent)\n```\n\n\u003cbr/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyunjinno%2Fforegroundaudiorecorder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyunjinno%2Fforegroundaudiorecorder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyunjinno%2Fforegroundaudiorecorder/lists"}