Integrate with the AMAPI SDK

The Android Management API (AMAPI) SDK enables specific apps to communicate directly with Android Device Policy (ADP). It includes support for:

The following steps must be taken to integrate the AMAPI SDK with your application:

  1. Add the AMAPI SDK library.
  2. Add the queries element, if target SDK >= 30.

Prerequisites

  • Ensure that your app's minSdkVersion is set to at least API level 21.
  • Add the dependencies for the latest version of the AMAPI SDK to your application. You can find the version of the latest available library, and how to add it to your application, in the AMAPI SDK's release notes page.

Add queries element

If your app targets SDK 30 or later, then queries element is needed in the AndroidManifest.xml to specify that it will interact with ADP.

<queries>
    <package android:name="com.google.android.apps.work.clouddpc" />
</queries>

See Package visibility filtering on Android for more information.