I have written a CordavaPlugin derived class.
public class ShowMap extends CordovaPlugin {
@Override
public boolean execute(String action, JSONArray args,
Post now in 2017, because it's the top-ranked google search result for "cordova plugin activity" and top-voted answer, along with Cordova plugin guide are both missing the following critical information, that took me many hours to figure out... the parent attrib of config-file and the specific code:
Added to plugin.xml, customized according to your needs:
Updating launching code with above package & activity:
Context context=this.cordova.getActivity().getApplicationContext();
//or Context context=cordova.getActivity().getApplicationContext();
Intent intent=new Intent(context, com.custompackage.MyCustomActivity.class);
context.startActivity(intent);
//or cordova.getActivity().startActivity(intent);