Compare commits

...

2 Commits
v0.47 ... v0.48

Author SHA1 Message Date
Fredrik Fornwall
f6f0809558 Bump version to 0.48 2017-03-02 00:32:09 +01:00
Fredrik Fornwall
11ed7e45d8 Fix crash when opening URL:s in Android < 7.0
In versions of Android earlier than 7.0 the FLAG_ACTIVITY_NEW_TASK
is needed when starting an activity from a non-activity context.

This was removed in Android 7.0 (possibly by mistake), see
https://code.google.com/p/android/issues/detail?id=226647.

Fixes #802
2017-03-02 00:29:17 +01:00
2 changed files with 3 additions and 2 deletions

View File

@@ -13,8 +13,8 @@ android {
applicationId "com.termux"
minSdkVersion 21
targetSdkVersion 25
versionCode 47
versionName "0.47"
versionCode 48
versionName "0.48"
externalNativeBuild {
ndkBuild {

View File

@@ -31,6 +31,7 @@ public class TermuxOpenReceiver extends BroadcastReceiver {
final boolean isExternalUrl = data.getScheme() != null && !data.getScheme().equals("file");
if (isExternalUrl) {
Intent viewIntent = new Intent(Intent.ACTION_VIEW, data);
viewIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
context.startActivity(viewIntent);
} catch (ActivityNotFoundException e) {