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