Mason Framework

The Mason Framework is designed to give your app privileged abilities on Mason OS.


Mason Framework Stubs Jar Javadoc Minimum Supported Mason OS Version(s)
masonstubs-2.11.0.jar Version 2.11.0 documentation (View / Download) 2.11.0
masonstubs-2.10.0.jar Version 2.10.0 documentation (View / Download) 2.10.0
masonstubs-2.9.0.jar Version 2.9.0 documentation (View / Download) 2.9.0
masonstubs-2.8.0.jar Version 2.8.0 documentation (View / Download) 2.8.0
masonstubs-2.7.0.jar Version 2.7.0 documentation (View / Download) 2.7.0
masonstubs-2.2.0.jar Version 2.2.0 documentation (Download) 2.2.0


To begin using the Mason Framework you must include the provided masonstubs.jar in your project. This jar should be placed in your app/libs directory.

Next, you need to 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

Then, you must declare your usage of the library in your AndroidManifest.xml. Note that this goes within the application tags of your manifest:

<uses-library android:name="masonamerica.platform" />

Finally, register your application to the Mason Platform, include it in a Project configuration, and deploy the configuration to your device.


The main interface for utilizing the Mason Framework is the MasonFramework class which provides MasonFramework#get(Context, Class) to retrieve a feature vertical API.

An example of retrieving the WindowManagerPrivileged API can be seen below:

WindowManagerPrivileged windowManagerPrivileged = MasonFramework.get(context, WindowManagerPrivileged.class);

From here, you can invoke whatever the given interface provides.


I’m getting a ClassNotFoundException when attempting to use Mason Framework

Ensure you have declared your usage of the library in your AndroidManifest.xml:

<uses-library android:name="masonamerica.platform" />

I’m getting a SecurityException when attempting to use Mason Framework

Ensure your application is declared in your Project Configuration and that the project has been deployed to your device. NOTE: For development you only need to deploy a configuration with your application declared once. Then you can use install newer versions of your apk as usual using your development tools without needing to update your APK version in your project config.

How can I determine if my application is running on a Mason device?

The simplest way to determine if your app is running on a Mason device is by checking Build.BRAND:

if (Build.BRAND.equals("Mason")) {
  // running on a Mason device. use Mason Framework APIs

How can I use the Mason Framework SDK with an app development framework like Xamarin?

Integrating the Mason Framework stub jar in a Xamarin application requires:

  • Creating a wapper JAR around the masonstubs.jar following the Setup instructions above
  • Creating an Android Bindings Project that includes your wrapper JAR as an EmbeddedJar
  • Adding the Android Bindings Project to your Xamarin application and updating your manifest as mentioned in the Setup instructions above

Reach out to if you have questions about this process.

App updates are not working as expected

Ensure your APK version code was incremented and the new APK is signed with the same certificate as the old APK.