Example usage for android.content Intent ACTION_APPLICATION_RESTRICTIONS_CHANGED

List of usage examples for android.content Intent ACTION_APPLICATION_RESTRICTIONS_CHANGED

Introduction

In this page you can find the example usage for android.content Intent ACTION_APPLICATION_RESTRICTIONS_CHANGED.

Prototype

String ACTION_APPLICATION_RESTRICTIONS_CHANGED

To view the source code for android.content Intent ACTION_APPLICATION_RESTRICTIONS_CHANGED.

Click Source Link

Document

Broadcast Action: Sent after application restrictions are changed.

Usage

From source file:com.google.codelabs.appauth.MainActivity.java

private void registerRestrictionsReceiver() {
    IntentFilter restrictionsFilter = new IntentFilter(Intent.ACTION_APPLICATION_RESTRICTIONS_CHANGED);

    mRestrictionsReceiver = new BroadcastReceiver() {
        @Override/*from  w w  w  .ja  v  a2 s  .  c  om*/
        public void onReceive(Context context, Intent intent) {
            getAppRestrictions();
        }
    };

    registerReceiver(mRestrictionsReceiver, restrictionsFilter);
}