mirror of
https://gitee.com/shuto/cordova-plugin-file-opener2.git
synced 2025-01-31 12:02:49 +08:00
Merge pull request #261 from abcfy2/patch-1
fix: add Intent.FLAG_ACTIVITY_NEW_TASK flag
This commit is contained in:
commit
2c0f018661
@ -114,7 +114,7 @@ public class FileOpener2 extends CordovaPlugin {
|
|||||||
path = FileProvider.getUriForFile(context, cordova.getActivity().getPackageName() + ".opener.provider", file);
|
path = FileProvider.getUriForFile(context, cordova.getActivity().getPackageName() + ".opener.provider", file);
|
||||||
}
|
}
|
||||||
intent.setDataAndType(path, contentType);
|
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 {
|
} else {
|
||||||
intent = new Intent(Intent.ACTION_VIEW);
|
intent = new Intent(Intent.ACTION_VIEW);
|
||||||
|
Loading…
Reference in New Issue
Block a user