Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed setPackage call for LaunchIntent #52

Merged
merged 1 commit into from
May 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/android/startApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,14 @@ public void start(JSONArray args, CallbackContext callback) {
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"));
}

/**
Expand Down