Code example for Intent

Methods: setComponent

0
 
    return(super.onOptionsItemSelected(item));
  } 
 
  private void refreshPlugin() { 
    Intent call=new Intent(ACTION_CALL_FOR_CONTENT);
 
    call.setComponent(pluginCN);
    sendBroadcast(call);
  } 
 
  private BroadcastReceiver plugin=new BroadcastReceiver() {
    @Override 
    public void onReceive(Context ctxt, Intent i) { 
      if (ACTION_REGISTER_PLUGIN.equals(i.getAction())) { 
        pluginCN=(ComponentName)i.getParcelableExtra(EXTRA_COMPONENT); 
      } 
      else if (ACTION_DELIVER_CONTENT.equals(i.getAction())) { 
        RemoteViews rv=(RemoteViews)i.getParcelableExtra(EXTRA_CONTENT); 
        ViewGroup frame=(ViewGroup)findViewById(android.R.id.content);