{"id":18051571,"url":"https://github.com/yariksoffice/venom","last_synced_at":"2025-04-07T06:07:52.350Z","repository":{"id":38383733,"uuid":"255161977","full_name":"YarikSOffice/venom","owner":"YarikSOffice","description":"A lightweight tool that simplifies testing of the process death scenario.","archived":false,"fork":false,"pushed_at":"2023-08-12T15:37:41.000Z","size":7276,"stargazers_count":307,"open_issues_count":1,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-31T04:08:06.659Z","etag":null,"topics":["android","android-development","android-library","android-sdk","kotlin","kotlin-library","library","process-death","testing"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/YarikSOffice.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2020-04-12T20:12:50.000Z","updated_at":"2025-03-19T09:18:07.000Z","dependencies_parsed_at":"2024-08-01T19:41:35.645Z","dependency_job_id":"0f91b5e0-de2a-4881-9aa7-0c97459b8c43","html_url":"https://github.com/YarikSOffice/venom","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YarikSOffice%2Fvenom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YarikSOffice%2Fvenom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YarikSOffice%2Fvenom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YarikSOffice%2Fvenom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YarikSOffice","download_url":"https://codeload.github.com/YarikSOffice/venom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601448,"owners_count":20964864,"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","android-development","android-library","android-sdk","kotlin","kotlin-library","library","process-death","testing"],"created_at":"2024-10-30T22:49:52.647Z","updated_at":"2025-04-07T06:07:52.334Z","avatar_url":"https://github.com/YarikSOffice.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Venom\n\n[![](https://jitpack.io/v/YarikSOffice/venom.svg)](https://jitpack.io/#YarikSOffice/venom)\n[![](https://github.com/YarikSOffice/venom/workflows/Build/badge.svg)](https://github.com/YarikSOffice/venom/actions?query=workflow%3ABuild)\n[![](https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg)](https://ktlint.github.io/)\n[![](https://androidweekly.net/issues/issue-411/badge.svg)](https://androidweekly.net/issues/issue-411/)\n\n\u003cimg src=\"preview/header.png\" width=\"300\"\u003e\n\n**Venom** is a lightweight tool that simplifies testing of the process death scenario for your android application. \n\n\u003cdetails\u003e\n    \u003csummary\u003e🎞️ Click to show the preview…\u003c/summary\u003e\n    \u003cimg src=\"preview/preview.gif\" width=\"300\"\u003e\n\u003c/details\u003e\n\n## Why Venom?\n\nThe Android Run Time aggressively manages its resources and occasionally terminates background applications while the user is away interacting with other apps. In such a case, all the activities are destroyed along with application scope objects and background tasks. \n\nWhen the user relaunches the app, the top stack activity is restored from the saved instance state. Knowing this, your applications should always present a consistent interface and be tested against the process death scenario. \n\nVenom makes it possible to kill the app process from the notification drawer making the testing easier and more straightforward versus the traditional ways like setting the background processes limit in Developer Options or using the stop process button in Android Studio, especially for a QA team.\n\n## Setup\n\nThe setup is pretty simple:\n\n1. Initialize the library in Application.onCreate:\n\n```kotlin\nval venom = Venom.createInstance(this)\nvenom.initialize()\n```\n\n2. Call `start`/`stop` whenever you need:\n\n```kotlin\nvenom.start()\n// or\nvenom.stop()\n```\nSee the sample app for an example.\n\n## Customize the notification\n\nUse the builder to customize the notification:\n```kotlin\nval notification = NotificationConfig.Builder(this)\n    .buttonCancel(R.string.venom_notification_button_cancel_override)\n    .buttonKill(getString(R.string.venom_notification_button_kill_override))\n    .buttonRestart(getString(R.string.venom_notification_button_restart_override))\n    .build()   \nvenom.initialize(notification)\n```\n\n## Notification Permission\n\nAndroid 13 has introduced a new runtime permission [`POST_NOTIFICATIONS`](https://developer.android.com/reference/android/Manifest.permission#POST_NOTIFICATIONS) which is required to display any kind of notifications including ones for foreground services. Note that this permission is required for Venom to function properly.\n\nVenom **doesn't** manage the notification permission on your behalf to keep the library flexible. Please, see an example of handling that in the sample app.\n\n\n## Download\n\n```groovy\nrepositories {\n    maven { url 'https://jitpack.io' }\n}\n\ndependencies {\n    debugImplementation \"com.github.YarikSOffice.Venom:venom:0.7.1\"\n    releaseImplementation \"com.github.YarikSOffice.Venom:venom-no-op:0.7.1\"\n}\n```\n\n## License\n\n```\nThe MIT License (MIT)\n\nCopyright 2020 Yaroslav Berezanskyi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyariksoffice%2Fvenom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyariksoffice%2Fvenom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyariksoffice%2Fvenom/lists"}