Skip to content

Commit

Permalink
Merge pull request pwlin#261 from abcfy2/patch-1
Browse files Browse the repository at this point in the history
fix: add Intent.FLAG_ACTIVITY_NEW_TASK flag
  • Loading branch information
shnist authored Jun 3, 2019
2 parents f7e1da9 + 109fb47 commit 2c0f018
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private void _open(String fileArg, String contentType, Boolean openWithDefault,
path = FileProvider.getUriForFile(context, cordova.getActivity().getPackageName() + ".opener.provider", file);
}
intent.setDataAndType(path, contentType);
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_ACTIVITY_NEW_TASK);

} else {
intent = new Intent(Intent.ACTION_VIEW);
Expand Down

0 comments on commit 2c0f018

Please sign in to comment.