Merge pull request #52 from calclavia/master

Fixed setPackage call for LaunchIntent
This commit is contained in:
lampaa
2016-05-20 11:05:08 +03:00
+3 -4
View File
@@ -81,15 +81,14 @@ public class startApp extends CordovaPlugin {
if (args.get(0) instanceof JSONObject) {
params = args.getJSONObject(0);
LaunchIntent = new Intent();
/**
* set package
* http://developer.android.com/reference/android/content/Intent.html#setPackage(java.lang.String)
*/
if(params.has("package")) {
LaunchIntent = cordova.getActivity().getPackageManager().getLaunchIntentForPackage(params.getString("package"));
}
else {
LaunchIntent = new Intent();
LaunchIntent.setPackage(params.getString("package"));
}
/**