DelegatedAdminReceiver.OnSecurityLogsAvailable(Context, Intent) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called each time a new batch of security logs can be retrieved.
[Android.Runtime.Register("onSecurityLogsAvailable", "(Landroid/content/Context;Landroid/content/Intent;)V", "GetOnSecurityLogsAvailable_Landroid_content_Context_Landroid_content_Intent_Handler", ApiSince=31)]
public virtual void OnSecurityLogsAvailable (Android.Content.Context context, Android.Content.Intent intent);
[<Android.Runtime.Register("onSecurityLogsAvailable", "(Landroid/content/Context;Landroid/content/Intent;)V", "GetOnSecurityLogsAvailable_Landroid_content_Context_Landroid_content_Intent_Handler", ApiSince=31)>]
abstract member OnSecurityLogsAvailable : Android.Content.Context * Android.Content.Intent -> unit
override this.OnSecurityLogsAvailable : Android.Content.Context * Android.Content.Intent -> unit
Parameters
- context
- Context
The running context as per #onReceive
.
- intent
- Intent
The received intent as per #onReceive
.
- Attributes
Remarks
Called each time a new batch of security logs can be retrieved. This callback method will only ever be called when security logging is enabled. The logs can only be retrieved while security logging is enabled.
If a secondary user or profile is created, this callback won't be received until all users become affiliated again (even if security logging is enabled). It will also no longer be possible to retrieve the security logs. See DevicePolicyManager#setAffiliationIds
.
This callback is only applicable if the delegated app has DevicePolicyManager#DELEGATION_SECURITY_LOGGING
capability. Additionally, it must declare an intent filter for DeviceAdminReceiver#ACTION_SECURITY_LOGS_AVAILABLE
in the receiver's manifest in order to receive this callback. The default implementation simply throws UnsupportedOperationException
.
This callback is triggered by a foreground broadcast and the app should ensure that any long-running work is not executed synchronously inside the callback.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.