diff --git a/app/src/main/java/com/jens/automation2/Actions.java b/app/src/main/java/com/jens/automation2/Actions.java
index 8822070..b7e92a7 100644
--- a/app/src/main/java/com/jens/automation2/Actions.java
+++ b/app/src/main/java/com/jens/automation2/Actions.java
@@ -1053,7 +1053,7 @@ public class Actions
{
Miscellaneous.logEvent("i", "StartOtherActivity", "Starting other Activity...", 4);
- String params[];
+ String[] params;
if(param.contains(Action.actionParameter2Split))
params = param.split(Action.actionParameter2Split, -1);
@@ -1113,7 +1113,7 @@ public class Actions
externalApplicationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// Pack intents
- if(params.length >= 4)
+ if(params.length >= 5)
{
if(Miscellaneous.isNumeric(startupType))
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 4);
diff --git a/app/src/main/java/com/jens/automation2/AutomationService.java b/app/src/main/java/com/jens/automation2/AutomationService.java
index b4668eb..5429ff4 100644
--- a/app/src/main/java/com/jens/automation2/AutomationService.java
+++ b/app/src/main/java/com/jens/automation2/AutomationService.java
@@ -243,7 +243,7 @@ public class AutomationService extends Service implements OnInitListener
updateNotification();
- if (isMainActivityRunning(this))
+ if(isMainActivityRunning(this))
ActivityMainScreen.updateMainScreen();
this.isRunning = true;
@@ -543,42 +543,6 @@ public class AutomationService extends Service implements OnInitListener
centralInstance = null;
Settings.serviceStartDone = false;
}
-
- protected static Builder createDefaultNotificationBuilderOld()
- {
- Builder builder = new Builder(AutomationService.getInstance());
- builder.setContentTitle("Automation");
-
- if(Settings.showIconWhenServiceIsRunning)
- {
- if(BuildConfig.FLAVOR.equalsIgnoreCase(AutomationService.flavor_name_googleplay))
- builder.setSmallIcon(R.drawable.crane);
- else
- builder.setSmallIcon(R.drawable.ic_launcher);
- }
-
- builder.setCategory(Notification.CATEGORY_SERVICE);
- builder.setWhen(System.currentTimeMillis());
- builder.setContentIntent(myPendingIntent);
-
- Notification defaultNotification = builder.build();
-
- defaultNotification.icon = R.drawable.crane;
- defaultNotification.when = System.currentTimeMillis();
-
-// defaultNotification.defaults |= Notification.DEFAULT_VIBRATE;
-// defaultNotification.defaults |= Notification.DEFAULT_LIGHTS;
-
- defaultNotification.flags |= Notification.FLAG_AUTO_CANCEL;
-// defaultNotification.flags |= Notification.FLAG_SHOW_LIGHTS;
- defaultNotification.flags |= Notification.FLAG_ONLY_ALERT_ONCE;
-
-// defaultNotification.ledARGB = Color.YELLOW;
-// defaultNotification.ledOnMS = 1500;
-// defaultNotification.ledOffMS = 1500;
-
- return builder;
- }
protected static NotificationCompat.Builder createServiceNotificationBuilder()
{
@@ -628,6 +592,9 @@ public class AutomationService extends Service implements OnInitListener
@SuppressWarnings("deprecation")
public static void updateNotification()
{
+ if(!Settings.showIconWhenServiceIsRunning && Build.VERSION.SDK_INT < Build.VERSION_CODES.O)
+ return;
+
AutomationService instance = getInstance();
if(instance != null)
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 9519ef5..818aecc 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -801,7 +801,7 @@
Chino (China)
Este activador será válido si acabas de desconectarte del wifi especificado anteriormente O mientras el servicio aún se está iniciando y si no estás conectado a ningún wifi. Si desea que el activador se active solo cuando se desconecte explícitamente de una determinada red WiFi, agregue otro activador \"el servicio no se está iniciando\".
Nombre de la clase
- a través de startForegroundService((
+ a través de startForegroundService()
Método
Tomar captura de pantalla
Enlazar al servicio de accesibilidad
diff --git a/fastlane/metadata/android/en-US/changelogs/144.txt b/fastlane/metadata/android/en-US/changelogs/144.txt
index b411637..86f761f 100644
--- a/fastlane/metadata/android/en-US/changelogs/144.txt
+++ b/fastlane/metadata/android/en-US/changelogs/144.txt
@@ -7,5 +7,6 @@
* Fixed: Calendar events were not regarded if created after Automation service start
* Fixed: Bug in NFC trigger that affected only the Google Play version
* Fixed: Examples URL fixed
+* Fixed: Service icon could not be hidden in Android 7 and below
* Added: Variable checks can now be inverted. Also regular expressions are now supported.
* Added: Setting to turn on/off console logging (logcat)
\ No newline at end of file