Search in sources :

Example 31 with IntentFilter

use of android.content.IntentFilter in project LolliPin by OrangeGangsters.

the class PinActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    IntentFilter filter = new IntentFilter(AppLockActivity.ACTION_CANCEL);
    LocalBroadcastManager.getInstance(this).registerReceiver(mPinCancelledReceiver, filter);
}
Also used : IntentFilter(android.content.IntentFilter)

Example 32 with IntentFilter

use of android.content.IntentFilter in project LolliPin by OrangeGangsters.

the class PinCompatActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    IntentFilter filter = new IntentFilter(AppLockActivity.ACTION_CANCEL);
    LocalBroadcastManager.getInstance(this).registerReceiver(mPinCancelledReceiver, filter);
}
Also used : IntentFilter(android.content.IntentFilter)

Example 33 with IntentFilter

use of android.content.IntentFilter in project LolliPin by OrangeGangsters.

the class PinFragmentActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    IntentFilter filter = new IntentFilter(AppLockActivity.ACTION_CANCEL);
    LocalBroadcastManager.getInstance(this).registerReceiver(mPinCancelledReceiver, filter);
}
Also used : IntentFilter(android.content.IntentFilter)

Example 34 with IntentFilter

use of android.content.IntentFilter in project android_frameworks_base by ParanoidAndroid.

the class DateTimeView method registerReceivers.

private void registerReceivers() {
    Context context = getContext();
    IntentFilter filter = new IntentFilter();
    filter.addAction(Intent.ACTION_TIME_TICK);
    filter.addAction(Intent.ACTION_TIME_CHANGED);
    filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
    filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
    context.registerReceiver(mBroadcastReceiver, filter);
    Uri uri = Settings.System.getUriFor(Settings.System.DATE_FORMAT);
    context.getContentResolver().registerContentObserver(uri, true, mContentObserver);
}
Also used : Context(android.content.Context) IntentFilter(android.content.IntentFilter) Uri(android.net.Uri)

Example 35 with IntentFilter

use of android.content.IntentFilter in project android_frameworks_base by ParanoidAndroid.

the class TextClock method registerReceiver.

private void registerReceiver() {
    final IntentFilter filter = new IntentFilter();
    filter.addAction(Intent.ACTION_TIME_TICK);
    filter.addAction(Intent.ACTION_TIME_CHANGED);
    filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
    getContext().registerReceiver(mIntentReceiver, filter, null, getHandler());
}
Also used : IntentFilter(android.content.IntentFilter)

Aggregations

IntentFilter (android.content.IntentFilter)1441 Intent (android.content.Intent)493 Context (android.content.Context)292 BroadcastReceiver (android.content.BroadcastReceiver)274 PendingIntent (android.app.PendingIntent)148 RemoteException (android.os.RemoteException)80 ComponentName (android.content.ComponentName)54 Handler (android.os.Handler)53 View (android.view.View)45 Test (org.junit.Test)41 Uri (android.net.Uri)40 PowerManager (android.os.PowerManager)38 ArrayList (java.util.ArrayList)37 TextView (android.widget.TextView)36 ResolveInfo (android.content.pm.ResolveInfo)30 File (java.io.File)29 Point (android.graphics.Point)28 PackageManager (android.content.pm.PackageManager)27 IOException (java.io.IOException)25 HandlerThread (android.os.HandlerThread)24