Code example for IntentFilter

Methods: registerReceiver

0
  private Bundle results=null;
   
  protected void setUp() throws Exception { 
    super.setUp(); 
     
    getContext().registerReceiver(onBroadcast, new IntentFilter(ACTION));
  } 
   
  protected void tearDown() { 
    getContext().unregisterReceiver(onBroadcast);
  } 
   
  protected Bundle execServiceTest(Bundle input) {
    Intent i=new Intent(getInterpreterName());
     
    i.putExtra(InterpreterService.BUNDLE, input);
    i.putExtra(InterpreterService.BROADCAST_ACTION, ACTION);
     
    getContext().startService(i);
     
    try {