KeyedAppStatesService

public abstract class KeyedAppStatesService
extends Service

java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ androidx.enterprise.feedback.KeyedAppStatesService


Base service for receiving app states in Device Owner and Profile Owner apps.

Extend this class and declare it as a service in the manifest. For example, if your service is called 'MyAppStatesService', including the following in the manifest:

 <service android:name=".MyAppStatesService">
     <intent-filter>
         <action android:name="androidx.enterprise.feedback.action.APP_STATES" />
     </intent-filter>
 </service>

Override onReceive(Collection, boolean) to receive keyed app states. onReceive(Collection, boolean) is invoked on a background thread.

Summary

Inherited constants

Public constructors

KeyedAppStatesService()

Public methods

IBinder onBind(Intent intent)
abstract void onReceive(Collection<ReceivedKeyedAppState> states, boolean requestSync)

Called when an app sends states.

Inherited methods