Code example for Intent

Methods: getBooleanExtra

0
            hideNotification(message);
        } 
    } 
 
    public boolean isHelperIntent(Intent i) {
        return i.getBooleanExtra(HELPER_NOTIFICATION, false);
    } 
 
    private static void registerReceiver(Context context) {
        IntentFilter filter = new IntentFilter(HELPER_BROADCAST_ACTION);
        // Scheme is needed, otherwise only broadcast with no data will be catched. 
        filter.addDataScheme(NOTIFICATION_SCHEME);
        mReceiver = new BroadcastReceiver() {
            @Override 
            public void onReceive(Context context, Intent intent) {
                mInstance.handleNotificationIntent(intent);
            } 
        }; 
        context.registerReceiver(mReceiver, filter);
    }