AppliedAutonomy.Sdk.Mobile
1.0.0-alpha.3
dotnet add package AppliedAutonomy.Sdk.Mobile --version 1.0.0-alpha.3
NuGet\Install-Package AppliedAutonomy.Sdk.Mobile -Version 1.0.0-alpha.3
<PackageReference Include="AppliedAutonomy.Sdk.Mobile" Version="1.0.0-alpha.3" />
<PackageVersion Include="AppliedAutonomy.Sdk.Mobile" Version="1.0.0-alpha.3" />
<PackageReference Include="AppliedAutonomy.Sdk.Mobile" />
paket add AppliedAutonomy.Sdk.Mobile --version 1.0.0-alpha.3
#r "nuget: AppliedAutonomy.Sdk.Mobile, 1.0.0-alpha.3"
#:package AppliedAutonomy.Sdk.Mobile@1.0.0-alpha.3
#addin nuget:?package=AppliedAutonomy.Sdk.Mobile&version=1.0.0-alpha.3&prerelease
#tool nuget:?package=AppliedAutonomy.Sdk.Mobile&version=1.0.0-alpha.3&prerelease
AppliedAutonomy.Sdk.Mobile
Intro
This is a Xamarin Android bindings library for the Applied Autonomy Android Mobile SDK. The Applied Autonomy SDK for Android provides easy access to some of the Applied Autonomy cloud services. The sdk also includes the Mobility Service which transmits mobility data to Applied Autonomy.
Minimum requirements
- Android Sdk >= 19 (Android 4.4, KitKat)
Manifest
To allow the mobility sensor to work, make sure the following permissions are added to your AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
Reasons for the permissions:
- INTERNET: To enable rest calls from the phone
- FOREGROUND_SERVICE: Required to be always on to monitor your mobility. Background service executions are limited to a few minutes.
- ACCESS_FINE_LOCATION: Required to know your precise location to build your mobility path.
- ACCESS_BACKGROUND_LOCATION: Required to know your location in the background, even when the app is closed or not in use.
- RECEIVE_BOOT_COMPLETED: Allows the service to restart automatically on reboot.
- WAKE_LOCK: The monitor claims some cpu power to be able to check sensors. We need this permission to not be battery optimized on android 11+.
Use
Contact Applied Autonomy to obtain SDK url, key and other unique properties for connecting to the Applied Autonomy cloud service. Add the AppliedAutonomy.Sdk.Mobile NuGet to your Xamarin.Android project.
Namespaces
using Appliedautonomy.Mobile.Xamarin;
using Appliedautonomy.Mobile.Domain;
Instantiate SDK client
Client client = new Client(Application, SdkUrl, key, companyId, appId, null, licenseKey, false);
Console.WriteLine("Company: " + client.Company.Name);
Console.WriteLine("Mobility endpoint: " + client.MobilityEndpoint);
Console.WriteLine("Mobility key: " + client.MobilityKey);
Console.WriteLine("Installation ID: " + client.MobilityInstallationId);
Provision license
client.ProvisionLicense();
Console.WriteLine("License key: " + client.License?.LicenseKey);
Start the Mobility service
client.StartMobility(notificationChannelId, notificationId, Class);
Stop the Mobility service
client.StopMobility();
Check if the Mobility service is running
Console.WriteLine("Running " + client.MobilityRunning);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-android was computed. net7.0-android was computed. net8.0-android was computed. net9.0-android was computed. net10.0-android was computed. |
MonoAndroid | monoandroid is compatible. |
-
MonoAndroid 0.0
- Karamunting.KotlinX.Coroutines.Android (>= 1.4.2)
- Square.OkHttp3 (>= 4.9.3)
- Square.Retrofit2 (>= 2.9.0)
- Square.Retrofit2.ConverterGson (>= 2.9.0)
- Xamarin.AndroidX.AppCompat (>= 1.4.1)
- Xamarin.AndroidX.Core (>= 1.7.0)
- Xamarin.AndroidX.Work.Runtime (>= 2.7.1.2)
- Xamarin.Kotlin.StdLib (>= 1.6.10)
- xamarin-android-tmd-core (>= 0.4.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0-alpha.3 | 219 | 3/17/2022 |
1.0.0-alpha.2 | 194 | 2/16/2022 |
1.0.0-alpha.1 | 188 | 2/16/2022 |
Initial release (prerelease 3). Introduces Android SDK12 and license support.