1
0
mirror of https://github.com/danog/termux-api.git synced 2024-11-30 04:19:20 +01:00
This commit is contained in:
Daniil Gentili 2019-09-03 23:38:04 +00:00
commit 53e0ad9b22
4 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,7 @@ android {
applicationId "com.termux.api"
minSdkVersion 21
targetSdkVersion 28
versionCode 35
versionCode 36
versionName "0.${versionCode}"
}

View File

@ -77,7 +77,7 @@ public class NotificationAPI {
long[] vibratePattern = intent.getLongArrayExtra("vibrate");
boolean useSound = intent.getBooleanExtra("sound", false);
boolean ongoing = intent.getBooleanExtra("ongoing", false);
boolean alertOnce = intent.getBooleanExtra("alert-once", true);
boolean alertOnce = intent.getBooleanExtra("alert-once", false);
String actionExtra = intent.getStringExtra("action");

View File

@ -28,6 +28,7 @@ public class StorageGetAPI {
Intent intent1 = new Intent(context, StorageActivity.class);
intent1.putExtra(FILE_EXTRA, fileExtra);
intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent1);
});
}

View File

@ -119,7 +119,7 @@ public class TermuxApiReceiver extends BroadcastReceiver {
final boolean NotificationServiceEnabled = flat != null && flat.contains(cn.flattenToString());
if (!NotificationServiceEnabled) {
Toast.makeText(context,"Please give Termux:API Notification Access", Toast.LENGTH_LONG).show();
context.startActivity(new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"));
context.startActivity(new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS").addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
} else {
NotificationListAPI.onReceive(this, context, intent);
}