Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/krlan2789/unity-background-location

Unity Project - LAN LiveLocation Sample
https://github.com/krlan2789/unity-background-location

android gps-tracker gps-tracking location-tracker location-tracking unity unity3d-plugin

Last synced: about 2 months ago
JSON representation

Unity Project - LAN LiveLocation Sample

Awesome Lists containing this project

README

        

# Unity Background Location

Background location sample project using LAN LiveLocation plugin.

## **Supported Platform**

- Android OS *(Tested on Android 10 and Android 14 devices)*
- iOS *(Coming soon)*

## **Requirements and Installation**

1. Install `External Dependency Manager for Unity` :

- Follows [this](https://openupm.com/packages/com.google.external-dependency-manager/#modal-manualinstallation) step.
- Or, download and import [this](https://github.com/googlesamples/unity-jar-resolver/blob/master/external-dependency-manager-latest.unitypackage) custom package.

2. Install `Live Location` using the Package Manager :

- Open the Package Manager Window.
- Click the add button in the Package Manager's toolbar.
- Choose 'Add package from git url'.
- Copy and paste `https://github.com/krlan2789/Unity-LAN-LiveLocation-Plugin.git` into the textbox, then enter.

3. Make sure minimum API Level set to `API Level 26` :

4. Check following build settings :

5. Add required-optional permissions to `Assets/Plugins/Android/AndroidManifest.xml` :

```XML
...











...
```

6. Insert script below into `Assets\Plugins\Android\launcherTemplate.gradle` :

```Gradle
...
android {
...
**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**

// Requirement for Live Location
packagingOptions {
pickFirst('META-INF/okio.kotlin_module')
pickFirst('META-INF/kotlinx_coroutines_core.version')
}
// Requirement for Live Location

**BUILT_APK_LOCATION**
...
}
```

7. Insert script below into `Assets\Plugins\Android\mainTemplate.gradle` :

```Gradle
...
// Android Resolver Exclusions End
android {
...
**PACKAGING_OPTIONS**

// Requirement for Live Location
packagingOptions {
pickFirst('META-INF/okio.kotlin_module')
pickFirst('META-INF/kotlinx_coroutines_core.version')
}
// Requirement for Live Location
}
**IL_CPP_BUILD_SETUP**
...
```

8. Insert script below into `Assets\Plugins\Android\gradleTemplate.properties` :

```Properties
...
android.enableJetifier=true
# Android Resolver Properties End
**ADDITIONAL_PROPERTIES**

# Requirement for Live Location
android.suppressUnsupportedCompileSdk=34
# Requirement for Live Location
```


## **Error When Some Build Settings Do Not Match**

1. `Custom Gradle Properties Template` :



2. `Custom Launcher Gradle` and `Custom Main Gradle` :