Open links in a new task

This commit is contained in:
tonymanou
2018-08-06 18:56:20 +08:00
committed by John Wu
parent 9e72317302
commit ebb7a9fcda
2 changed files with 2 additions and 4 deletions
@@ -91,6 +91,7 @@ public class Utils {
public static void openLink(Context context, Uri link) {
Intent intent = new Intent(Intent.ACTION_VIEW, link);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (intent.resolveActivity(context.getPackageManager()) != null) {
context.startActivity(intent);
}