{"id":18647666,"url":"https://github.com/artcom/unity-android-watchdog-plugin","last_synced_at":"2025-11-05T07:30:28.505Z","repository":{"id":35725665,"uuid":"40004011","full_name":"artcom/unity-android-watchdog-plugin","owner":"artcom","description":"a java library for Unity Android apps which observes a heartbeat of the Unity App to check for blocked UI","archived":false,"fork":false,"pushed_at":"2015-07-31T15:12:35.000Z","size":14676,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-12-27T12:21:43.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/artcom.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}},"created_at":"2015-07-31T12:20:29.000Z","updated_at":"2023-05-31T12:42:52.000Z","dependencies_parsed_at":"2022-08-17T23:35:17.361Z","dependency_job_id":null,"html_url":"https://github.com/artcom/unity-android-watchdog-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artcom%2Funity-android-watchdog-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artcom%2Funity-android-watchdog-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artcom%2Funity-android-watchdog-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artcom%2Funity-android-watchdog-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artcom","download_url":"https://codeload.github.com/artcom/unity-android-watchdog-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449649,"owners_count":19640555,"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-07T06:27:22.157Z","updated_at":"2025-11-05T07:30:28.446Z","avatar_url":"https://github.com/artcom.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Watchdog Plugin for an Unity3D Android App\n\nThe idea is to have a plugin for the Unity3D app which will restart the application as soon as it becomes unresponsive. This is done for the Unity3D app running on Android, so the plugin is written in Java. \n\nHow to build an android java plugin for an C# Unity3D application we learned from this article: \n\n - https://blog.nraboy.com/2014/06/creating-an-android-java-plugin-for-unity3d/\n\nThe idea is simple: The plugin provides a `tic` method to the unity app which must be called on every update in the main event loop. This is the heartbeat of the applcation, as long as the `tic` method is called, the app is considered alive. Once the app stops looping and thereby stops sending the tics, the plugin will restart the application. \n\nTwo classes are involved in this: \n\n - `HeartbeatWatchdog.java`: the java plugin code itseld and \n - `UnityHeartbeat.cs`: the C# class to start and call the plugin class from C#\n   Unity side. \n\nThis project combines both parts in the two subdirectories:\n\n - **android-heartbeat-watchdog:** The android java code to handle the restart\n - **unity-android-heartbeat-watchdog-demonstrator:** A Unity3D demo project which\n   show how the android plugin is used. \n\n**TODO:** explain Unity3D project setup with the plugin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartcom%2Funity-android-watchdog-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartcom%2Funity-android-watchdog-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartcom%2Funity-android-watchdog-plugin/lists"}