Compare commits

..

2 Commits

Author SHA1 Message Date
jens 5417b4e739 Small bugfixes 2026-04-12 12:47:59 +02:00
jens 7e72dfd19a Version 1.8.7 2026-03-06 22:22:34 +01:00
17 changed files with 29 additions and 13 deletions
+4 -4
View File
@@ -3,16 +3,16 @@ plugins {
} }
android { android {
compileSdkVersion 34 compileSdkVersion 36
defaultConfig { defaultConfig {
applicationId "com.jens.automation2" applicationId "com.jens.automation2"
minSdkVersion 16 minSdkVersion 19
compileSdkVersion 36 compileSdkVersion 36
buildToolsVersion '36.0.0' buildToolsVersion '36.0.0'
useLibrary 'org.apache.http.legacy' useLibrary 'org.apache.http.legacy'
versionCode 147 versionCode 148
versionName "1.8.6" versionName "1.8.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
@@ -524,7 +524,7 @@ public class Action
triggerUrl(context); triggerUrl(context);
break; break;
case setBluetooth: case setBluetooth:
Actions.setBluetooth(context, getParameter1(), toggleActionIfPossible); boolean result = Actions.setBluetooth(context, getParameter1(), toggleActionIfPossible);
break; break;
case setUsbTethering: case setUsbTethering:
Actions.setUsbTethering(context, getParameter1(), toggleActionIfPossible); Actions.setUsbTethering(context, getParameter1(), toggleActionIfPossible);
@@ -825,7 +825,7 @@ public class Actions
public static Boolean setBluetooth(Context context, Boolean desiredState, boolean toggleActionIfPossible) public static Boolean setBluetooth(Context context, Boolean desiredState, boolean toggleActionIfPossible)
{ {
Miscellaneous.logEvent("i", "Bluetooth", "Changing bluetooth to " + String.valueOf(desiredState), 4); Miscellaneous.logEvent("i", "Bluetooth", "Changing bluetooth to " + String.valueOf(desiredState), 4);
// mPhone.setDataEnabled(enable);
try try
{ {
BluetoothAdapter myBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); BluetoothAdapter myBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
@@ -841,16 +841,16 @@ public class Actions
if (!myBluetoothAdapter.isEnabled() && desiredState) if (!myBluetoothAdapter.isEnabled() && desiredState)
{ {
Toast.makeText(context, context.getResources().getString(R.string.activating) + " Bluetooth.", Toast.LENGTH_LONG).show(); Toast.makeText(context, context.getResources().getString(R.string.activating) + " Bluetooth.", Toast.LENGTH_LONG).show();
myBluetoothAdapter.enable(); return myBluetoothAdapter.enable();
return true; //return true;
} }
// deactivate // deactivate
if (myBluetoothAdapter.isEnabled() && !desiredState) if (myBluetoothAdapter.isEnabled() && !desiredState)
{ {
Toast.makeText(context, context.getResources().getString(R.string.deactivating) + " Bluetooth.", Toast.LENGTH_LONG).show(); Toast.makeText(context, context.getResources().getString(R.string.deactivating) + " Bluetooth.", Toast.LENGTH_LONG).show();
myBluetoothAdapter.disable(); return myBluetoothAdapter.disable();
return true; //return true;
} }
} }
catch (NullPointerException e) catch (NullPointerException e)
@@ -68,7 +68,7 @@ public class ActivityMainTabLayout extends TabActivity
super.onResume(); super.onResume();
Miscellaneous.setDisplayLanguage(this); Miscellaneous.setDisplayLanguage(this);
// Miscellaneous.logEvent("i", "NFC", "ActivityMainTabLayout.onResume().", 5); // Miscellaneous.logEvent("i", "NFC", "ActivityMainTabLayout.onResume().", 5);
if(!(getIntent().getAction().isEmpty()) && getIntent().getAction().equals(NfcAdapter.ACTION_NDEF_DISCOVERED)) if(!(getIntent().getAction() == null || getIntent().getAction().isEmpty()) && getIntent().getAction().equals(NfcAdapter.ACTION_NDEF_DISCOVERED))
{ {
NfcReceiver.checkIntentForNFC(this, getIntent()); NfcReceiver.checkIntentForNFC(this, getIntent());
moveTaskToBack(true); moveTaskToBack(true);
@@ -677,6 +677,8 @@ public class ActivityPermissions extends Activity
addToArrayListUnique(Manifest.permission.BLUETOOTH, requiredPermissions); addToArrayListUnique(Manifest.permission.BLUETOOTH, requiredPermissions);
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions); addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions); addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
if(Build.VERSION.SDK_INT >= 31)
addToArrayListUnique(Manifest.permission.BLUETOOTH_CONNECT, requiredPermissions);
break; break;
case setDataConnection: case setDataConnection:
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions); addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
@@ -1414,7 +1414,8 @@ public class Miscellaneous extends Service
builder.setOnlyAlertOnce(true); builder.setOnlyAlertOnce(true);
if(Settings.showIconWhenServiceIsRunning && notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE)) //if(Settings.showIconWhenServiceIsRunning && notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE))
if(notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE))
{ {
if(BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay)) if(BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay))
builder.setSmallIcon(R.drawable.crane); builder.setSmallIcon(R.drawable.crane);
+1 -1
View File
@@ -685,7 +685,7 @@
<string name="unlocked">ontgrendeld</string> <string name="unlocked">ontgrendeld</string>
<string name="selectDesiredState">Selecteer de gewenste status</string> <string name="selectDesiredState">Selecteer de gewenste status</string>
<string name="screenState">Schermstatus</string> <string name="screenState">Schermstatus</string>
<string name="featureCeasedToWorkLastWorkingAndroidVersion">Vanwege de oneindige wijsheid van Google is de laatste Android-versie waarvan bekend is dat deze functie werkt% 1 $ s. U kunt het configureren, maar het zal waarschijnlijk geen effect hebben.</string> <string name="featureCeasedToWorkLastWorkingAndroidVersion">Vanwege de oneindige wijsheid van Google is de laatste Android-versie waarvan bekend is dat deze functie werkt %1$s. U kunt het configureren, maar het zal waarschijnlijk geen effect hebben.</string>
<string name="actionMediaControl">Het afspelen van media regelen</string> <string name="actionMediaControl">Het afspelen van media regelen</string>
<string name="selectCommand">Opdracht Selecteren</string> <string name="selectCommand">Opdracht Selecteren</string>
<string name="playPause">schakelaar afspelen/pauzeren</string> <string name="playPause">schakelaar afspelen/pauzeren</string>
@@ -0,0 +1 @@
* Geändert: MinSdk auf 19 erhöht, benötigt mindestens Android 4.4
@@ -0,0 +1 @@
* Changed: Raised minSdk to 19, requiring at minimum Android 4.4
@@ -0,0 +1,4 @@
* Fixed: Crash when opening the application through the running service's notification
* Fixed: Crash when starting service and show service icon was deactivated in app settings
* Fixed: "Bluetooth connect" permission was not requested for turning Bluetooth on or off.
* Fixed: Another app started/stopped couldn't be added when UI language was Dutch.
@@ -0,0 +1 @@
* Cambiado: Subido minSdk a 19, requiriendo al mínimo Android 4.4
@@ -0,0 +1 @@
* Modifié : Portée du minSdk à 19, nécessitant au minimum Android 4.4
@@ -0,0 +1 @@
* Modificato: Aumentato il minSdk a 19, richiedendo almeno Android 4.4
@@ -0,0 +1 @@
* Gewijzigd: minSdk verhoogd naar 19, minimaal Android 4.4 vereist
@@ -0,0 +1 @@
* Zmieniono: Podniesiono minSdk do 19, wymagając co najmniej Androida 4.4
@@ -0,0 +1 @@
* Изменено: minSdk повышен до 19, требуется минимум Android 4.4
@@ -0,0 +1 @@
* 更改:将 minSDK 提升至 19,至少要求 Android 4.4