Code example for Intent

Methods: getActiongetParcelableExtra

0
  } 
 
  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); 
 
        frame.removeAllViews(); 
 
        View pluginView=rv.apply(RemoteViewsHostActivity.this, frame); 
 
        frame.addView(pluginView); 
      } 
    } 
  }; 
}