Software Development Kits (SDKs)
Mason provides several Android-compatible SDKs for your use:
- The Framework SDK: Designed to give your app privileged abilities on Mason OS.
- The Hardware Framework SDK: Designed to provide your app with a simple API to interface with device-specific sensors. This Framework is currently supported on A4100 devices.
- The Android SDK: Designed to give your app access to the Mason Platform. This allows you to retrieve information like device name, Group, IMEI, serial, and more.
- Installing the Mason Framework SDK
- Installing the Mason Android SDK
This is the installation guide for the Mason Framework SDK.
Setup
-
Download a
masonstubs.jar
from the options listed on our Framework SDK documentation. -
The
masonstubs.jar
should be placed in yourapp/libs
directory. -
Declare the library as a dependency in your project's gradle file at
app/build.gradle
dependencies {
compileOnly files('libs/masonstubs.jar') // add the mason fw jar - NOTE: update the name to match included file
}
-
Declare your usage of the library in your
AndroidManifest.xml
. Note that this goes within theapplication
tags of your manifest:<uses-library android:name="masonamerica.platform" />
-
Finally, upload your application to the Mason Platform, include it in a Project configuration, and deploy the configuration to your device.
-
Download the
Mason Android SDK AAR
andJavadoc
listed on our Android SDK documentation. -
Include the
.aar
file in the top-levellibs
directory of your project. -
Modify both of your project's
gradle
files:build.gradle
allprojects {
repositories {
// other repositories
flatDir {
dirs 'libs'
}
}
}app/build.gradle
compile(name: 'mason-platform-android-0.2.1-release', ext:'aar') // add the platform aar - NOTE: update the name to match included file
// NOTE: additional required dependencies
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
Need help? Contact us at support@bymason.com.