mirror of
https://github.com/lampaa/com.lampa.startapp.git
synced 2026-02-15 00:07:54 +08:00
Update startApp.java
This commit is contained in:
@@ -68,6 +68,15 @@ public class startApp extends CordovaPlugin {
|
||||
*/
|
||||
public void startApp(String component) {
|
||||
Intent LaunchIntent = this.cordova.getActivity().getPackageManager().getLaunchIntentForPackage(component);
|
||||
/**
|
||||
* If you want to pass parameters:
|
||||
*/
|
||||
/**
|
||||
ComponentName comp = new ComponentName("com.component.name", "com.component.name.MainActivity");
|
||||
LaunchIntent.setComponent(comp);
|
||||
LaunchIntent.putExtra("product_id", 102);
|
||||
*/
|
||||
|
||||
this.cordova.getActivity().startActivity(LaunchIntent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user