{"id":19797789,"url":"https://github.com/krlan2789/unity-background-location","last_synced_at":"2025-02-28T10:47:52.486Z","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":"2025-02-28T10:47:52.457Z","avatar_url":"https://github.com/krlan2789.png","language":"C#","readme":"# Unity Background Location\n\nBackground location sample project using LAN LiveLocation plugin.\n\n## **Supported Platform**\n\n- Android OS *(Tested on Android 10 and Android 14 devices)*\n- iOS *(Coming soon)*\n\n## **Requirements and Installation**\n\n1. Install `External Dependency Manager for Unity` :\n\n    - Follows [this](https://openupm.com/packages/com.google.external-dependency-manager/#modal-manualinstallation) step.\n    - Or, download and import [this](https://github.com/googlesamples/unity-jar-resolver/blob/master/external-dependency-manager-latest.unitypackage) custom package.\n\n2. Install `Live Location` using the Package Manager :\n\n    - Open the Package Manager Window.\n    - Click the add button in the Package Manager's toolbar.\n    - Choose 'Add package from git url'.\n    - Copy and paste `https://github.com/krlan2789/Unity-LAN-LiveLocation-Plugin.git` into the textbox, then enter.\n\n    \u003cimg class=\"use-github-assets\" src=\"./Screenshot/Add_package_from_git_url.png\" height=\"auto\" width=\"640px\" /\u003e\n\n3. Make sure minimum API Level 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\n4. Check following build settings :\n\n    \u003cimg class=\"use-github-assets\" src=\"./Screenshot/Build_Settings.png\" height=\"auto\" width=\"640px\" /\u003e\n\n5. Add required-optional permissions to `Assets/Plugins/Android/AndroidManifest.xml` :\n\n    ```XML\n    ...\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!-- Required permissions --\u003e\n\n    \u003c!-- Optional permissions --\u003e\n    \u003cuses-permission android:name=\"android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS\" /\u003e\n    \u003c!-- Optional permissions --\u003e\n\n    \u003capplication\u003e\n        \u003cactivity android:name=\"com.unity3d.player.UnityPlayerActivity\" android:theme=\"@style/UnityThemeSelector\"\u003e\n    ...\n    ```\n\n6. Insert script below into `Assets\\Plugins\\Android\\launcherTemplate.gradle` :\n\n    ```Gradle\n    ...\n    android {\n        ...\n        **PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**\n\n        // Requirement for Live Location\n        packagingOptions {\n            pickFirst('META-INF/okio.kotlin_module')\n            pickFirst('META-INF/kotlinx_coroutines_core.version')\n        }\n        // Requirement for Live Location\n\n        **BUILT_APK_LOCATION**\n        ...\n    }\n    ```\n\n7. Insert script below into `Assets\\Plugins\\Android\\mainTemplate.gradle` :\n\n    ```Gradle\n    ...\n    // Android Resolver Exclusions End\n    android {\n        ...\n        **PACKAGING_OPTIONS**\n\n        // Requirement for Live Location\n        packagingOptions {\n            pickFirst('META-INF/okio.kotlin_module')\n            pickFirst('META-INF/kotlinx_coroutines_core.version')\n        }\n        // Requirement for Live Location\n    }\n    **IL_CPP_BUILD_SETUP**\n    ...\n    ```\n\n8.  Insert script below into `Assets\\Plugins\\Android\\gradleTemplate.properties` :\n\n    ```Properties\n    ...\n    android.enableJetifier=true\n    # Android Resolver Properties End\n    **ADDITIONAL_PROPERTIES**\n\n    # Requirement for Live Location\n    android.suppressUnsupportedCompileSdk=34\n    # Requirement for Live Location\n    ```\n\n\u003cbr\u003e\n\n## **Error When Some Build Settings Do Not Match**\n\n1. `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\n2. `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","funding_links":[],"categories":[],"sub_categories":[],"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"}