public static void send(Context context, StatusMessage tosend) { if (ScreenStateDetector.getScreenState(context)) { Intent i = new Intent(StatusDispatcher.REFRESH_INTENT); i.putExtras(tosend.status); BroadcastHelper.sendBroadcast(context, i, true); } }
private void registerReceiver() { IntentFilter filter = new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); BroadcastHelper.registerReceiver(getContext(), receiver, filter, false); }
private void unregisterReceiver() { BroadcastHelper.unregisterReceiver(getContext(), receiver); }
private void registerReceiver() { IntentFilter filter = new IntentFilter(StatusDispatcher.STATUS_ACTION); BroadcastHelper.registerReceiver(getContext(), statusreceiver, filter, true); }