Code example for IntentFilter

Methods: addAction

0
			mIsConnected = (info.getState() == State.CONNECTED);
		} 
 
		mLockingWifi = lockingWifi;
 
		final IntentFilter filter = new IntentFilter();
		filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
		manager.registerReceiver(this, filter);
	} 
 
	/* (non-Javadoc) 
	 * @see android.content.BroadcastReceiver#onReceive(android.content.Context, android.content.Intent) 
	 */ 
	@Override 
	public void onReceive(Context context, Intent intent) {
		final String action = intent.getAction();
 
		if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
            Log.w(TAG, "onReceived() called: " + intent);
            return; 
Contextual code suggestions in your IDE  Get Codota for Java