Code example for IntentFilter

Methods: setPriority

0
	   	        intentFilter = new IntentFilter("android.intent.action.NEW_OUTGOING_CALL"); 
		        airs.registerReceiver(SystemReceiver, intentFilter); 
	   		   	startedOutgoingCall = true; 
		        break; 
           case INIT_SMSRECEIVED: 
	   	        intentFilter = new IntentFilter("android.provider.Telephony.SMS_RECEIVED"); 
		        // since SMS_RECEIVED is sent via ordered broadcast, we have to make sure that we  
		        // receive this with highest priority in case a receiver aborts the broadcast! 
		        intentFilter.setPriority(1000000);		 
		        airs.registerReceiver(SystemReceiver, intentFilter); 
	   		   	startedSMSReceived = true; 
		        break; 
           case INIT_SMSSENT: 
        	    SmsObserver smsSentObserver = new SmsObserver(new Handler()); 
        	    airs.getContentResolver().registerContentObserver(SMS_STATUS_URI, true, smsSentObserver); 
	   		   	startedSMSSent = true; 
		        break; 
           default:   
           		break; 
           }