android-management-apiandroid-enterpriseandroid-restrictions

Why the AMAPI misses some managed properties from my schema?


I have an Android application with some managed configurations. But when I ask the AMAPI for the schema of this application, not all restrictions are retrieved.

Here is the schema :

    <restrictions xmlns:android="http://schemas.android.com/apk/res/android">
    <restriction
        android:description="@string/column_number_description"
        android:key="column_number"
        android:restrictionType="integer"
        android:title="@string/column_number_title" />
    <restriction
        android:description="@string/status_bar_color_description"
        android:key="status_bar_color"
        android:restrictionType="string"
        android:title="@string/status_bar_color_title" />
    <restriction
        android:description="@string/background_url_description"
        android:key="background_url"
        android:restrictionType="string"
        android:title="@string/background_url_title" />
    <restriction
        android:description="@string/authorized_app_list_description"
        android:key="authorized_app_list"
        android:restrictionType="bundle_array"
        android:title="@string/authorized_app_list_title">
        <restriction
            android:key="authorized_app"
            android:restrictionType="bundle"
            android:title="@string/authorized_app_title">
            <restriction
                android:key="package_name"
                android:restrictionType="string"
                android:title="@string/authorized_app_package_name_title" />
        </restriction>
    </restriction>
</restrictions>

And here is the the response from the AMAPI for the managed properties :

{
  "managedProperties": [
    {
      "key": "column_number",
      "type": "INTEGER",
      "title": "Column number",
      "description": "Set the number of column"
    },
    {
      "key": "status_bar_color",
      "type": "STRING",
      "title": "Status bar color",
      "description": "Set the color of the status bar"
    },
    {
      "key": "background_url",
      "type": "STRING",
      "title": "Background url",
      "description": "Url of the background to download to be displayed in the application"
    },
    {
      "key": "authorized_app_list",
      "type": "BUNDLE_ARRAY",
      "title": "Authorized app list",
      "description": "Set the list of app that will be displayed",
      "nestedProperties": [
        {
          "key": "authorized_app",
          "type": "BUNDLE",
          "title": "Authorized app"
        }
      ]
    }
  ]
}

Do you have any idea why the AMAPI doesn't return the whole configuration for the bundle ?


Solution

  • It has been fixed by Google now the whole schema is sent.

    {
      "managedProperties": [
        {
          "key": "column_number",
          "type": "INTEGER",
          "title": "Column number",
          "description": "Set the number of column"
        },
        {
          "key": "status_bar_color",
          "type": "STRING",
          "title": "Status bar color",
          "description": "Set the color of the status bar"
        },
        {
          "key": "background_url",
          "type": "STRING",
          "title": "Background url",
          "description": "Url of the background to download to be displayed in the application"
        },
        {
          "key": "authorized_app_list",
          "type": "BUNDLE_ARRAY",
          "title": "Authorized app list",
          "description": "Set the list of app that will be displayed",
          "nestedProperties": [
            {
              "key": "authorized_app",
              "type": "BUNDLE",
              "title": "Authorized app",
              "nestedProperties": [
                {
                  "key": "package_name",
                  "type": "STRING",
                  "title": "App package name"
                }
              ]
            }
          ]
        }
      ]
    }