{"id":19797789,"url":"https://github.com/krlan2789/unity-background-location","last_synced_at":"2026-04-13T17:07:08.710Z","repository":{"id":178288629,"uuid":"658664679","full_name":"krlan2789/Unity-Background-Location","owner":"krlan2789","description":"Unity Project - LAN LiveLocation Sample","archived":false,"fork":false,"pushed_at":"2024-11-19T17:37:58.000Z","size":16306,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T05:21:25.740Z","etag":null,"topics":["android","gps-tracker","gps-tracking","location-tracker","location-tracking","unity","unity3d-plugin"],"latest_commit_sha":null,"homepage":"https://erlankurnia.github.io/article/3/Android%20Background%20Location%20for%20Unity","language":"C#","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/krlan2789.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-06-26T08:49:10.000Z","updated_at":"2024-11-18T09:46:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"9fed05ee-cd99-4f38-ac92-2092385429a5","html_url":"https://github.com/krlan2789/Unity-Background-Location","commit_stats":null,"previous_names":["krlan2789/unity-background-service","krlan2789/unity-background-location"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlan2789%2FUnity-Background-Location","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlan2789%2FUnity-Background-Location/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlan2789%2FUnity-Background-Location/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlan2789%2FUnity-Background-Location/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krlan2789","download_url":"https://codeload.github.com/krlan2789/Unity-Background-Location/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241139383,"owners_count":19916464,"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","gps-tracker","gps-tracking","location-tracker","location-tracking","unity","unity3d-plugin"],"created_at":"2024-11-12T07:26:53.338Z","updated_at":"2026-04-13T17:07:08.697Z","avatar_url":"https://github.com/krlan2789.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setting Up Background Location in Unity with LAN LiveLocation Plugin\n\nThis guide walks you through setting up background location functionality in Unity using the LAN LiveLocation plugin. Follow the steps below to ensure a smooth integration.\n\n---\n\n## Supported Platforms\n\n- **Android OS**: Tested on Android 10 and Android 14 devices.\n- **iOS**: Coming soon.\n\n---\n\n## Requirements and Installation\n\n### Step 1: Install External Dependency Manager for Unity\n\nTo manage dependencies, you need to install the External Dependency Manager for Unity:\n\n- Follow the [manual installation guide](https://openupm.com/packages/com.google.external-dependency-manager/#modal-manualinstallation).\n- Alternatively, download and import the [latest custom package](https://github.com/googlesamples/unity-jar-resolver/blob/master/external-dependency-manager-latest.unitypackage).\n\n### Step 2: Install the Live Location Plugin\n\nAdd the Live Location plugin to your Unity project:\n\n1. Open the **Package Manager** window.\n2. Click the **Add** button in the toolbar.\n3. Select **Add package from git URL**.\n4. Paste the following URL: `https://github.com/krlan2789/Unity-LAN-LiveLocation-Plugin.git`.\n\n\u003cimg class=\"use-github-assets\" src=\"./Screenshot/Add_package_from_git_url.png\" height=\"auto\" width=\"640px\" /\u003e\n\n### Step 3: Set Minimum API Level\n\nEnsure the minimum API level is set to **API Level 26**.\n\n\u003cimg class=\"use-github-assets\" src=\"./Screenshot/Min_Android_API_Level.png\" height=\"auto\" width=\"640px\" /\u003e\n\n### Step 4: Verify Build Settings\n\nCheck and configure the required build settings.\n\n\u003cimg class=\"use-github-assets\" src=\"./Screenshot/Build_Settings.png\" height=\"auto\" width=\"640px\" /\u003e\n\n### Step 5: Update AndroidManifest.xml\n\nAdd the following permissions to `Assets/Plugins/Android/AndroidManifest.xml`:\n\n```xml\n\u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\" package=\"com.LAN.BackgroundLocation\" xmlns:tools=\"http://schemas.android.com/tools\"\u003e\n\n     \u003c!-- Required permissions --\u003e\n     \u003cuses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" /\u003e\n     \u003cuses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" /\u003e\n     \u003cuses-permission android:name=\"android.permission.ACCESS_BACKGROUND_LOCATION\" /\u003e\n     \u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" /\u003e\n     \u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE_LOCATION\" android:minSdkVersion=\"29\" /\u003e\n     \u003c!-- Optional permissions --\u003e\n     \u003cuses-permission android:name=\"android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS\" /\u003e\n\n     \u003capplication\u003e\n          \u003cactivity android:name=\"com.unity3d.player.UnityPlayerActivity\" android:theme=\"@style/UnityThemeSelector\"\u003e\n          ...\n     \u003c/application\u003e\n\u003c/manifest\u003e\n```\n\n### Step 6: Update launcherTemplate.gradle\n\nInsert the following script into `Assets\\Plugins\\Android\\launcherTemplate.gradle`:\n\n```gradle\nandroid {\n     ...\n     packagingOptions {\n          pickFirst('META-INF/okio.kotlin_module')\n          pickFirst('META-INF/kotlinx_coroutines_core.version')\n     }\n}\n```\n\n### Step 7: Update mainTemplate.gradle\n\nInsert the following script into `Assets\\Plugins\\Android\\mainTemplate.gradle`:\n\n```gradle\nandroid {\n     ...\n     packagingOptions {\n          pickFirst('META-INF/okio.kotlin_module')\n          pickFirst('META-INF/kotlinx_coroutines_core.version')\n     }\n}\n```\n\n### Step 8: Update gradleTemplate.properties\n\nInsert the following script into `Assets\\Plugins\\Android\\gradleTemplate.properties`:\n\n```properties\nandroid.enableJetifier=true\nandroid.suppressUnsupportedCompileSdk=34\n```\n\n---\n\n## Common Errors and Troubleshooting\n\n### `Custom Gradle Properties Template` :\n\n\u003cimg class=\"use-github-assets\" src=\"./Screenshot/Error_gradleproperties_unchecked_popup.png\" height=\"auto\" width=\"640px\" /\u003e\n\n\u003cimg class=\"use-github-assets\" src=\"./Screenshot/Error_gradleproperties_unchecked.png\" height=\"auto\" width=\"640px\" /\u003e\n\n### `Custom Launcher Gradle` and `Custom Main Gradle` :\n\n\u003cimg class=\"use-github-assets\" src=\"./Screenshot/Error_manifestgradle_unchecked_popup.png\" height=\"auto\" width=\"640px\" /\u003e\n\n\u003cimg class=\"use-github-assets\" src=\"./Screenshot/Error_manifestgradle_unchecked.png\" height=\"auto\" width=\"640px\" /\u003e\n\n---\n\nBy following these steps, you can successfully integrate background location functionality into your Unity project using the LAN LiveLocation plugin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrlan2789%2Funity-background-location","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrlan2789%2Funity-background-location","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrlan2789%2Funity-background-location/lists"}