Compare commits
No commits in common. "27e9b3e0d1162fd2f05fd245a34621fd3b0099d0" and "6f80caa1c69893e9c693d2dcb4f3518a12c463a1" have entirely different histories.
27e9b3e0d1
...
6f80caa1c6
@ -11,8 +11,8 @@ android {
|
|||||||
compileSdkVersion 31
|
compileSdkVersion 31
|
||||||
buildToolsVersion '29.0.2'
|
buildToolsVersion '29.0.2'
|
||||||
useLibrary 'org.apache.http.legacy'
|
useLibrary 'org.apache.http.legacy'
|
||||||
versionCode 126
|
versionCode 125
|
||||||
versionName "1.7.11"
|
versionName "1.7.10"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
@ -476,9 +476,7 @@ public class Rule implements Comparable<Rule>
|
|||||||
{
|
{
|
||||||
AutomationService service = AutomationService.getInstance();
|
AutomationService service = AutomationService.getInstance();
|
||||||
service.speak(messages[0], false);
|
service.speak(messages[0], false);
|
||||||
|
Toast.makeText(service, messages[0], Toast.LENGTH_LONG).show();
|
||||||
if(Settings.showToasts)
|
|
||||||
Toast.makeText(service, messages[0], Toast.LENGTH_LONG).show();
|
|
||||||
|
|
||||||
super.onProgressUpdate(messages);
|
super.onProgressUpdate(messages);
|
||||||
}
|
}
|
||||||
|
@ -440,9 +440,7 @@ public class Rule implements Comparable<Rule>
|
|||||||
{
|
{
|
||||||
AutomationService service = AutomationService.getInstance();
|
AutomationService service = AutomationService.getInstance();
|
||||||
service.speak(messages[0], false);
|
service.speak(messages[0], false);
|
||||||
|
Toast.makeText(service, messages[0], Toast.LENGTH_LONG).show();
|
||||||
if(Settings.showToasts)
|
|
||||||
Toast.makeText(service, messages[0], Toast.LENGTH_LONG).show();
|
|
||||||
|
|
||||||
super.onProgressUpdate(messages);
|
super.onProgressUpdate(messages);
|
||||||
}
|
}
|
||||||
|
@ -467,9 +467,7 @@ public class Rule implements Comparable<Rule>
|
|||||||
{
|
{
|
||||||
AutomationService service = AutomationService.getInstance();
|
AutomationService service = AutomationService.getInstance();
|
||||||
service.speak(messages[0], false);
|
service.speak(messages[0], false);
|
||||||
|
Toast.makeText(service, messages[0], Toast.LENGTH_LONG).show();
|
||||||
if(Settings.showToasts)
|
|
||||||
Toast.makeText(service, messages[0], Toast.LENGTH_LONG).show();
|
|
||||||
|
|
||||||
super.onProgressUpdate(messages);
|
super.onProgressUpdate(messages);
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,6 @@ import com.jens.automation2.receivers.PhoneStatusListener;
|
|||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@ -42,7 +41,6 @@ import java.util.Set;
|
|||||||
public class AutomationService extends Service implements OnInitListener
|
public class AutomationService extends Service implements OnInitListener
|
||||||
{
|
{
|
||||||
protected TextToSpeech ttsEngine = null;
|
protected TextToSpeech ttsEngine = null;
|
||||||
protected int ttsStatus = -1;
|
|
||||||
protected final static int notificationId = 1000;
|
protected final static int notificationId = 1000;
|
||||||
protected final static int notificationIdRestrictions = 1005;
|
protected final static int notificationIdRestrictions = 1005;
|
||||||
protected final static int notificationIdLocationRestriction = 1006;
|
protected final static int notificationIdLocationRestriction = 1006;
|
||||||
@ -99,11 +97,6 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
this.lockSoundChangesEnd = lockSoundChangesEnd;
|
this.lockSoundChangesEnd = lockSoundChangesEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTtsStatus()
|
|
||||||
{
|
|
||||||
return ttsStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected final IBinder myBinder = new LocalBinder();
|
protected final IBinder myBinder = new LocalBinder();
|
||||||
|
|
||||||
protected LocationProvider myLocationProvider;
|
protected LocationProvider myLocationProvider;
|
||||||
@ -233,8 +226,7 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
this.isRunning = true;
|
this.isRunning = true;
|
||||||
|
|
||||||
Miscellaneous.logEvent("i", "Service", this.getResources().getString(R.string.serviceStarted) + " VERSION_CODE: " + BuildConfig.VERSION_CODE + ", VERSION_NAME: " + BuildConfig.VERSION_NAME + ", flavor: " + BuildConfig.FLAVOR, 1);
|
Miscellaneous.logEvent("i", "Service", this.getResources().getString(R.string.serviceStarted) + " VERSION_CODE: " + BuildConfig.VERSION_CODE + ", VERSION_NAME: " + BuildConfig.VERSION_NAME + ", flavor: " + BuildConfig.FLAVOR, 1);
|
||||||
if(Settings.showToasts)
|
Toast.makeText(this, this.getResources().getString(R.string.serviceStarted), Toast.LENGTH_LONG).show();
|
||||||
Toast.makeText(this, this.getResources().getString(R.string.serviceStarted), Toast.LENGTH_LONG).show();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
On normal phones the app is supposed to automatically restart in case of any problems.
|
On normal phones the app is supposed to automatically restart in case of any problems.
|
||||||
@ -314,8 +306,7 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
|
|
||||||
stopRoutine();
|
stopRoutine();
|
||||||
this.isRunning = false;
|
this.isRunning = false;
|
||||||
if(Settings.showToasts)
|
Toast.makeText(this, getResources().getString(R.string.serviceStopped), Toast.LENGTH_LONG).show();
|
||||||
Toast.makeText(this, getResources().getString(R.string.serviceStopped), Toast.LENGTH_LONG).show();
|
|
||||||
Miscellaneous.logEvent("i", "Service", getResources().getString(R.string.serviceStopped), 1);
|
Miscellaneous.logEvent("i", "Service", getResources().getString(R.string.serviceStopped), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,26 +315,8 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
if (Settings.useTextToSpeechOnNormal || Settings.useTextToSpeechOnSilent || Settings.useTextToSpeechOnVibrate || Rule.isAnyRuleUsing(Action.Action_Enum.speakText))
|
if (Settings.useTextToSpeechOnNormal || Settings.useTextToSpeechOnSilent || Settings.useTextToSpeechOnVibrate || Rule.isAnyRuleUsing(Action.Action_Enum.speakText))
|
||||||
{
|
{
|
||||||
if (ttsEngine == null)
|
if (ttsEngine == null)
|
||||||
{
|
ttsEngine = new TextToSpeech(this, this);
|
||||||
ttsEngine = new TextToSpeech(this, new TextToSpeech.OnInitListener()
|
} else
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void onInit(int status)
|
|
||||||
{
|
|
||||||
ttsStatus = status;
|
|
||||||
|
|
||||||
if (status == TextToSpeech.SUCCESS)
|
|
||||||
{
|
|
||||||
ttsEngine.setLanguage(Locale.getDefault());
|
|
||||||
Miscellaneous.logEvent("i", "TTS engine", "TTS engine available.", 3);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Miscellaneous.logEvent("i", "TTS engine", "TTS engine not available. Status: " + String.valueOf(status), 3);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (ttsEngine != null)
|
if (ttsEngine != null)
|
||||||
ttsEngine.shutdown();
|
ttsEngine.shutdown();
|
||||||
@ -698,26 +671,25 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
for(int i = 0; i < 60; i++)
|
for(int i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
if(ttsEngine == null || ttsStatus != TextToSpeech.SUCCESS)
|
if(ttsEngine != null)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "TTS", "Waiting for a moment to give the TTS service time to load...", 4);
|
Miscellaneous.logEvent("i", "TTS", "Waiting for a moment to give the TTS service time to load...", 4);
|
||||||
Thread.sleep(500); // give the tts engine time to load
|
Thread.sleep(1000); // give the tts engine time to load
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{}
|
{}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("i", "TextToSpeech", "Speaking \"" + text + "\" in language " + ttsEngine.getLanguage().toLanguageTag(), 3);
|
|
||||||
this.ttsEngine.speak(text, TextToSpeech.QUEUE_ADD, null);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Miscellaneous.logEvent("i", "TextToSpeech", "TTS engine not available after waiting 30 seconds, yet. Aborting.", 3);
|
Miscellaneous.logEvent("i", "TextToSpeech", "Speaking " + text + " in language " + ttsEngine.getLanguage().toLanguageTag(), 3);
|
||||||
|
this.ttsEngine.speak(text, TextToSpeech.QUEUE_ADD, null);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,6 @@ public class Settings implements SharedPreferences
|
|||||||
public static int tabsPlacement;
|
public static int tabsPlacement;
|
||||||
public static boolean executeRulesAndProfilesWithSingleClick;
|
public static boolean executeRulesAndProfilesWithSingleClick;
|
||||||
public static boolean displayNewsOnMainScreen;
|
public static boolean displayNewsOnMainScreen;
|
||||||
public static boolean showToasts;
|
|
||||||
public static boolean automaticUpdateCheck;
|
public static boolean automaticUpdateCheck;
|
||||||
public static long musicCheckFrequency;
|
public static long musicCheckFrequency;
|
||||||
|
|
||||||
@ -131,8 +130,6 @@ public class Settings implements SharedPreferences
|
|||||||
public static final int default_tabsPlacement = 0;
|
public static final int default_tabsPlacement = 0;
|
||||||
public static final boolean default_executeRulesAndProfilesWithSingleClick = false;
|
public static final boolean default_executeRulesAndProfilesWithSingleClick = false;
|
||||||
public static final boolean default_displayNewsOnMainScreen = false;
|
public static final boolean default_displayNewsOnMainScreen = false;
|
||||||
|
|
||||||
public static final boolean default_showToasts = true;
|
|
||||||
public static final boolean default_automaticUpdateCheck = false;
|
public static final boolean default_automaticUpdateCheck = false;
|
||||||
public static final boolean default_lockSoundChanges = false;
|
public static final boolean default_lockSoundChanges = false;
|
||||||
public static final long default_lastNewsPolltime = -1;
|
public static final long default_lastNewsPolltime = -1;
|
||||||
@ -280,7 +277,6 @@ public class Settings implements SharedPreferences
|
|||||||
executeRulesAndProfilesWithSingleClick = prefs.getBoolean("executeRulesAndProfilesWithSingleClick", default_executeRulesAndProfilesWithSingleClick);
|
executeRulesAndProfilesWithSingleClick = prefs.getBoolean("executeRulesAndProfilesWithSingleClick", default_executeRulesAndProfilesWithSingleClick);
|
||||||
automaticUpdateCheck = prefs.getBoolean("automaticUpdateCheck", default_automaticUpdateCheck);
|
automaticUpdateCheck = prefs.getBoolean("automaticUpdateCheck", default_automaticUpdateCheck);
|
||||||
displayNewsOnMainScreen = prefs.getBoolean("displayNewsOnMainScreen", default_displayNewsOnMainScreen);
|
displayNewsOnMainScreen = prefs.getBoolean("displayNewsOnMainScreen", default_displayNewsOnMainScreen);
|
||||||
showToasts = prefs.getBoolean("showToasts", default_showToasts);
|
|
||||||
|
|
||||||
lockSoundChanges = prefs.getBoolean("lockSoundChanges", default_lockSoundChanges);
|
lockSoundChanges = prefs.getBoolean("lockSoundChanges", default_lockSoundChanges);
|
||||||
noticeAndroid9MicrophoneShown = prefs.getBoolean("noticeAndroid9MicrophoneShown", false);
|
noticeAndroid9MicrophoneShown = prefs.getBoolean("noticeAndroid9MicrophoneShown", false);
|
||||||
@ -476,9 +472,6 @@ public class Settings implements SharedPreferences
|
|||||||
if(!prefs.contains("displayNewsOnMainScreen") || force)
|
if(!prefs.contains("displayNewsOnMainScreen") || force)
|
||||||
editor.putBoolean("displayNewsOnMainScreen", default_displayNewsOnMainScreen);
|
editor.putBoolean("displayNewsOnMainScreen", default_displayNewsOnMainScreen);
|
||||||
|
|
||||||
if(!prefs.contains("showToasts") || force)
|
|
||||||
editor.putBoolean("showToasts", default_showToasts);
|
|
||||||
|
|
||||||
if(!prefs.contains("musicCheckFrequency") || force)
|
if(!prefs.contains("musicCheckFrequency") || force)
|
||||||
editor.putLong("musicCheckFrequency", default_musicCheckFrequency);
|
editor.putLong("musicCheckFrequency", default_musicCheckFrequency);
|
||||||
|
|
||||||
@ -562,7 +555,6 @@ public class Settings implements SharedPreferences
|
|||||||
editor.putBoolean("executeRulesAndProfilesWithSingleClick", executeRulesAndProfilesWithSingleClick);
|
editor.putBoolean("executeRulesAndProfilesWithSingleClick", executeRulesAndProfilesWithSingleClick);
|
||||||
editor.putBoolean("automaticUpdateCheck", automaticUpdateCheck);
|
editor.putBoolean("automaticUpdateCheck", automaticUpdateCheck);
|
||||||
editor.putBoolean("displayNewsOnMainScreen", displayNewsOnMainScreen);
|
editor.putBoolean("displayNewsOnMainScreen", displayNewsOnMainScreen);
|
||||||
editor.putBoolean("showToasts", showToasts);
|
|
||||||
|
|
||||||
if(Settings.musicCheckFrequency == 0)
|
if(Settings.musicCheckFrequency == 0)
|
||||||
Settings.musicCheckFrequency = Settings.default_musicCheckFrequency;
|
Settings.musicCheckFrequency = Settings.default_musicCheckFrequency;
|
||||||
|
@ -74,12 +74,7 @@
|
|||||||
android:title="@string/displayNewsOnMainScreen"
|
android:title="@string/displayNewsOnMainScreen"
|
||||||
android:summary="@string/displayNewsOnMainScreenDescription" />
|
android:summary="@string/displayNewsOnMainScreenDescription" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
</PreferenceCategory>
|
||||||
android:key="showToasts"
|
|
||||||
android:title="@string/showToastsForEvents"
|
|
||||||
android:summary="@string/showToastsForEventsSummary" />
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:summary="@string/soundSettings"
|
android:summary="@string/soundSettings"
|
||||||
|
@ -777,6 +777,4 @@
|
|||||||
<string name="attachment">Dateianhang</string>
|
<string name="attachment">Dateianhang</string>
|
||||||
<string name="chooseFile">Datei wählen</string>
|
<string name="chooseFile">Datei wählen</string>
|
||||||
<string name="startAppByStartService">via startService()</string>
|
<string name="startAppByStartService">via startService()</string>
|
||||||
<string name="showToastsForEvents">Toasts anzeigen</string>
|
|
||||||
<string name="showToastsForEventsSummary">Popups anzeigen, wenn Ereignisse wie Regelausführungen auftreten</string>
|
|
||||||
</resources>
|
</resources>
|
@ -776,6 +776,4 @@
|
|||||||
<string name="attachment">Archivo adjunto</string>
|
<string name="attachment">Archivo adjunto</string>
|
||||||
<string name="chooseFile">elegir archivo</string>
|
<string name="chooseFile">elegir archivo</string>
|
||||||
<string name="startAppByStartService">via startService()</string>
|
<string name="startAppByStartService">via startService()</string>
|
||||||
<string name="showToastsForEvents">Mostrar toasts</string>
|
|
||||||
<string name="showToastsForEventsSummary">Mostrar notificaciones del sistema cuando se producen eventos como ejecuciones de reglas</string>
|
|
||||||
</resources>
|
</resources>
|
@ -776,6 +776,4 @@
|
|||||||
<string name="attachment">Attachement</string>
|
<string name="attachment">Attachement</string>
|
||||||
<string name="chooseFile">Choisissez un fichier</string>
|
<string name="chooseFile">Choisissez un fichier</string>
|
||||||
<string name="startAppByStartService">via startService()</string>
|
<string name="startAppByStartService">via startService()</string>
|
||||||
<string name="showToastsForEvents">Afficher les toasts</string>
|
|
||||||
<string name="showToastsForEventsSummary">Afficher les toasts lorsque des événements tels que des exécutions de règles se produisent</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -777,6 +777,4 @@
|
|||||||
<string name="attachment">Allegato</string>
|
<string name="attachment">Allegato</string>
|
||||||
<string name="chooseFile">Scegli file</string>
|
<string name="chooseFile">Scegli file</string>
|
||||||
<string name="startAppByStartService">tramite startService()</string>
|
<string name="startAppByStartService">tramite startService()</string>
|
||||||
<string name="showToastsForEvents">Mostra toast</string>
|
|
||||||
<string name="showToastsForEventsSummary">Mostrare gli avvisi popup quando si verificano eventi come le esecuzioni di regole</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -775,7 +775,5 @@
|
|||||||
<string name="attachment">Bijlage</string>
|
<string name="attachment">Bijlage</string>
|
||||||
<string name="chooseFile">kies bestand</string>
|
<string name="chooseFile">kies bestand</string>
|
||||||
<string name="startAppByStartService">via startService()</string>
|
<string name="startAppByStartService">via startService()</string>
|
||||||
<string name="showToastsForEvents">Toon toasts</string>
|
|
||||||
<string name="showToastsForEventsSummary">Pop-ups weergeven wanneer gebeurtenissen zoals regeluitvoeringen plaatsvinden</string>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -834,6 +834,4 @@
|
|||||||
<string name="attachment">Прикрепление</string>
|
<string name="attachment">Прикрепление</string>
|
||||||
<string name="chooseFile">выберите файл</string>
|
<string name="chooseFile">выберите файл</string>
|
||||||
<string name="startAppByStartService">дорога startService()</string>
|
<string name="startAppByStartService">дорога startService()</string>
|
||||||
<string name="showToastsForEvents">Показать тосты</string>
|
|
||||||
<string name="showToastsForEventsSummary">Отображение всплывающих уведомлений при таких событиях, как выполнение правил</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -874,6 +874,4 @@
|
|||||||
<string name="attachment">Attachment</string>
|
<string name="attachment">Attachment</string>
|
||||||
<string name="chooseFile">choose file</string>
|
<string name="chooseFile">choose file</string>
|
||||||
<string name="startAppByStartService">by startService()</string>
|
<string name="startAppByStartService">by startService()</string>
|
||||||
<string name="showToastsForEvents">Show toasts</string>
|
|
||||||
<string name="showToastsForEventsSummary">Show toasts when events like rule executions occur</string>
|
|
||||||
</resources>
|
</resources>
|
@ -1,2 +0,0 @@
|
|||||||
* Behoben: Sprachausgabe hat nicht immer funktioniert, vor allem beim Programmstart
|
|
||||||
* Neu: Möglichkeit Toasts zu deaktivieren, z.B. für Regel-Aktivierungen
|
|
@ -1,4 +1,4 @@
|
|||||||
* Fixed: Now allowing negative integers as intent data
|
* Fixed: Now allowing negative integers as intent data
|
||||||
* Fixed: Multiple time frames with reoccurrence configured would trigger to early executions
|
* Fixed: Multiple time frames with reoccurence configured would trigger to early executions
|
||||||
* Fixed: Automatic app start at boot might fail in some cases
|
* Fixed: Automatic app start at boot might fail in some cases
|
||||||
* Translations updated
|
* Translations updated
|
@ -1,2 +0,0 @@
|
|||||||
* Fixed: TTS engine wouldn't always speak, especially at the startup of the app
|
|
||||||
* Added: Possibility to disable toasts for e.g. announcing rule activations
|
|
@ -1,2 +0,0 @@
|
|||||||
* Corregido: el motor TTS no siempre hablaba, especialmente al inicio de la aplicación
|
|
||||||
* Añadido: Posibilidad de desactivar las notificaciones del sistema para, por ejemplo, anunciar activaciones de reglas
|
|
@ -1,2 +0,0 @@
|
|||||||
* Correction : le moteur TTS ne parlait pas toujours, surtout au démarrage de l'application
|
|
||||||
* Ajouté: Possibilité de désactiver les toasts pour, par exemple, annoncer les activations de règles
|
|
@ -1,2 +0,0 @@
|
|||||||
* Risolto: il motore TTS non parlava sempre, specialmente all'avvio dell'app
|
|
||||||
* Aggiunto: Possibilità di disabilitare gli avvisi popup ad esempio per annunciare l'attivazione delle regole
|
|
@ -1,2 +0,0 @@
|
|||||||
* Opgelost: TTS-engine zou niet altijd spreken, vooral bij het opstarten van de app
|
|
||||||
* Toegevoegd: Mogelijkheid om toasts uit te schakelen voor bijvoorbeeld het aankondigen van regelactiveringen
|
|
@ -1,2 +0,0 @@
|
|||||||
* Исправлено: движок TTS не всегда говорил, особенно при запуске приложения
|
|
||||||
* Добавлено: Возможность отключения всплывающих уведомлений, например, для объявления активации правил
|
|
Loading…
Reference in New Issue
Block a user