Esempio n. 1
0
 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);
   }
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 private void unregisterReceiver() {
   BroadcastHelper.unregisterReceiver(getContext(), receiver);
 }
Esempio n. 4
0
 private void registerReceiver() {
   IntentFilter filter = new IntentFilter(StatusDispatcher.STATUS_ACTION);
   BroadcastHelper.registerReceiver(getContext(), statusreceiver, filter, true);
 }