List of usage examples for android.content IntentFilter addAction
public final void addAction(String action)
From source file:com.h6ah4i.android.example.openslmediaplayer.app.framework.AppEventBus.java
private static IntentFilter createIntentFilter(Receiver<?> receiver) { int[] categories = receiver.getCategoryFilter(); IntentFilter filter = new IntentFilter(); if (categories != null) { for (int category : categories) { filter.addAction(categoryToActionName(category)); }//from w ww . ja v a 2 s. co m } return filter; }
From source file:com.android.screenspeak.SideTapManager.java
public static IntentFilter getFilter() { IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_SCREEN_ON); filter.addAction(Intent.ACTION_SCREEN_OFF); return filter; }
From source file:com.ec.android.module.bluetooth40.base.BaseBluetoothControlActivity.java
private static IntentFilter makeGattUpdateIntentFilter() { final IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(BluetoothLeService.ACTION_GATT_ERROR); intentFilter.addAction(BluetoothLeService.ACTION_GATT_CONNECTED); intentFilter.addAction(BluetoothLeService.ACTION_GATT_DISCONNECTED); intentFilter.addAction(BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED); intentFilter.addAction(BluetoothLeService.ACTION_DATA_AVAILABLE); return intentFilter; }
From source file:cloud.artik.example.simplecontroller.ControlActivity.java
private static IntentFilter makeWebsocketUpdateIntentFilter() { final IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(ArtikCloudSession.WEBSOCKET_LIVE_ONOPEN); intentFilter.addAction(ArtikCloudSession.WEBSOCKET_LIVE_ONMSG); intentFilter.addAction(ArtikCloudSession.WEBSOCKET_LIVE_ONCLOSE); intentFilter.addAction(ArtikCloudSession.WEBSOCKET_LIVE_ONERROR); intentFilter.addAction(ArtikCloudSession.WEBSOCKET_WS_ONOPEN); intentFilter.addAction(ArtikCloudSession.WEBSOCKET_WS_ONREG); intentFilter.addAction(ArtikCloudSession.WEBSOCKET_WS_ONMSG); intentFilter.addAction(ArtikCloudSession.WEBSOCKET_WS_ONACK); intentFilter.addAction(ArtikCloudSession.WEBSOCKET_WS_ONCLOSE); intentFilter.addAction(ArtikCloudSession.WEBSOCKET_WS_ONERROR); return intentFilter; }
From source file:com.nagopy.android.xposed.utilities.ModBrightness.java
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) @XMinSdkVersion(Build.VERSION_CODES.JELLY_BEAN_MR1) @HandleInitPackageResources(targetPackage = XConst.PKG_SYSTEM_UI, summary = "??") public static void brightnessDebugger(final String modulePath, final InitPackageResourcesParam resparam, final ModBrightnessSettingsGen settings) throws Throwable { if (!settings.brightnessDebugger) { return;//from w w w .j a va2 s.c om } resparam.res.hookLayout(XConst.PKG_SYSTEM_UI, "layout", "super_status_bar", new XC_LayoutInflated() { @Override public void handleLayoutInflated(LayoutInflatedParam liparam) throws Throwable { LinearLayout parent = (LinearLayout) liparam.view .findViewById(liparam.res.getIdentifier("system_icon_area", "id", XConst.PKG_SYSTEM_UI)); // ? TextView luxTextView = new TextView(parent.getContext()); luxTextView.setTextSize(8); luxTextView.setSingleLine(false); luxTextView.setTextColor(Color.WHITE); luxTextView.setText(""); parent.setGravity(Gravity.CENTER_VERTICAL); parent.addView(luxTextView, 0); AutoBrightnessController autoBrightnessChangedReceiver = new AutoBrightnessController(luxTextView); IntentFilter intentFilter = new IntentFilter( AutoBrightnessController.ACTION_AUTO_BRIGHTNESS_CHANGED); intentFilter.addAction(Intent.ACTION_SCREEN_OFF); parent.getContext().registerReceiver(autoBrightnessChangedReceiver, intentFilter); } }); }
From source file:com.hmsoft.bluetooth.le.DeviceControlActivity.java
private static IntentFilter makeGattUpdateIntentFilter() { // final IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(BluetoothLeService.ACTION_GATT_CONNECTED); intentFilter.addAction(BluetoothLeService.ACTION_GATT_DISCONNECTED); intentFilter.addAction(BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED); intentFilter.addAction(BluetoothLeService.ACTION_DATA_AVAILABLE); intentFilter.addAction(BluetoothDevice.ACTION_UUID); return intentFilter; }
From source file:com.example.emulator.EmulatorFragment.java
private static IntentFilter makeGattUpdateIntentFilter() { final IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(Peripheral.ACTION_GATT_CONNECTION); return intentFilter; }
From source file:com.github.akinaru.bleanalyzer.activity.ScanActivity.java
/** * add filter to intent to receive notification from bluetooth service * * @return intent filter//from w w w . j a va 2 s.c o m */ private static IntentFilter makeGattUpdateIntentFilter() { IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(BluetoothEvents.BT_EVENT_SCAN_START); intentFilter.addAction(BluetoothEvents.BT_EVENT_SCAN_END); intentFilter.addAction(BluetoothEvents.BT_EVENT_DEVICE_DISCOVERED); intentFilter.addAction(BluetoothEvents.BT_EVENT_DEVICE_CONNECTED); intentFilter.addAction(BluetoothEvents.BT_EVENT_DEVICE_DISCONNECTED); return intentFilter; }
From source file:com.diogogomes.openvidonn.app.SettingsActivity.java
private static IntentFilter makeGattUpdateIntentFilter() { final IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(BluetoothLeService.ACTION_DATA_AVAILABLE); return intentFilter; }
From source file:com.muggins.test.ble.DeviceControlActivity.java
private static IntentFilter makeGattUpdateIntentFilter() { final IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(BluetoothLeService.ACTION_GATT_CONNECTED); intentFilter.addAction(BluetoothLeService.ACTION_GATT_DISCONNECTED); intentFilter.addAction(BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED); intentFilter.addAction(BluetoothLeService.ACTION_DATA_AVAILABLE); intentFilter.addAction(BluetoothLeService.EMOTION); return intentFilter; }