Register now for Android Dev Summit 2019!

KeyedAppStatesReporter

abstract class KeyedAppStatesReporter
kotlin.Any
   ↳ androidx.enterprise.feedback.KeyedAppStatesReporter

A reporter of keyed app states to enable communication between an app and an EMM (enterprise mobility management). For production use SingletonKeyedAppStatesReporter. For testing see the FakeKeyedAppStatesReporter class in the enterprise-feedback-testing artifact.

Summary

Public methods

abstract Unit

Set app states to be sent to an EMM (enterprise mobility management).

abstract Unit

Performs the same function as setStates(Collection), except it also requests that the states are immediately uploaded to be accessible via server APIs.

Public methods

setStates

abstract fun setStates(@NonNull states: MutableCollection<KeyedAppState!>): Unit

Set app states to be sent to an EMM (enterprise mobility management). The EMM can then display this information to the management organization.

Do not send personally-identifiable information with this method.

Each provided keyed app state will replace any previously set keyed app states with the same key for this package name.

If multiple keyed app states are set with the same key, only one will be received by the EMM. Which will be received is not defined.

This information is sent immediately to all device owner and profile owner apps on the device. It is also sent immediately to the app with package name com.android.vending if it exists, which is the Play Store on GMS devices.

EMMs can access these states either directly in a custom DPC (device policy manager), via Android Management APIs, or via Play EMM APIs.

setStatesImmediate

abstract fun setStatesImmediate(@NonNull states: MutableCollection<KeyedAppState!>): Unit

Performs the same function as setStates(Collection), except it also requests that the states are immediately uploaded to be accessible via server APIs.

The receiver is not obligated to meet this immediate upload request. For example, Play and Android Management APIs have daily quotas.