Compare commits
145 Commits
Author | SHA1 | Date | |
---|---|---|---|
2a067507ae | |||
1c8eec735d | |||
53f46c10da | |||
c5f04afe85 | |||
4d7fa711f9 | |||
4bea2113fa | |||
890260b8eb | |||
230521149f | |||
9a50da550a | |||
941bb3e1af | |||
5653a9c70e | |||
8c6331237d | |||
1bbf04d548 | |||
a2d93d27cb | |||
0463e0aa19 | |||
41cf907be3 | |||
acae282a0d | |||
ebfceee69f | |||
69283c5fea | |||
fff0bde9d8 | |||
f9c76ba951 | |||
d1263b46b6 | |||
64801d8ff2 | |||
3d8257aeec | |||
67b2a81647 | |||
3e9590d7d2 | |||
21b8c6c7ec | |||
dc8cc14d20 | |||
4fc1f8a2a9 | |||
d7e1cd44e8 | |||
c1139e1cb8 | |||
03c8a1ff60 | |||
20acd563e7 | |||
5ae193847e | |||
391479b164 | |||
fa578b175d | |||
0008642044 | |||
359dd545c7 | |||
89ac69fd4b | |||
b88801500f | |||
128116025f | |||
5d3e89595f | |||
8e5ad15c34 | |||
8b29dd0985 | |||
c34ec83425 | |||
cdf1a8baa8 | |||
d28ee8d00d | |||
2bb6f81596 | |||
6f0dbc9555 | |||
a9bd7b9561 | |||
81d6ab7b5f | |||
034c76fe30 | |||
15637e914d | |||
cd6ed7543c | |||
f991325566 | |||
b744e76b07 | |||
06d63826e6 | |||
fb87d5e42d | |||
17109b12d4 | |||
92ca6d6cb4 | |||
5fdc68e396 | |||
ab0f2d88b4 | |||
06a6651fae | |||
473c464bf7 | |||
a5b9ced9ba | |||
9cea3f4285 | |||
0438a58f3e | |||
97f32bd012 | |||
6588443459 | |||
604ab0eb43 | |||
31c4f6c1d1 | |||
0c646b55fc | |||
88cdc366c5 | |||
2bd94e8a3d | |||
074f75ed20 | |||
d988e1f43d | |||
23502f52bb | |||
9a6083247f | |||
ba2a340bdf | |||
9e2f7c16f6 | |||
d042b3f35a | |||
220d2d316e | |||
4aa095e801 | |||
b5bd332ff5 | |||
969937f8a0 | |||
e3598cc475 | |||
e63d97be0c | |||
e60fb1535a | |||
8563234db3 | |||
448942e4e8 | |||
dcdb770d9f | |||
b5040cedb3 | |||
423839fa43 | |||
a6edab75ce | |||
cb430b957f | |||
b6a0f6dd91 | |||
bc32cbc179 | |||
d9cc604bdd | |||
db21011b7f | |||
dc35c8b7fb | |||
5a7cbfcdc9 | |||
913a37a320 | |||
14655fe55d | |||
cfc145c6c4 | |||
325bff305c | |||
4371fb56f7 | |||
6593f6c923 | |||
7fbac92360 | |||
7415830dd7 | |||
dce68d79bd | |||
397dadd8c7 | |||
c51c46707b | |||
d699285b5a | |||
cf3db22ffb | |||
f53abe2b23 | |||
ba2f96713d | |||
21d9351b2b | |||
a8bfc6f7ec | |||
71d9791603 | |||
d71177f3da | |||
eef6c3234a | |||
192142c76b | |||
9a2a0aa6a4 | |||
c18a880ad7 | |||
a845ea7c63 | |||
2d9695344b | |||
24d05e6d87 | |||
07b0513eae | |||
e445b787a9 | |||
82156059fa | |||
b976ff95b6 | |||
a4b2745b7b | |||
844be6a4a7 | |||
49a48fc371 | |||
722750b724 | |||
ab51eb3655 | |||
7b88e7a612 | |||
bb2f5c9842 | |||
883a7e8341 | |||
bfc0e3ac4f | |||
23ded3a851 | |||
6d363fd02d | |||
3c0f889db7 | |||
d018c27f0e | |||
7e36f0f32e |
2
.gitignore
vendored
2
.gitignore
vendored
@ -148,3 +148,5 @@ fabric.properties
|
||||
|
||||
/app/app-release.apk
|
||||
Automation_settings.xml
|
||||
/app/googlePlayFlavor/
|
||||
/.idea/deploymentTargetDropDown.xml
|
||||
|
10
.idea/runConfigurations.xml
generated
10
.idea/runConfigurations.xml
generated
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -11,8 +11,8 @@ android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.2'
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
versionCode 105
|
||||
versionName "1.6.34"
|
||||
versionCode 116
|
||||
versionName "1.7.2"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@ -36,44 +36,42 @@ android {
|
||||
flavorDimensions "version"
|
||||
|
||||
productFlavors
|
||||
{
|
||||
googlePlayFlavor
|
||||
{
|
||||
dimension "version"
|
||||
// applicationIdSuffix ".googlePlay"
|
||||
versionNameSuffix "-googlePlay"
|
||||
targetSdkVersion 29
|
||||
}
|
||||
{
|
||||
googlePlayFlavor
|
||||
{
|
||||
dimension "version"
|
||||
versionNameSuffix "-googlePlay"
|
||||
targetSdkVersion 30
|
||||
}
|
||||
|
||||
fdroidFlavor
|
||||
{
|
||||
dimension "version"
|
||||
// applicationIdSuffix ".fdroid"
|
||||
// versionNameSuffix "-fdroid"
|
||||
targetSdkVersion 28
|
||||
}
|
||||
fdroidFlavor
|
||||
{
|
||||
dimension "version"
|
||||
targetSdkVersion 28
|
||||
}
|
||||
|
||||
apkFlavor
|
||||
{
|
||||
dimension "version"
|
||||
// applicationIdSuffix ".apk"
|
||||
versionNameSuffix "-apk"
|
||||
targetSdkVersion 28
|
||||
}
|
||||
}
|
||||
apkFlavor
|
||||
{
|
||||
dimension "version"
|
||||
versionNameSuffix "-apk"
|
||||
targetSdkVersion 28
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
googlePlayFlavorImplementation 'com.google.firebase:firebase-appindexing:19.2.0'
|
||||
googlePlayFlavorImplementation 'com.google.android.gms:play-services-location:17.1.0'
|
||||
|
||||
apkFlavorImplementation 'com.google.firebase:firebase-appindexing:19.2.0'
|
||||
apkFlavorImplementation 'com.google.android.gms:play-services-location:17.1.0'
|
||||
googlePlayFlavorImplementation 'com.google.firebase:firebase-appindexing:20.0.0'
|
||||
googlePlayFlavorImplementation 'com.google.android.gms:play-services-location:18.0.0'
|
||||
|
||||
apkFlavorImplementation 'com.google.firebase:firebase-appindexing:20.0.0'
|
||||
apkFlavorImplementation 'com.google.android.gms:play-services-location:18.0.0'
|
||||
|
||||
implementation 'com.linkedin.dexmaker:dexmaker:2.25.0'
|
||||
implementation 'org.apache.commons:commons-lang3:3.0'
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
//implementation "androidx.security:security-crypto:1.0.0"
|
||||
//implementation "androidx.security:security-identity-credential:1.0.0-alpha02"
|
||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||
implementation 'com.google.android.material:material:1.3.0'
|
||||
testImplementation 'junit:junit:4.+'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": 2,
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
@ -10,9 +10,11 @@
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 104,
|
||||
"versionName": "1.6.33-googlePlay",
|
||||
"attributes": [],
|
||||
"versionCode": 116,
|
||||
"versionName": "1.7.2-googlePlay",
|
||||
"outputFile": "app-googlePlayFlavor-release.apk"
|
||||
}
|
||||
]
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
@ -65,6 +65,7 @@
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
|
||||
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
@ -121,31 +122,39 @@
|
||||
<receiver android:name=".receivers.PackageReplacedReceiver"
|
||||
android:enabled="true">
|
||||
<intent-filter>
|
||||
<!--<action android:name="android.intent.action.PACKAGE_ADDED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_REPLACED" />
|
||||
<action android:name="android.intent.action.PACKAGE_REMOVED"/>
|
||||
<action android:name="android.intent.action.ACTION_PACKAGE_REPLACED" />-->
|
||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
||||
|
||||
<!--<data
|
||||
android:path="com.jens.automation2"
|
||||
android:scheme="package" />-->
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".receivers.AlarmListener" />
|
||||
<receiver android:name=".receivers.DateTimeListener" />
|
||||
<receiver android:name=".receivers.ConnectivityReceiver" />
|
||||
<receiver android:name=".receivers.TimeZoneListener" />
|
||||
|
||||
<receiver
|
||||
android:name=".DeviceAdmin"
|
||||
android:description="@string/app_name"
|
||||
android:label="@string/app_name"
|
||||
android:permission= "android.permission.BIND_DEVICE_ADMIN" >
|
||||
<meta-data
|
||||
android:name="android.app.device_admin"
|
||||
android:resource="@xml/policies" />
|
||||
<intent-filter>
|
||||
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity android:name=".ActivityManageRule" />
|
||||
<activity android:name=".ActivityManageActionTriggerUrl" />
|
||||
<activity android:name=".ActivityDisplayLongMessage" />
|
||||
<activity android:name=".ActivityManageActionSendTextMessage" />
|
||||
<activity android:name=".ActivityManageActionPlaySound" />
|
||||
<activity android:name=".ActivityManageTriggerProfile" />
|
||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||
<activity android:name=".ActivityMaintenance" />
|
||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||
<activity android:name=".ActivityManageTriggerDeviceOrientation" />
|
||||
<activity android:name=".ActivityHelp" />
|
||||
<activity android:name=".ActivityManageActionVibrate" />
|
||||
<activity
|
||||
android:name=".ActivityMainTabLayout"
|
||||
android:launchMode="singleTask">
|
||||
@ -206,7 +215,6 @@
|
||||
|
||||
<activity android:name=".ActivityPermissions" />
|
||||
|
||||
|
||||
<!-- https://developer.android.com/about/versions/pie/android-9.0-changes-28#apache-p-->
|
||||
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -291,10 +291,10 @@ public class ActivityDetectionReceiver extends IntentService implements Automati
|
||||
* and some activities are hierarchical (ON_FOOT is a generalization of WALKING and RUNNING).
|
||||
*/
|
||||
|
||||
ArrayList<Rule> allRulesWithActivityDetection = Rule.findRuleCandidatesByActivityDetection();
|
||||
ArrayList<Rule> allRulesWithActivityDetection = Rule.findRuleCandidates(Trigger_Enum.activityDetection);
|
||||
for(int i=0; i<allRulesWithActivityDetection.size(); i++)
|
||||
{
|
||||
if(allRulesWithActivityDetection.get(i).applies(Miscellaneous.getAnyContext()))
|
||||
if(allRulesWithActivityDetection.get(i).getsGreenLight(Miscellaneous.getAnyContext()))
|
||||
allRulesWithActivityDetection.get(i).activate(AutomationService.getInstance(), false);
|
||||
}
|
||||
}
|
||||
|
@ -51,6 +51,7 @@
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
<!-- <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />-->
|
||||
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.NFC" />
|
||||
@ -62,6 +63,7 @@
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
|
||||
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
@ -118,31 +120,39 @@
|
||||
<receiver android:name=".receivers.PackageReplacedReceiver"
|
||||
android:enabled="true">
|
||||
<intent-filter>
|
||||
<!--<action android:name="android.intent.action.PACKAGE_ADDED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_REPLACED" />
|
||||
<action android:name="android.intent.action.PACKAGE_REMOVED"/>
|
||||
<action android:name="android.intent.action.ACTION_PACKAGE_REPLACED" />-->
|
||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
||||
|
||||
<!--<data
|
||||
android:path="com.jens.automation2"
|
||||
android:scheme="package" />-->
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".receivers.AlarmListener" />
|
||||
<receiver android:name=".receivers.DateTimeListener" />
|
||||
<receiver android:name=".receivers.ConnectivityReceiver" />
|
||||
<receiver android:name=".receivers.TimeZoneListener" />
|
||||
|
||||
<receiver
|
||||
android:name=".DeviceAdmin"
|
||||
android:description="@string/app_name"
|
||||
android:label="@string/app_name"
|
||||
android:permission= "android.permission.BIND_DEVICE_ADMIN" >
|
||||
<meta-data
|
||||
android:name="android.app.device_admin"
|
||||
android:resource="@xml/policies" />
|
||||
<intent-filter>
|
||||
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity android:name=".ActivityManageRule" />
|
||||
<activity android:name=".ActivityManageActionTriggerUrl" />
|
||||
<activity android:name=".ActivityDisplayLongMessage" />
|
||||
<activity android:name=".ActivityManageActionSendTextMessage" />
|
||||
<activity android:name=".ActivityManageActionPlaySound" />
|
||||
<activity android:name=".ActivityManageTriggerProfile" />
|
||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||
<activity android:name=".ActivityMaintenance" />
|
||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||
<activity android:name=".ActivityManageTriggerDeviceOrientation" />
|
||||
<activity android:name=".ActivityHelp" />
|
||||
<activity android:name=".ActivityManageActionVibrate" />
|
||||
<activity
|
||||
android:name=".ActivityMainTabLayout"
|
||||
android:launchMode="singleTask">
|
||||
@ -169,6 +179,7 @@
|
||||
</intent-filter>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<meta-data
|
||||
android:name="android.nfc.action.TECH_DISCOVERED"
|
||||
@ -202,7 +213,6 @@
|
||||
|
||||
<activity android:name=".ActivityPermissions" />
|
||||
|
||||
|
||||
<!-- https://developer.android.com/about/versions/pie/android-9.0-changes-28#apache-p-->
|
||||
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -50,6 +50,7 @@
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
<!-- <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />-->
|
||||
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.NFC" />
|
||||
@ -63,6 +64,7 @@
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
|
||||
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@ -112,31 +114,39 @@
|
||||
<receiver android:name=".receivers.PackageReplacedReceiver"
|
||||
android:enabled="true">
|
||||
<intent-filter>
|
||||
<!--<action android:name="android.intent.action.PACKAGE_ADDED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_REPLACED" />
|
||||
<action android:name="android.intent.action.PACKAGE_REMOVED"/>
|
||||
<action android:name="android.intent.action.ACTION_PACKAGE_REPLACED" />-->
|
||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
||||
|
||||
<!--<data
|
||||
android:path="com.jens.automation2"
|
||||
android:scheme="package" />-->
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".receivers.AlarmListener" />
|
||||
<receiver android:name=".receivers.DateTimeListener" />
|
||||
<receiver android:name=".receivers.ConnectivityReceiver" />
|
||||
<receiver android:name=".receivers.TimeZoneListener" />
|
||||
|
||||
<receiver
|
||||
android:name=".DeviceAdmin"
|
||||
android:description="@string/app_name"
|
||||
android:label="@string/app_name"
|
||||
android:permission= "android.permission.BIND_DEVICE_ADMIN" >
|
||||
<meta-data
|
||||
android:name="android.app.device_admin"
|
||||
android:resource="@xml/policies" />
|
||||
<intent-filter>
|
||||
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity android:name=".ActivityManageRule" />
|
||||
<activity android:name=".ActivityManageActionTriggerUrl" />
|
||||
<activity android:name=".ActivityDisplayLongMessage" />
|
||||
<activity android:name=".ActivityManageActionSendTextMessage" />
|
||||
<activity android:name=".ActivityManageActionPlaySound" />
|
||||
<activity android:name=".ActivityManageTriggerProfile" />
|
||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||
<activity android:name=".ActivityMaintenance" />
|
||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||
<activity android:name=".ActivityManageTriggerDeviceOrientation" />
|
||||
<activity android:name=".ActivityHelp" />
|
||||
<activity android:name=".ActivityManageActionVibrate" />
|
||||
<activity
|
||||
android:name=".ActivityMainTabLayout"
|
||||
android:launchMode="singleTask">
|
||||
@ -197,7 +207,6 @@
|
||||
|
||||
<activity android:name=".ActivityPermissions" />
|
||||
|
||||
|
||||
<!-- https://developer.android.com/about/versions/pie/android-9.0-changes-28#apache-p-->
|
||||
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -301,7 +301,7 @@ public class ActivityDetectionReceiver extends IntentService implements Automati
|
||||
* and some activities are hierarchical (ON_FOOT is a generalization of WALKING and RUNNING).
|
||||
*/
|
||||
|
||||
ArrayList<Rule> allRulesWithActivityDetection = Rule.findRuleCandidatesByActivityDetection();
|
||||
ArrayList<Rule> allRulesWithActivityDetection = Rule.findRuleCandidates(Trigger_Enum.activityDetection);
|
||||
for(int i=0; i<allRulesWithActivityDetection.size(); i++)
|
||||
{
|
||||
if(allRulesWithActivityDetection.get(i).applies(Miscellaneous.getAnyContext()))
|
||||
|
@ -5,6 +5,7 @@ import android.os.AsyncTask;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -13,14 +14,18 @@ import java.util.Locale;
|
||||
|
||||
public class Action
|
||||
{
|
||||
Rule parentRule = null;
|
||||
|
||||
public static final String actionParameter2Split = "ap2split";
|
||||
public static final String intentPairSeperator = "intPairSplit";
|
||||
public static final String vibrateSeparator = ",";
|
||||
|
||||
public enum Action_Enum {
|
||||
setWifi,
|
||||
setBluetooth,
|
||||
setUsbTethering,
|
||||
setWifiTethering,
|
||||
setBluetoothTethering,
|
||||
setDisplayRotation,
|
||||
turnWifiOn,turnWifiOff,
|
||||
turnBluetoothOn,turnBluetoothOff,
|
||||
@ -28,16 +33,17 @@ public class Action
|
||||
changeSoundProfile,
|
||||
turnUsbTetheringOn,turnUsbTetheringOff,
|
||||
turnWifiTetheringOn,turnWifiTetheringOff,
|
||||
enableScreenRotation, disableScreenRotation,
|
||||
enableScreenRotation,disableScreenRotation,
|
||||
startOtherActivity,
|
||||
waitBeforeNextAction,
|
||||
wakeupDevice,
|
||||
turnScreenOnOrOff,
|
||||
setAirplaneMode,
|
||||
setDataConnection,
|
||||
speakText,
|
||||
playMusic,
|
||||
setScreenBrightness,
|
||||
playSound,
|
||||
vibrate,
|
||||
sendTextMessage;
|
||||
|
||||
public String getFullName(Context context)
|
||||
@ -50,6 +56,8 @@ public class Action
|
||||
return context.getResources().getString(R.string.actionSetBluetooth);
|
||||
case setWifiTethering:
|
||||
return context.getResources().getString(R.string.actionSetWifiTethering);
|
||||
case setBluetoothTethering:
|
||||
return context.getResources().getString(R.string.actionSetBluetoothTethering);
|
||||
case setUsbTethering:
|
||||
return context.getResources().getString(R.string.actionSetUsbTethering);
|
||||
case setDisplayRotation:
|
||||
@ -82,8 +90,10 @@ public class Action
|
||||
return context.getResources().getString(R.string.startOtherActivity);
|
||||
case waitBeforeNextAction:
|
||||
return context.getResources().getString(R.string.waitBeforeNextAction);
|
||||
case wakeupDevice:
|
||||
return context.getResources().getString(R.string.wakeupDevice);
|
||||
case turnScreenOnOrOff:
|
||||
return context.getResources().getString(R.string.turnScreenOnOrOff);
|
||||
case vibrate:
|
||||
return context.getResources().getString(R.string.vibrate);
|
||||
case setAirplaneMode:
|
||||
return context.getResources().getString(R.string.airplaneMode);
|
||||
case setDataConnection:
|
||||
@ -143,86 +153,93 @@ public class Action
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder returnString = new StringBuilder();
|
||||
|
||||
if(this.getAction().equals(Action_Enum.setWifi))
|
||||
|
||||
switch(getAction())
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiOff));
|
||||
case setWifi:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiOff));
|
||||
break;
|
||||
case setBluetooth:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothOff));
|
||||
break;
|
||||
case setUsbTethering:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnUsbTetheringOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnUsbTetheringOff));
|
||||
break;
|
||||
case setWifiTethering:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiTetheringOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiTetheringOff));
|
||||
break;
|
||||
case setBluetoothTethering:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothTetheringOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothTetheringOff));
|
||||
break;
|
||||
case setDisplayRotation:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionEnableScreenRotation));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionDisableScreenRotation));
|
||||
break;
|
||||
case setAirplaneMode:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnAirplaneModeOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnAirplaneModeOff));
|
||||
break;
|
||||
case setDataConnection:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSetDataConnectionOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSetDataConnectionOff));
|
||||
break;
|
||||
case startOtherActivity:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.startOtherActivity));
|
||||
break;
|
||||
case triggerUrl:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTriggerUrl));
|
||||
break;
|
||||
case speakText:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSpeakText));
|
||||
break;
|
||||
case playMusic:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionPlayMusic));
|
||||
break;
|
||||
case sendTextMessage:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.sendTextMessage));
|
||||
break;
|
||||
case turnScreenOnOrOff:
|
||||
if (getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.turnScreenOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.turnScreenOff));
|
||||
break;
|
||||
case playSound:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.playSound));
|
||||
break;
|
||||
case changeSoundProfile:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionChangeSoundProfile));
|
||||
break;
|
||||
case waitBeforeNextAction:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.waitBeforeNextAction));
|
||||
break;
|
||||
case setScreenBrightness:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.setScreenBrightness));
|
||||
break;
|
||||
default:
|
||||
returnString.append(action.toString());
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setBluetooth))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setUsbTethering))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnUsbTetheringOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnUsbTetheringOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setWifiTethering))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiTetheringOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiTetheringOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setDisplayRotation))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionEnableScreenRotation));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionDisableScreenRotation));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setAirplaneMode))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnAirplaneModeOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnAirplaneModeOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setDataConnection))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSetDataConnectionOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSetDataConnectionOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.startOtherActivity))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.startOtherActivity));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.triggerUrl))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTriggerUrl));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.speakText))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSpeakText));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.playMusic))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionPlayMusic));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.sendTextMessage))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.sendTextMessage));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.wakeupDevice))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.wakeupDevice));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.playSound))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.playSound));
|
||||
}
|
||||
else
|
||||
returnString.append(action.toString());
|
||||
|
||||
if(this.getAction().equals(Action_Enum.triggerUrl))
|
||||
{
|
||||
@ -232,7 +249,7 @@ public class Action
|
||||
returnString.append(": " + components[2]);
|
||||
|
||||
if(parameter1)
|
||||
returnString.append(" using authentication.");
|
||||
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.usingAuthentication) + ".");
|
||||
}
|
||||
else
|
||||
returnString.append(": " + components[0]);
|
||||
@ -246,14 +263,14 @@ public class Action
|
||||
String[] components = parameter2.split(Actions.smsSeparator);
|
||||
if(components.length >= 2)
|
||||
{
|
||||
returnString.append(" to number " + components[0]);
|
||||
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.toNumber) + " " + components[0]);
|
||||
|
||||
returnString.append(". Message: " + components[1]);
|
||||
returnString.append(". " + Miscellaneous.getAnyContext().getResources().getString(R.string.message) + ": " + components[1]);
|
||||
}
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setScreenBrightness))
|
||||
{
|
||||
returnString.append(" to ");
|
||||
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.to) + " ");
|
||||
|
||||
if(parameter1)
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.brightnessAuto));
|
||||
@ -269,6 +286,16 @@ public class Action
|
||||
return returnString.toString();
|
||||
}
|
||||
|
||||
public Rule getParentRule()
|
||||
{
|
||||
return parentRule;
|
||||
}
|
||||
|
||||
public void setParentRule(Rule parentRule)
|
||||
{
|
||||
this.parentRule = parentRule;
|
||||
}
|
||||
|
||||
public static CharSequence[] getActionTypesAsArray()
|
||||
{
|
||||
ArrayList<String> actionTypesList = new ArrayList<String>();
|
||||
@ -345,18 +372,11 @@ public class Action
|
||||
* Old version. Those checks should not be necessary anymore. Also they didn't work
|
||||
* because profiles were created with names like silent, vibrate and normal.
|
||||
*/
|
||||
// if(this.getParameter2().equals("silent"))
|
||||
// Actions.setSound(context, AudioManager.RINGER_MODE_SILENT);
|
||||
// else if(this.getParameter2().equals("vibrate"))
|
||||
// Actions.setSound(context, AudioManager.RINGER_MODE_VIBRATE);
|
||||
// else if(this.getParameter2().equals("normal"))
|
||||
// Actions.setSound(context, AudioManager.RINGER_MODE_NORMAL);
|
||||
// else
|
||||
// {
|
||||
|
||||
Profile p = Profile.getByName(this.getParameter2());
|
||||
if (p != null)
|
||||
p.activate(context);
|
||||
// }
|
||||
|
||||
break;
|
||||
case triggerUrl:
|
||||
triggerUrl(context);
|
||||
@ -368,11 +388,14 @@ public class Action
|
||||
Actions.setUsbTethering(context, getParameter1(), toggleActionIfPossible);
|
||||
break;
|
||||
case setWifi:
|
||||
Actions.setWifi(context, getParameter1(), toggleActionIfPossible);
|
||||
Actions.WifiStuff.setWifi(context, getParameter1(), toggleActionIfPossible);
|
||||
break;
|
||||
case setWifiTethering:
|
||||
Actions.setWifiTethering(context, getParameter1(), toggleActionIfPossible);
|
||||
break;
|
||||
case setBluetoothTethering:
|
||||
Actions.BluetoothTetheringClass.setBluetoothTethering(context, getParameter1(), toggleActionIfPossible);
|
||||
break;
|
||||
case setDisplayRotation:
|
||||
Actions.setDisplayRotation(context, getParameter1(), toggleActionIfPossible);
|
||||
break;
|
||||
@ -382,16 +405,26 @@ public class Action
|
||||
case waitBeforeNextAction:
|
||||
Actions.waitBeforeNextAction(Long.parseLong(this.getParameter2()));
|
||||
break;
|
||||
case wakeupDevice:
|
||||
Actions.wakeupDevice(Long.parseLong(this.getParameter2()));
|
||||
// wakeupDevice() will create a seperate thread. That'll take some time, we wait 100ms.
|
||||
try
|
||||
case turnScreenOnOrOff:
|
||||
if(getParameter1())
|
||||
{
|
||||
Thread.sleep(100);
|
||||
if(StringUtils.isNumeric(this.getParameter2()))
|
||||
Actions.wakeupDevice(Long.parseLong(this.getParameter2()));
|
||||
else
|
||||
Actions.wakeupDevice((long)1000);
|
||||
// wakeupDevice() will create a separate thread. That'll take some time, we wait 100ms.
|
||||
try
|
||||
{
|
||||
Thread.sleep(100);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
else
|
||||
{
|
||||
e.printStackTrace();
|
||||
Actions.turnOffScreen();
|
||||
}
|
||||
break;
|
||||
case setAirplaneMode:
|
||||
@ -412,6 +445,9 @@ public class Action
|
||||
case setScreenBrightness:
|
||||
Actions.setScreenBrightness(getParameter1(), Integer.parseInt(getParameter2()));
|
||||
break;
|
||||
case vibrate:
|
||||
Actions.vibrate(getParameter1(), getParameter2());
|
||||
break;
|
||||
case playSound:
|
||||
Actions.playSound(getParameter1(), getParameter2());
|
||||
break;
|
||||
@ -490,62 +526,24 @@ public class Action
|
||||
while(attempts <= Settings.httpAttempts && response.equals("httpError"))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "HTTP Request", "Attempt " + String.valueOf(attempts++) + " of " + String.valueOf(Settings.httpAttempts), 3);
|
||||
|
||||
// try
|
||||
// {
|
||||
// Either thorough checking or no encryption
|
||||
if(!Settings.httpAcceptAllCertificates | !urlString.toLowerCase(Locale.getDefault()).contains("https"))
|
||||
// {
|
||||
// URL url = new URL(urlString);
|
||||
// URLConnection urlConnection = url.openConnection();
|
||||
// urlConnection.setReadTimeout(Settings.httpAttemptsTimeout * 1000);
|
||||
// InputStream in = urlConnection.getInputStream();
|
||||
// response = Miscellaneous.convertStreamToString(in);
|
||||
|
||||
response = Miscellaneous.downloadURL(urlString, urlUsername, urlPassword);
|
||||
// }
|
||||
else
|
||||
// {
|
||||
response = Miscellaneous.downloadURLwithoutCertificateChecking(urlString, urlUsername, urlPassword);
|
||||
// post = new HttpGet(new URI(urlString));
|
||||
// final HttpParams httpParams = new BasicHttpParams();
|
||||
// HttpConnectionParams.setConnectionTimeout(httpParams, Settings.httpAttemptsTimeout * 1000);
|
||||
// HttpClient client = new DefaultHttpClient(httpParams);
|
||||
//
|
||||
// client = sslClient(client);
|
||||
//
|
||||
// // Execute HTTP Post Request
|
||||
// HttpResponse result = client.execute(post);
|
||||
// response = EntityUtils.toString(result.getEntity());
|
||||
// }
|
||||
// }
|
||||
// catch (URISyntaxException e)
|
||||
// {
|
||||
// Miscellaneous.logEvent("w", "HTTP RESULT", Log.getStackTraceString(e), 3);
|
||||
// }
|
||||
// catch (ClientProtocolException e)
|
||||
// {
|
||||
// Miscellaneous.logEvent("w", "HTTP RESULT", Log.getStackTraceString(e), 3);
|
||||
// }
|
||||
// catch (IOException e)
|
||||
// {
|
||||
// Miscellaneous.logEvent("w", "HTTP RESULT", Log.getStackTraceString(e), 3);
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// finally
|
||||
// {
|
||||
try
|
||||
{
|
||||
Thread.sleep(Settings.httpAttemptGap * 1000);
|
||||
}
|
||||
catch (InterruptedException e1)
|
||||
{
|
||||
Miscellaneous.logEvent("w", "HTTP RESULT", "Failed to pause between HTTP requests.", 5);
|
||||
}
|
||||
// }
|
||||
|
||||
// Either thorough checking or no encryption
|
||||
if(!Settings.httpAcceptAllCertificates || !urlString.toLowerCase(Locale.getDefault()).contains("https"))
|
||||
response = Miscellaneous.downloadURL(urlString, urlUsername, urlPassword);
|
||||
else
|
||||
response = Miscellaneous.downloadURLwithoutCertificateChecking(urlString, urlUsername, urlPassword);
|
||||
|
||||
try
|
||||
{
|
||||
Thread.sleep(Settings.httpAttemptGap * 1000);
|
||||
}
|
||||
catch (InterruptedException e1)
|
||||
{
|
||||
Miscellaneous.logEvent("w", "HTTP RESULT", "Failed to pause between HTTP requests.", 5);
|
||||
}
|
||||
}
|
||||
|
||||
// Miscellaneous.logEvent("i", "HTTPS RESULT", response, 3);
|
||||
Miscellaneous.logEvent("i", "HTTPS RESULT", response, 5);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
@ -3,8 +3,13 @@ package com.jens.automation2;
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.bluetooth.BluetoothManager;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -16,15 +21,18 @@ import android.net.wifi.WifiManager;
|
||||
import android.os.Build;
|
||||
import android.os.PowerManager;
|
||||
import android.os.PowerManager.WakeLock;
|
||||
import android.os.VibrationEffect;
|
||||
import android.os.Vibrator;
|
||||
import android.provider.MediaStore;
|
||||
import android.telephony.SmsManager;
|
||||
import android.telephony.SubscriptionManager;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.jens.automation2.actions.wifi_router.MyOnStartTetheringCallback;
|
||||
import com.jens.automation2.actions.wifi_router.MyOreoWifiManager;
|
||||
import com.jens.automation2.location.WifiBroadcastReceiver;
|
||||
@ -39,13 +47,16 @@ import org.apache.http.conn.util.InetAddressUtils;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.InetAddress;
|
||||
import java.net.NetworkInterface;
|
||||
import java.security.KeyStore;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
|
||||
@ -68,48 +79,85 @@ public class Actions
|
||||
public static final String wireguard_tunnel_down = "com.wireguard.android.action.SET_TUNNEL_DOWN";
|
||||
public static final String wireguard_tunnel_refresh = "com.wireguard.android.action.REFRESH_TUNNEL_STATES";
|
||||
|
||||
public static Boolean setWifi(Context context, Boolean desiredState, boolean toggleActionIfPossible)
|
||||
public static class WifiStuff
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Wifi", "Changing Wifi to " + String.valueOf(desiredState), 4);
|
||||
|
||||
if (desiredState && Settings.useWifiForPositioning)
|
||||
WifiBroadcastReceiver.startWifiReceiver(autoMationServerRef.getLocationProvider());
|
||||
|
||||
WifiManager myWifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
|
||||
|
||||
// toggle
|
||||
if (toggleActionIfPossible)
|
||||
public static Boolean setWifi(Context context, Boolean desiredState, boolean toggleActionIfPossible)
|
||||
{
|
||||
Toast.makeText(context, context.getResources().getString(R.string.toggling) + " " + context.getResources().getString(R.string.wifi), Toast.LENGTH_LONG).show();
|
||||
desiredState = !myWifi.isWifiEnabled();
|
||||
if(context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.Q)
|
||||
return setWifiWithRoot(context, desiredState, toggleActionIfPossible);
|
||||
else
|
||||
return setWifiOldFashioned(context, desiredState, toggleActionIfPossible);
|
||||
}
|
||||
|
||||
// Only perform action if necessary
|
||||
if ((!myWifi.isWifiEnabled() && desiredState) | (myWifi.isWifiEnabled() && !desiredState))
|
||||
public static Boolean setWifiWithRoot(Context context, Boolean desiredState, boolean toggleActionIfPossible)
|
||||
{
|
||||
String wifiString = "";
|
||||
Miscellaneous.logEvent("i", "Wifi", "Changing wifi to " + String.valueOf(desiredState) + ", but with root permissions.", 4);
|
||||
|
||||
if (desiredState)
|
||||
{
|
||||
wifiString = context.getResources().getString(R.string.activating) + " " + context.getResources().getString(R.string.wifi);
|
||||
}
|
||||
String command = null;
|
||||
int state = 0;
|
||||
|
||||
String desiredStateString;
|
||||
if(desiredState)
|
||||
desiredStateString = "enable";
|
||||
else
|
||||
desiredStateString = "disable";
|
||||
|
||||
try
|
||||
{
|
||||
wifiString = context.getResources().getString(R.string.deactivating) + " " + context.getResources().getString(R.string.wifi);
|
||||
command = "svc wifi " + desiredStateString;
|
||||
Miscellaneous.logEvent("i", "setWifiWithRoot()", "Running command as root: " + command.toString(), 5);
|
||||
return executeCommandViaSu(new String[]{command});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Oops! Something went wrong, so we throw the exception here.
|
||||
throw e;
|
||||
}
|
||||
|
||||
Toast.makeText(context, wifiString, Toast.LENGTH_LONG).show();
|
||||
|
||||
boolean returnValue = myWifi.setWifiEnabled(desiredState);
|
||||
if (!returnValue)
|
||||
Miscellaneous.logEvent("i", "Wifi", "Error changing Wifi to " + String.valueOf(desiredState), 2);
|
||||
else
|
||||
Miscellaneous.logEvent("i", "Wifi", "Wifi changed to " + String.valueOf(desiredState), 2);
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
return true;
|
||||
public static Boolean setWifiOldFashioned(Context context, Boolean desiredState, boolean toggleActionIfPossible)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Wifi", "Changing wifi to " + String.valueOf(desiredState), 4);
|
||||
|
||||
if (desiredState && Settings.useWifiForPositioning)
|
||||
WifiBroadcastReceiver.startWifiReceiver(autoMationServerRef.getLocationProvider());
|
||||
|
||||
WifiManager myWifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
|
||||
|
||||
// toggle
|
||||
if (toggleActionIfPossible)
|
||||
{
|
||||
Toast.makeText(context, context.getResources().getString(R.string.toggling) + " " + context.getResources().getString(R.string.wifi), Toast.LENGTH_LONG).show();
|
||||
desiredState = !myWifi.isWifiEnabled();
|
||||
}
|
||||
|
||||
// Only perform action if necessary
|
||||
if ((!myWifi.isWifiEnabled() && desiredState) | (myWifi.isWifiEnabled() && !desiredState))
|
||||
{
|
||||
String wifiString = "";
|
||||
|
||||
if (desiredState)
|
||||
{
|
||||
wifiString = context.getResources().getString(R.string.activating) + " " + context.getResources().getString(R.string.wifi);
|
||||
}
|
||||
else
|
||||
{
|
||||
wifiString = context.getResources().getString(R.string.deactivating) + " " + context.getResources().getString(R.string.wifi);
|
||||
}
|
||||
|
||||
Toast.makeText(context, wifiString, Toast.LENGTH_LONG).show();
|
||||
|
||||
boolean returnValue = myWifi.setWifiEnabled(desiredState);
|
||||
if (!returnValue)
|
||||
Miscellaneous.logEvent("i", "Wifi", "Error changing Wifi to " + String.valueOf(desiredState), 2);
|
||||
else
|
||||
Miscellaneous.logEvent("i", "Wifi", "Wifi changed to " + String.valueOf(desiredState), 2);
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void setDisplayRotation(Context myContext, Boolean desiredState, boolean toggleActionIfPossible)
|
||||
@ -263,6 +311,149 @@ public class Actions
|
||||
return true;
|
||||
}
|
||||
|
||||
public static class BluetoothTetheringClass
|
||||
{
|
||||
static Object instance = null;
|
||||
static Method setTetheringOn = null;
|
||||
static Method isTetheringOn = null;
|
||||
static Object mutex = new Object();
|
||||
|
||||
public static Boolean setBluetoothTethering(Context context, Boolean desiredState, boolean toggleActionIfPossible)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Bluetooth Tethering", "Changing Bluetooth Tethering to " + String.valueOf(desiredState), 4);
|
||||
|
||||
// boolean state = isTetheringOn(context);
|
||||
|
||||
// if (toggleActionIfPossible)
|
||||
// {
|
||||
// Miscellaneous.logEvent("i", "Bluetooth Tethering", context.getResources().getString(R.string.toggling), 2);
|
||||
// desiredState = !state;
|
||||
// }
|
||||
|
||||
// if (((state && !desiredState) || (!state && desiredState)))
|
||||
// {
|
||||
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
|
||||
Class<?> classBluetoothPan = null;
|
||||
Constructor<?> BTPanCtor = null;
|
||||
Object BTSrvInstance = null;
|
||||
Method mBTPanConnect = null;
|
||||
|
||||
String sClassName = "android.bluetooth.BluetoothPan";
|
||||
try
|
||||
{
|
||||
classBluetoothPan = Class.forName(sClassName);
|
||||
Constructor<?> ctor = classBluetoothPan.getDeclaredConstructor(Context.class, BluetoothProfile.ServiceListener.class);
|
||||
|
||||
ctor.setAccessible(true);
|
||||
// Set Tethering ON
|
||||
|
||||
Class[] paramSet = new Class[1];
|
||||
paramSet[0] = boolean.class;
|
||||
|
||||
synchronized (mutex)
|
||||
{
|
||||
setTetheringOn = classBluetoothPan.getDeclaredMethod("setBluetoothTethering", paramSet);
|
||||
isTetheringOn = classBluetoothPan.getDeclaredMethod("isTetheringOn", null);
|
||||
instance = ctor.newInstance(context, new BTPanServiceListener(context));
|
||||
}
|
||||
|
||||
classBluetoothPan = Class.forName("android.bluetooth.BluetoothPan");
|
||||
mBTPanConnect = classBluetoothPan.getDeclaredMethod("connect", BluetoothDevice.class);
|
||||
BTPanCtor = classBluetoothPan.getDeclaredConstructor(Context.class, BluetoothProfile.ServiceListener.class);
|
||||
BTPanCtor.setAccessible(true);
|
||||
BTSrvInstance = BTPanCtor.newInstance(context, new BTPanServiceListener(context));
|
||||
|
||||
Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
|
||||
|
||||
// If there are paired devices
|
||||
if (pairedDevices.size() > 0)
|
||||
{
|
||||
// Loop through paired devices
|
||||
for (BluetoothDevice device : pairedDevices)
|
||||
{
|
||||
try
|
||||
{
|
||||
mBTPanConnect.invoke(BTSrvInstance, device);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Bluetooth Tethering", Log.getStackTraceString(e), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (NoSuchMethodException e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Bluetooth Tethering", Log.getStackTraceString(e), 1);
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Bluetooth Tethering", Log.getStackTraceString(e), 1);
|
||||
}
|
||||
catch(InvocationTargetException e)
|
||||
{
|
||||
/*
|
||||
Exact error message: "Bluetooth binder is null"
|
||||
This means this device doesn't have bluetooth.
|
||||
*/
|
||||
Miscellaneous.logEvent("e", "Bluetooth Tethering", "Device probably doesn't have bluetooth. " + Log.getStackTraceString(e), 1);
|
||||
Toast.makeText(context, context.getResources().getString(R.string.deviceDoesNotHaveBluetooth), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Bluetooth Tethering", Log.getStackTraceString(e), 1);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static class BTPanServiceListener implements BluetoothProfile.ServiceListener
|
||||
{
|
||||
private final Context context;
|
||||
|
||||
public BTPanServiceListener(final Context context)
|
||||
{
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServiceConnected(final int profile, final BluetoothProfile proxy)
|
||||
{
|
||||
//Some code must be here or the compiler will optimize away this callback.
|
||||
|
||||
try
|
||||
{
|
||||
synchronized (mutex)
|
||||
{
|
||||
setTetheringOn.invoke(instance, true);
|
||||
if ((Boolean) isTetheringOn.invoke(instance, null))
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Bluetooth Tethering", "BT Tethering is on", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Bluetooth Tethering", "BT Tethering is off", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (InvocationTargetException e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Bluetooth Tethering", Log.getStackTraceString(e), 1);
|
||||
}
|
||||
catch (IllegalAccessException e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Bluetooth Tethering", Log.getStackTraceString(e), 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServiceDisconnected(final int profile)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean setUsbTethering(Context context2, Boolean desiredState, boolean toggleActionIfPossible)
|
||||
{
|
||||
//TODO:toggle not really implemented, yet
|
||||
@ -457,12 +648,53 @@ public class Actions
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void setSound(Context context, int soundSetting)
|
||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||
public static void setDoNotDisturb(Context context, int desiredSetting)
|
||||
{
|
||||
Miscellaneous.logEvent("i", context.getResources().getString(R.string.soundSettings), "Changing sound to " + String.valueOf(soundSetting), 4);
|
||||
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
// Check if the notification policy access has been granted for the app.
|
||||
/* if (!notificationManager.isNotificationPolicyAccessGranted())
|
||||
{
|
||||
Intent intent = new Intent(android.provider.Settings.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS);
|
||||
startActivity(intent);
|
||||
return;
|
||||
}*/
|
||||
|
||||
notificationManager.setInterruptionFilter(desiredSetting);
|
||||
|
||||
/*if (notificationManager.getCurrentInterruptionFilter() == NotificationManager.INTERRUPTION_FILTER_ALL)
|
||||
{
|
||||
notificationManager.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
notificationManager.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_ALL);
|
||||
}*/
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||
public static boolean isDoNotDisturbActive(Context context)
|
||||
{
|
||||
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
int result = notificationManager.getCurrentInterruptionFilter();
|
||||
return (notificationManager.getCurrentInterruptionFilter() != NotificationManager.INTERRUPTION_FILTER_ALL);
|
||||
}
|
||||
|
||||
public static void setSound(Context context, int desiredSoundSetting)
|
||||
{
|
||||
Miscellaneous.logEvent("i", context.getResources().getString(R.string.soundSettings), "Changing sound to " + String.valueOf(desiredSoundSetting), 4);
|
||||
|
||||
AudioManager myAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
||||
myAudioManager.setRingerMode(soundSetting);
|
||||
|
||||
// if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && desiredSoundSetting == AudioManager.RINGER_MODE_SILENT)
|
||||
// {
|
||||
// AudioManager am = (AudioManager) Miscellaneous.getAnyContext().getSystemService(Context.AUDIO_SERVICE);
|
||||
// am.setStreamVolume(AudioManager.STREAM_NOTIFICATION, 0, AudioManager.FLAG_PLAY_SOUND);
|
||||
// am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
|
||||
// }
|
||||
// else
|
||||
// myAudioManager.setRingerMode(desiredSoundSetting);
|
||||
}
|
||||
|
||||
private static String getIPAddressUsb(final boolean useIPv4)
|
||||
@ -544,6 +776,49 @@ public class Actions
|
||||
Miscellaneous.logEvent("i", "Play sound file", "Not playing sound file because phone is on some kind of mute state.", 2);
|
||||
}
|
||||
|
||||
public static void vibrate(boolean parameter1, String parameter2)
|
||||
{
|
||||
String vibrateDurations[] = parameter2.split(Action.vibrateSeparator);
|
||||
|
||||
int counter = 1;
|
||||
for(String vibrate : vibrateDurations)
|
||||
{
|
||||
if(counter % 2 != 0)
|
||||
{
|
||||
Vibrator vibrator = (Vibrator) Miscellaneous.getAnyContext().getSystemService(Context.VIBRATOR_SERVICE);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||
vibrator.vibrate(VibrationEffect.createOneShot(Long.parseLong(vibrate), VibrationEffect.DEFAULT_AMPLITUDE));
|
||||
else
|
||||
vibrator.vibrate(Long.parseLong(vibrate));
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
Thread.sleep(Long.parseLong(vibrate));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "VibrateSleep", Log.getStackTraceString(e), 5);
|
||||
}
|
||||
}
|
||||
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
public static void setDND(Context context, int desiredDndMode)
|
||||
{
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
||||
{
|
||||
Miscellaneous.logEvent("i", context.getResources().getString(R.string.soundSettings), "Changing DND to " + String.valueOf(desiredDndMode), 4);
|
||||
NotificationManager mNotificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
mNotificationManager.setInterruptionFilter(desiredDndMode);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("w", context.getResources().getString(R.string.soundSettings), "Cannot change DND to " + String.valueOf(desiredDndMode) + ". This Android version is too and doesn\'t have that feature, yet.", 4);
|
||||
}
|
||||
|
||||
public void useDownloadedWebpage(String result)
|
||||
{
|
||||
// Toast.makeText(context, "Result: " + result, Toast.LENGTH_LONG).show();
|
||||
@ -820,23 +1095,96 @@ public class Actions
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
WakeLock wakeLock = pm.newWakeLock((WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP), "Automation:Wakelock");
|
||||
wakeLock.acquire();
|
||||
|
||||
try
|
||||
{
|
||||
Thread.sleep(awakeTime);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
Miscellaneous.logEvent("w", context.getResources().getString(R.string.wakeupDevice), "Error keeping device awake: " + Log.getStackTraceString(e), 4);
|
||||
}
|
||||
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
WakeLock wakeLock = pm.newWakeLock((PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP), "Automation:Wakelock");
|
||||
wakeLock.acquire();
|
||||
|
||||
wakeLock.release();
|
||||
try
|
||||
{
|
||||
Thread.sleep(awakeTime);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
Miscellaneous.logEvent("w", context.getResources().getString(R.string.wakeupDevice), "Error keeping device awake: " + Log.getStackTraceString(e), 4);
|
||||
}
|
||||
|
||||
wakeLock.release();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Wakeup device action", "Error while waking up device: " + Log.getStackTraceString(e), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*public static void turnOnScreen()
|
||||
{
|
||||
// turn on screen
|
||||
Miscellaneous.logEvent("i", "Actions", "Turning screen on.", 3);
|
||||
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
WakeLock wakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, AutomationService.NOTIFICATION_CHANNEL_ID + ":turnOffScreen");
|
||||
wakeLock.acquire();
|
||||
}*/
|
||||
|
||||
@TargetApi(21) //Suppress lint error for PROXIMITY_SCREEN_OFF_WAKE_LOCK
|
||||
public static void turnOffScreen()
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Actions", "Turning screen off.", 3);
|
||||
|
||||
|
||||
/*params.flags |= LayoutParams.FLAG_KEEP_SCREEN_ON;
|
||||
params.screenBrightness = 0;
|
||||
getWindow().setAttributes(params);*/
|
||||
|
||||
// PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
// WakeLock wakeLock = pm.newWakeLock(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK,AutomationService.NOTIFICATION_CHANNEL_ID + ":turnOffScreen");
|
||||
// WakeLock wakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK , AutomationService.NOTIFICATION_CHANNEL_ID + ":turnOffScreen");
|
||||
// wakeLock.acquire();
|
||||
|
||||
// WakeLock wakeLock = pm.newWakeLock(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK, "tag");
|
||||
// WakeLock wakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK , "tag");
|
||||
// wakeLock.acquire();
|
||||
|
||||
// wakeLock.release();
|
||||
lockScreen();
|
||||
}
|
||||
|
||||
public static void lockScreen()
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Actions", "Locking screen.", 3);
|
||||
|
||||
// Works, but requires Manifest.permission.BIND_DEVICE_ADMIN
|
||||
// https://stackoverflow.com/questions/23898406/java-lang-securityexception-no-active-admin-owned-by-uid-10047-for-policy-4-on
|
||||
DevicePolicyManager deviceManager = (DevicePolicyManager)Miscellaneous.getAnyContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
|
||||
deviceManager.lockNow();
|
||||
}
|
||||
|
||||
// using root
|
||||
/*private void turnOffScreen()
|
||||
{
|
||||
try
|
||||
{
|
||||
Class c = Class.forName("android.os.PowerManager");
|
||||
PowerManager mPowerManager = (PowerManager) this.getSystemService(Context.POWER_SERVICE);
|
||||
for(Method m : c.getDeclaredMethods())
|
||||
{
|
||||
if(m.getName().equals("goToSleep"))
|
||||
{
|
||||
m.setAccessible(true);
|
||||
if(m.getParameterTypes().length == 1)
|
||||
{
|
||||
m.invoke(mPowerManager,SystemClock.uptimeMillis()-2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
}*/
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
|
||||
@SuppressLint("NewApi")
|
||||
public static boolean setAirplaneMode(boolean desiredState, boolean toggleActionIfPossible)
|
||||
@ -1110,7 +1458,7 @@ public class Actions
|
||||
desiredState = !isEnabled;
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT <= 20)
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT_WATCH)
|
||||
{
|
||||
for (Method m : iConnectivityManagerClass.getDeclaredMethods())
|
||||
{
|
||||
@ -1136,23 +1484,48 @@ public class Actions
|
||||
}
|
||||
}
|
||||
|
||||
protected static boolean setDataConnectionWithRoot(boolean enable)
|
||||
protected static boolean setDataConnectionWithRoot(boolean desiredState)
|
||||
{
|
||||
try
|
||||
{
|
||||
int desiredState = 0;
|
||||
if (enable)
|
||||
desiredState = 1;
|
||||
|
||||
if (MobileDataStuff.setMobileNetworkFromLollipop(desiredState, autoMationServerRef))
|
||||
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.O_MR1)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
||||
return true;
|
||||
if(MobileDataStuff.setMobileNetworkFromAndroid9(desiredState, autoMationServerRef))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("e", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootFail), 2);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP)
|
||||
{
|
||||
if (MobileDataStuff.setMobileNetworkTillAndroid5(desiredState, autoMationServerRef))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("e", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootFail), 2);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("e", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootFail), 2);
|
||||
return false;
|
||||
if (MobileDataStuff.setMobileNetworkAndroid6Till8(desiredState, autoMationServerRef))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("e", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootFail), 2);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -1169,43 +1542,35 @@ public class Actions
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public static boolean setMobileNetworkFromLollipop(int desiredState, Context context) throws Exception
|
||||
public static boolean setMobileNetworkAndroid6Till8(boolean desiredState, Context context) throws Exception
|
||||
{
|
||||
String command = null;
|
||||
int state = 0;
|
||||
|
||||
try
|
||||
{
|
||||
int desiredStateString;
|
||||
if(desiredState)
|
||||
desiredStateString = 1;
|
||||
else
|
||||
desiredStateString = 0;
|
||||
|
||||
// Get the current state of the mobile network.
|
||||
state = isMobileDataEnabled() ? 0 : 1;
|
||||
// boolean state = isMobileDataEnabled() ? 0 : 1;
|
||||
// Get the value of the "TRANSACTION_setDataEnabled" field.
|
||||
String transactionCode = getTransactionCode(context);
|
||||
// Android 5.1+ (API 22) and later.
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP)
|
||||
SubscriptionManager mSubscriptionManager = (SubscriptionManager) context.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
|
||||
// Loop through the subscription list i.e. SIM list.
|
||||
for (int i = 0; i < mSubscriptionManager.getActiveSubscriptionInfoCountMax(); i++)
|
||||
{
|
||||
SubscriptionManager mSubscriptionManager = (SubscriptionManager) context.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
|
||||
// Loop through the subscription list i.e. SIM list.
|
||||
for (int i = 0; i < mSubscriptionManager.getActiveSubscriptionInfoCountMax(); i++)
|
||||
{
|
||||
if (transactionCode != null && transactionCode.length() > 0)
|
||||
{
|
||||
// Get the active subscription ID for a given SIM card.
|
||||
int subscriptionId = mSubscriptionManager.getActiveSubscriptionInfoList().get(i).getSubscriptionId();
|
||||
// Execute the command via `su` to turn off
|
||||
// mobile network for a subscription service.
|
||||
command = "service call phone " + transactionCode + " i32 " + subscriptionId + " i32 " + desiredState;
|
||||
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", "Running command: " + command.toString(), 5);
|
||||
return executeCommandViaSu(new String[]{command});
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP)
|
||||
{
|
||||
// Android 5.0 (API 21) only.
|
||||
if (transactionCode != null && transactionCode.length() > 0)
|
||||
{
|
||||
// Execute the command via `su` to turn off mobile network.
|
||||
command = "service call phone " + transactionCode + " i32 " + desiredState;
|
||||
// Get the active subscription ID for a given SIM card.
|
||||
int subscriptionId = mSubscriptionManager.getActiveSubscriptionInfoList().get(i).getSubscriptionId();
|
||||
// Execute the command via `su` to turn off
|
||||
// mobile network for a subscription service.
|
||||
command = "service call phone " + transactionCode + " i32 " + subscriptionId + " i32 " + desiredStateString;
|
||||
Miscellaneous.logEvent("i", "setMobileNetworkAndroid6Till8()", "Running command: " + command.toString(), 5);
|
||||
return executeCommandViaSu(new String[]{command});
|
||||
}
|
||||
}
|
||||
@ -1219,6 +1584,75 @@ public class Actions
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public static boolean setMobileNetworkTillAndroid5(boolean desiredState, Context context) throws Exception
|
||||
{
|
||||
String command = null;
|
||||
|
||||
try
|
||||
{
|
||||
int desiredStateString;
|
||||
if(desiredState)
|
||||
desiredStateString = 1;
|
||||
else
|
||||
desiredStateString = 0;
|
||||
|
||||
// Get the current state of the mobile network.
|
||||
// int currentState = isMobileDataEnabled() ? 0 : 1;
|
||||
// Get the value of the "TRANSACTION_setDataEnabled" field.
|
||||
String transactionCode = getTransactionCode(context);
|
||||
// Android 5.0 (API 21) only.
|
||||
if (transactionCode != null && transactionCode.length() > 0)
|
||||
{
|
||||
// Execute the command via `su` to turn off mobile network.
|
||||
command = "service call phone " + transactionCode + " i32 " + desiredStateString;
|
||||
Miscellaneous.logEvent("i", "setMobileNetworkTillAndroid5()", "Running command: " + command.toString(), 5);
|
||||
return executeCommandViaSu(new String[]{command});
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Oops! Something went wrong, so we throw the exception here.
|
||||
throw e;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public static boolean setMobileNetworkFromAndroid9(boolean desiredState, Context context) throws Exception
|
||||
{
|
||||
String command = null;
|
||||
|
||||
String desiredStateString;
|
||||
if(desiredState)
|
||||
desiredStateString = "enable";
|
||||
else
|
||||
desiredStateString = "disable";
|
||||
|
||||
try
|
||||
{
|
||||
/*
|
||||
Android 8.1 is the last version on which the transaction code can be determined
|
||||
with the below method. From 9.0 on the field TRANSACTION_setDataEnabled does not
|
||||
exist anymore. Usually it was 83 and we'll just try this number hardcoded.
|
||||
Alternatively the bottom of this might be an approach:
|
||||
https://stackoverflow.com/questions/26539445/the-setmobiledataenabled-method-is-no-longer-callable-as-of-android-l-and-later
|
||||
*/
|
||||
|
||||
// Execute the command via `su` to turn off
|
||||
// mobile network for a subscription service.
|
||||
command = "svc data " + desiredStateString;
|
||||
Miscellaneous.logEvent("i", "setMobileNetworkFromAndroid9()", "Running command: " + command.toString(), 5);
|
||||
return executeCommandViaSu(new String[]{command});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Oops! Something went wrong, so we throw the exception here.
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public static boolean isMobileDataEnabled()
|
||||
{
|
||||
|
@ -9,7 +9,6 @@ import com.jens.automation2.R.layout;
|
||||
|
||||
public class ActivityHelp extends Activity
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
@ -19,5 +18,4 @@ public class ActivityHelp extends Activity
|
||||
TextView tvHelpTextEnergySaving = (TextView) findViewById(R.id.tvHelpTextEnergySaving);
|
||||
tvHelpTextEnergySaving.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -184,8 +184,16 @@ public class ActivityMainProfiles extends ActivityGeneric
|
||||
startActivityForResult(manageSpecificProfileIntent, 2000);
|
||||
break;
|
||||
case 2:
|
||||
if(profile.delete(myAutomationService))
|
||||
updateListView();
|
||||
Rule user = profile.isInUseByRules();
|
||||
if(user == null)
|
||||
{
|
||||
if (profile.delete(ActivityMainProfiles.this))
|
||||
updateListView();
|
||||
else
|
||||
Toast.makeText(ActivityMainProfiles.this, getResources().getString(R.string.profileCouldNotBeDeleted), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
else
|
||||
Toast.makeText(ActivityMainProfiles.this, String.format(getResources().getString(R.string.ruleXIsUsingProfileY), user.getName(), profile.getName()), Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -19,17 +19,21 @@ import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.jens.automation2.AutomationService.serviceCommands;
|
||||
import com.jens.automation2.receivers.AlarmListener;
|
||||
import com.jens.automation2.receivers.DateTimeListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ActivityMainRules extends ActivityGeneric
|
||||
{
|
||||
private ListView ruleListView;
|
||||
ArrayList<Rule> ruleList = new ArrayList<>();
|
||||
private ArrayAdapter<Rule> ruleListViewAdapter;
|
||||
public static Rule ruleToEdit;
|
||||
protected static ActivityMainRules instance = null;
|
||||
|
||||
public static final int requestCodeCreateRule = 3000;
|
||||
public static final int requestCodeChangeRule = 4000;
|
||||
|
||||
public static ActivityMainRules getInstance()
|
||||
{
|
||||
if(instance == null)
|
||||
@ -52,21 +56,14 @@ public class ActivityMainRules extends ActivityGeneric
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
// if(!ActivityPermissions.havePermission(ActivityPermissions.writeExternalStoragePermissionName, ActivityMainRules.this))
|
||||
// {
|
||||
// Toast.makeText(ActivityMainRules.this, getResources().getString(R.string.appRequiresPermissiontoAccessExternalStorage), Toast.LENGTH_LONG).show();
|
||||
// return;
|
||||
// }
|
||||
|
||||
ruleToEdit = null;
|
||||
Intent startAddRuleIntent = new Intent(ActivityMainRules.this, ActivityManageRule.class);
|
||||
startActivityForResult(startAddRuleIntent, 3000);
|
||||
startActivityForResult(startAddRuleIntent, requestCodeCreateRule);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
ruleListViewAdapter = new RuleArrayAdapter(this, R.layout.view_for_rule_listview, ruleList);
|
||||
ruleListView = (ListView)findViewById(R.id.lvRuleList);
|
||||
|
||||
ruleListViewAdapter = new RuleArrayAdapter(this, R.layout.view_for_rule_listview, Rule.getRuleCollection());
|
||||
ruleListView.setClickable(true);
|
||||
|
||||
ruleListView.setOnItemLongClickListener(new OnItemLongClickListener()
|
||||
@ -112,7 +109,6 @@ public class ActivityMainRules extends ActivityGeneric
|
||||
|
||||
private static class RuleArrayAdapter extends ArrayAdapter<Rule>
|
||||
{
|
||||
|
||||
public RuleArrayAdapter(Context context, int resource, ArrayList<Rule> objects)
|
||||
{
|
||||
super(context, resource, objects);
|
||||
@ -163,13 +159,13 @@ public class ActivityMainRules extends ActivityGeneric
|
||||
if(AutomationService.isMyServiceRunning(this))
|
||||
bindToService();
|
||||
|
||||
if(requestCode == 3000) //add Rule
|
||||
if(requestCode == requestCodeCreateRule) //add Rule
|
||||
{
|
||||
ruleToEdit = null; //clear cache
|
||||
updateListView();
|
||||
}
|
||||
|
||||
if(requestCode == 4000) //editRule
|
||||
if(requestCode == requestCodeChangeRule) //editRule
|
||||
{
|
||||
ruleToEdit = null; //clear cache
|
||||
updateListView();
|
||||
@ -190,7 +186,7 @@ public class ActivityMainRules extends ActivityGeneric
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.whatToDoWithRule));
|
||||
alertDialogBuilder.setItems(new String[]{ getResources().getString(R.string.runManually), getResources().getString(R.string.edit), getResources().getString(R.string.deleteCapital) }, new DialogInterface.OnClickListener()
|
||||
alertDialogBuilder.setItems(new String[]{ getResources().getString(R.string.runManually), getResources().getString(R.string.edit), getResources().getString(R.string.deleteCapital), getResources().getString(R.string.clone) }, new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
@ -212,11 +208,22 @@ public class ActivityMainRules extends ActivityGeneric
|
||||
case 1:
|
||||
ruleToEdit = ruleThisIsAbout;
|
||||
Intent manageSpecificRuleIntent = new Intent (ActivityMainRules.this, ActivityManageRule.class);
|
||||
startActivityForResult(manageSpecificRuleIntent, 4000);
|
||||
startActivityForResult(manageSpecificRuleIntent, requestCodeChangeRule);
|
||||
break;
|
||||
case 2:
|
||||
if(ruleThisIsAbout.delete())
|
||||
{
|
||||
ruleToEdit = null; //clear cache
|
||||
updateListView();
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
ruleToEdit = ruleThisIsAbout;
|
||||
if(ruleToEdit.cloneRule(ActivityMainRules.this))
|
||||
{
|
||||
ruleToEdit = null; //clear cache
|
||||
updateListView();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -229,6 +236,11 @@ public class ActivityMainRules extends ActivityGeneric
|
||||
public void updateListView()
|
||||
{
|
||||
Miscellaneous.logEvent("i", "ListView", "Attempting to update RuleListView", 4);
|
||||
|
||||
ruleList.clear();
|
||||
for(Rule r : Rule.getRuleCollection())
|
||||
ruleList.add(r);
|
||||
|
||||
try
|
||||
{
|
||||
if(ruleListView.getAdapter() == null)
|
||||
@ -242,11 +254,11 @@ public class ActivityMainRules extends ActivityGeneric
|
||||
try
|
||||
{
|
||||
if(AutomationService.isMyServiceRunning(this))
|
||||
AlarmListener.reloadAlarms();
|
||||
DateTimeListener.reloadAlarms();
|
||||
}
|
||||
catch(NullPointerException e)
|
||||
{
|
||||
// AlarmManager instance not prepared, yet.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -29,6 +29,7 @@ import androidx.core.text.HtmlCompat;
|
||||
|
||||
import com.jens.automation2.AutomationService.serviceCommands;
|
||||
import com.jens.automation2.Trigger.Trigger_Enum;
|
||||
import com.jens.automation2.location.CellLocationChangedReceiver;
|
||||
import com.jens.automation2.location.LocationProvider;
|
||||
|
||||
import java.io.File;
|
||||
@ -43,8 +44,9 @@ public class ActivityMainScreen extends ActivityGeneric
|
||||
|
||||
private static ActivityMainScreen activityMainScreenInstance = null;
|
||||
private ToggleButton toggleService, tbLockSound;
|
||||
private Button bShowHelp, bPrivacy, bSettingsErase, bAddSoundLockTIme;
|
||||
private Button bShowHelp, bPrivacy, bSettingsErase, bAddSoundLockTIme, bDonate;
|
||||
private TextView tvActivePoi, tvClosestPoi, tvLastRule, tvMainScreenNotePermissions, tvMainScreenNoteFeaturesFromOtherFlavor, tvMainScreenNoteLocationImpossibleBlameGoogle, tvMainScreenNoteNews, tvlockSoundDuration;
|
||||
private static boolean updateNoteDisplayed = false;
|
||||
|
||||
private ListView lvRuleHistory;
|
||||
private ArrayAdapter<Rule> ruleHistoryListViewAdapter;
|
||||
@ -80,6 +82,12 @@ public class ActivityMainScreen extends ActivityGeneric
|
||||
tvlockSoundDuration = (TextView)findViewById(R.id.tvlockSoundDuration);
|
||||
tbLockSound = (ToggleButton) findViewById(R.id.tbLockSound);
|
||||
toggleService = (ToggleButton) findViewById(R.id.tbArmMastListener);
|
||||
|
||||
bDonate = (Button)findViewById(R.id.bDonate);
|
||||
|
||||
if(!BuildConfig.FLAVOR.equalsIgnoreCase("googlePlayFlavor"))
|
||||
bDonate.setVisibility(View.VISIBLE);
|
||||
|
||||
toggleService.setChecked(AutomationService.isMyServiceRunning(this));
|
||||
toggleService.setOnCheckedChangeListener(new OnCheckedChangeListener()
|
||||
{
|
||||
@ -109,6 +117,18 @@ public class ActivityMainScreen extends ActivityGeneric
|
||||
}
|
||||
});
|
||||
|
||||
bDonate.setOnClickListener(new OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
String privacyPolicyUrl = "https://server47.de/donate";
|
||||
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(privacyPolicyUrl));
|
||||
startActivity(browserIntent);
|
||||
}
|
||||
});
|
||||
|
||||
tbLockSound.setOnCheckedChangeListener(new OnCheckedChangeListener()
|
||||
{
|
||||
@Override
|
||||
@ -407,6 +427,15 @@ public class ActivityMainScreen extends ActivityGeneric
|
||||
else
|
||||
activityMainScreenInstance.checkForNews();
|
||||
|
||||
if(BuildConfig.FLAVOR.equals("apkFlavor") && Settings.automaticUpdateCheck)
|
||||
{
|
||||
Calendar now = Calendar.getInstance();
|
||||
if (Settings.lastUpdateCheck == Settings.default_lastUpdateCheck || now.getTimeInMillis() >= Settings.lastUpdateCheck + (long)(Settings.updateCheckFrequencyDays * 24 * 60 * 60 * 1000))
|
||||
{
|
||||
activityMainScreenInstance.checkForUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
Settings.considerDone(Settings.constNewsOptInDone);
|
||||
Settings.writeSettings(Miscellaneous.getAnyContext());
|
||||
}
|
||||
@ -588,6 +617,15 @@ public class ActivityMainScreen extends ActivityGeneric
|
||||
Miscellaneous.messageBox(title, text, ActivityMainScreen.getActivityMainScreenInstance());
|
||||
}
|
||||
|
||||
synchronized void checkForUpdate()
|
||||
{
|
||||
if(Settings.automaticUpdateCheck)
|
||||
{
|
||||
AsyncTasks.AsyncTaskUpdateCheck updateCheckTask = new AsyncTasks.AsyncTaskUpdateCheck();
|
||||
updateCheckTask.execute(ActivityMainScreen.this);
|
||||
}
|
||||
}
|
||||
|
||||
synchronized void checkForNews()
|
||||
{
|
||||
if(Settings.displayNewsOnMainScreen)
|
||||
@ -617,4 +655,38 @@ public class ActivityMainScreen extends ActivityGeneric
|
||||
Miscellaneous.logEvent("e", "Error displaying news", Log.getStackTraceString(e), 3);
|
||||
}
|
||||
}
|
||||
|
||||
public void processUpdateCheckResult(Boolean result)
|
||||
{
|
||||
if(result && !updateNoteDisplayed)
|
||||
{
|
||||
updateNoteDisplayed = true;
|
||||
|
||||
AlertDialog.Builder updateNoteBuilder = new AlertDialog.Builder(ActivityMainScreen.this);
|
||||
updateNoteBuilder.setMessage(getResources().getString(R.string.updateAvailable));
|
||||
updateNoteBuilder.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i)
|
||||
{
|
||||
String url = "https://server47.de/automation/";
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
startActivity(browserIntent);
|
||||
|
||||
updateNoteDisplayed = false;
|
||||
}
|
||||
});
|
||||
updateNoteBuilder.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i)
|
||||
{
|
||||
updateNoteDisplayed = false;
|
||||
}
|
||||
});
|
||||
updateNoteBuilder.show();
|
||||
}
|
||||
|
||||
AsyncTasks.AsyncTaskUpdateCheck.checkRunning = false;
|
||||
}
|
||||
}
|
@ -13,12 +13,17 @@ import com.jens.automation2.receivers.NfcReceiver;
|
||||
@SuppressLint("NewApi")
|
||||
public class ActivityMainTabLayout extends TabActivity
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.main_tab_layout);
|
||||
|
||||
Settings.readFromPersistentStorage(ActivityMainTabLayout.this);
|
||||
|
||||
if(Settings.tabsPlacement == 1)
|
||||
setContentView(R.layout.main_tab_layout_tabs_at_bottom);
|
||||
else
|
||||
setContentView(R.layout.main_tab_layout_tabs_at_top);
|
||||
|
||||
TabHost tabHost = getTabHost();
|
||||
|
||||
@ -67,4 +72,4 @@ public class ActivityMainTabLayout extends TabActivity
|
||||
// setIntent(intent);
|
||||
NfcReceiver.checkIntentForNFC(this, intent);
|
||||
}
|
||||
}
|
||||
}
|
@ -16,6 +16,8 @@ import android.widget.Toast;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.documentfile.provider.DocumentFile;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -27,7 +29,7 @@ public class ActivityMaintenance extends Activity
|
||||
|
||||
final static String prefsFileName = "com.jens.automation2_preferences.xml";
|
||||
|
||||
TextView tvFileStoreLocation;
|
||||
TextView tvFileStoreLocation, tvAppVersion;
|
||||
Button bVolumeTest, bMoreSettings, bSettingsSetToDefault, bShareConfigAndLog, bImportConfiguration, bExportConfiguration;
|
||||
|
||||
@Override
|
||||
@ -101,6 +103,13 @@ public class ActivityMaintenance extends Activity
|
||||
});
|
||||
|
||||
tvFileStoreLocation = (TextView)findViewById(R.id.tvFileStoreLocation);
|
||||
tvAppVersion = (TextView)findViewById(R.id.tvAppVersion);
|
||||
|
||||
tvAppVersion.setText(
|
||||
"Version: " + BuildConfig.VERSION_NAME + Miscellaneous.lineSeparator +
|
||||
"Version code: " + String.valueOf(BuildConfig.VERSION_CODE) + Miscellaneous.lineSeparator +
|
||||
"Flavor: " + BuildConfig.FLAVOR
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -192,6 +201,9 @@ public class ActivityMaintenance extends Activity
|
||||
try
|
||||
{
|
||||
XmlFileInterface.readFile();
|
||||
ActivityMainPoi.getInstance().updateListView();
|
||||
ActivityMainRules.getInstance().updateListView();
|
||||
ActivityMainProfiles.getInstance().updateListView();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -221,10 +233,17 @@ public class ActivityMaintenance extends Activity
|
||||
// Clean up
|
||||
for(DocumentFile file : directory.listFiles())
|
||||
{
|
||||
if(file.getName().equals(XmlFileInterface.settingsFileName) && file.canWrite())
|
||||
file.delete();
|
||||
else if(file.getName().equals(prefsFileName) && file.canWrite())
|
||||
file.delete();
|
||||
/*
|
||||
On some few users' devices it seems this caused a crash because file.getName() was null.
|
||||
The reason for that remains unknown, but we don't want the export to crash because of it.
|
||||
*/
|
||||
if(!StringUtils.isEmpty(file.getName()))
|
||||
{
|
||||
if (file.getName().equals(XmlFileInterface.settingsFileName) && file.canWrite())
|
||||
file.delete();
|
||||
else if (file.getName().equals(prefsFileName) && file.canWrite())
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
DocumentFile dstRules = directory.createFile("text/xml", XmlFileInterface.settingsFileName);
|
||||
@ -298,17 +317,9 @@ public class ActivityMaintenance extends Activity
|
||||
|
||||
String subject = "Automation logs";
|
||||
|
||||
StringBuilder emailBody = new StringBuilder();
|
||||
emailBody.append("Device details" + Miscellaneous.lineSeparator);
|
||||
emailBody.append("OS version: " + System.getProperty("os.version") + Miscellaneous.lineSeparator);
|
||||
emailBody.append("API Level: " + android.os.Build.VERSION.SDK + Miscellaneous.lineSeparator);
|
||||
emailBody.append("Device: " + android.os.Build.DEVICE + Miscellaneous.lineSeparator);
|
||||
emailBody.append("Model: " + android.os.Build.MODEL + Miscellaneous.lineSeparator);
|
||||
emailBody.append("Product: " + android.os.Build.PRODUCT);
|
||||
|
||||
Uri uri = Uri.parse("content://com.jens.automation2/" + Settings.zipFileName);
|
||||
|
||||
Miscellaneous.sendEmail(ActivityMaintenance.this, "android-development@gmx.de", "Automation logs", emailBody.toString(), uri);
|
||||
Miscellaneous.sendEmail(ActivityMaintenance.this, "android-development@gmx.de", "Automation logs", getSystemInfo(), uri);
|
||||
}
|
||||
});
|
||||
alertDialogBuilder.setNegativeButton(context.getResources().getString(R.string.no), null);
|
||||
@ -317,6 +328,19 @@ public class ActivityMaintenance extends Activity
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
public static String getSystemInfo()
|
||||
{
|
||||
StringBuilder systemInfoText = new StringBuilder();
|
||||
systemInfoText.append("Device details" + Miscellaneous.lineSeparator);
|
||||
systemInfoText.append("OS version: " + System.getProperty("os.version") + Miscellaneous.lineSeparator);
|
||||
systemInfoText.append("API Level: " + android.os.Build.VERSION.SDK + Miscellaneous.lineSeparator);
|
||||
systemInfoText.append("Device: " + android.os.Build.DEVICE + Miscellaneous.lineSeparator);
|
||||
systemInfoText.append("Model: " + android.os.Build.MODEL + Miscellaneous.lineSeparator);
|
||||
systemInfoText.append("Product: " + android.os.Build.PRODUCT + Miscellaneous.lineSeparator);
|
||||
systemInfoText.append("Flavor: " + BuildConfig.FLAVOR);
|
||||
return systemInfoText.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume()
|
||||
{
|
||||
|
@ -8,7 +8,6 @@ import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@ -27,7 +26,7 @@ public class ActivityManageActionPlaySound extends Activity
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_manage_play_sound);
|
||||
setContentView(R.layout.activity_manage_action_play_sound);
|
||||
|
||||
chkPlaySoundAlwaysPlay = (CheckBox)findViewById(R.id.chkPlaySoundAlwaysPlay);
|
||||
etSelectedSoundFile = (EditText)findViewById(R.id.etSelectedSoundFile);
|
||||
|
@ -59,7 +59,7 @@ public class ActivityManageActionSendTextMessage extends Activity
|
||||
backToRuleManager();
|
||||
}
|
||||
else
|
||||
Toast.makeText(getBaseContext(), getResources().getString(R.string.textTooShort), Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(getBaseContext(), getResources().getString(R.string.enterPhoneNumberAndText), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
|
||||
@ -84,20 +84,10 @@ public class ActivityManageActionSendTextMessage extends Activity
|
||||
etPhoneNumber.setText(parameters[0]);
|
||||
etSendTextMessage.setText(parameters[1]);
|
||||
}
|
||||
|
||||
|
||||
// String url = getIntent().getStringExtra("urlToTrigger");
|
||||
// if(url != null)
|
||||
// existingUrl = url;
|
||||
}
|
||||
|
||||
private void backToRuleManager()
|
||||
{
|
||||
// Intent returnIntent = new Intent();
|
||||
// returnIntent.putExtra("urlToTrigger", existingUrl);
|
||||
|
||||
// setResult(RESULT_OK, returnIntent);
|
||||
|
||||
if(edit && resultingAction != null)
|
||||
{
|
||||
ActivityManageActionSendTextMessage.resultingAction.setParameter2(etPhoneNumber.getText().toString() + Actions.smsSeparator + etSendTextMessage.getText().toString());
|
||||
|
@ -44,7 +44,7 @@ public class ActivityManageActionSpeakText extends Activity
|
||||
backToRuleManager();
|
||||
}
|
||||
else
|
||||
Toast.makeText(getBaseContext(), getResources().getString(R.string.textTooShort), Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(getBaseContext(), getResources().getString(R.string.enterPhoneNumberAndText), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -230,44 +230,89 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
return null;
|
||||
}
|
||||
|
||||
private AlertDialog getActionStartActivityDialog1()
|
||||
private AlertDialog getActionStartActivityDialog1Application()
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.selectApplication));
|
||||
final String[] applicationArray = ActivityManageActionStartActivity.getApplicationNameListString(this);
|
||||
alertDialogBuilder.setItems(applicationArray, new DialogInterface.OnClickListener()
|
||||
{
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
dialog.dismiss();
|
||||
getActionStartActivityDialog2(applicationArray[which]).show();
|
||||
getActionStartActivityDialog2(applicationArray[which]);
|
||||
}
|
||||
});
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
private AlertDialog getActionStartActivityDialog2(String applicationName)
|
||||
private void getActionStartActivityDialog2(String applicationName)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.selectPackageOfApplication));
|
||||
final String[] packageArray = ActivityManageActionStartActivity.getPackageListString(this, applicationName);
|
||||
alertDialogBuilder.setItems(packageArray, new DialogInterface.OnClickListener()
|
||||
{
|
||||
if(packageArray.length > 1)
|
||||
{
|
||||
alertDialogBuilder.setItems(packageArray, new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
getActionStartActivityDialog4ActivityPickMethod(packageArray[which]).show();
|
||||
}
|
||||
});
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
alertDialog.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
getActionStartActivityDialog4ActivityPickMethod(packageArray[0]).show();
|
||||
}
|
||||
}
|
||||
|
||||
private AlertDialog getActionStartActivityDialog4ActivityPickMethod(final String packageName)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
alertDialogBuilder.setMessage(getResources().getString(R.string.launcherOrManualExplanation));
|
||||
alertDialogBuilder.setPositiveButton(getResources().getString(R.string.takeLauncherActivity), new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
getActionStartActivityDialog3(packageArray[which]).show();
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.hint), getResources().getString(R.string.chooseActivityHint), ActivityManageActionStartActivity.this).show();
|
||||
|
||||
// Pick the launcher automatically
|
||||
Intent launchIntent = getPackageManager().getLaunchIntentForPackage(packageName);
|
||||
if (launchIntent != null)
|
||||
{
|
||||
ActivityInfo ai = ActivityManageActionStartActivity.getActivityInfoForPackageNameAndActivityName(packageName, launchIntent.getComponent().getClassName());
|
||||
etPackageName.setText(ai.packageName);
|
||||
etActivityOrActionPath.setText(ai.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
getActionStartActivityDialog5Activity(packageName).show();
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.hint), getResources().getString(R.string.launcherNotFound) + Miscellaneous.lineSeparator + getResources().getString(R.string.chooseActivityHint), ActivityManageActionStartActivity.this).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
alertDialogBuilder.setNegativeButton(getResources().getString(R.string.pickActivityManually), new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
getActionStartActivityDialog5Activity(packageName).show();
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.hint), getResources().getString(R.string.chooseActivityHint), ActivityManageActionStartActivity.this).show();
|
||||
}
|
||||
});
|
||||
|
||||
final String activityArray[] = ActivityManageActionStartActivity.getActivityListForPackageName(packageName);
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
private AlertDialog getActionStartActivityDialog3(final String packageName)
|
||||
|
||||
private AlertDialog getActionStartActivityDialog5Activity(final String packageName)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.selectActivityToBeStarted));
|
||||
@ -283,7 +328,6 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
}
|
||||
});
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
@ -598,7 +642,6 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
}
|
||||
});
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
@ -615,9 +658,7 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
protected void onPostExecute(Void result)
|
||||
{
|
||||
progressDialog.dismiss();
|
||||
getActionStartActivityDialog1().show();
|
||||
getActionStartActivityDialog1Application().show();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.VibrationEffect;
|
||||
import android.os.Vibrator;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class ActivityManageActionVibrate extends Activity
|
||||
{
|
||||
TextView etVibratePattern;
|
||||
Button bTestVibratePattern, bSaveVibratePattern;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_manage_action_vibrate);
|
||||
|
||||
etVibratePattern = (EditText)findViewById(R.id.etVibratePattern);
|
||||
bTestVibratePattern = (Button)findViewById(R.id.bTestVibratePattern);
|
||||
bSaveVibratePattern = (Button)findViewById(R.id.bSaveVibratePattern);
|
||||
|
||||
bSaveVibratePattern.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View view)
|
||||
{
|
||||
if(checkInput())
|
||||
{
|
||||
Intent answer = new Intent();
|
||||
answer.putExtra("vibratePattern", etVibratePattern.getText().toString());
|
||||
setResult(RESULT_OK, answer);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
bTestVibratePattern.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
if(checkInput())
|
||||
{
|
||||
if (ActivityPermissions.havePermission(Manifest.permission.VIBRATE, ActivityManageActionVibrate.this))
|
||||
{
|
||||
String pattern = etVibratePattern.getText().toString();
|
||||
Actions.vibrate(false, pattern);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Intent input = getIntent();
|
||||
|
||||
if(input.hasExtra("vibratePattern"))
|
||||
etVibratePattern.setText(input.getStringExtra("vibratePattern"));
|
||||
}
|
||||
|
||||
boolean checkInput()
|
||||
{
|
||||
String vibratePattern = etVibratePattern.getText().toString();
|
||||
String regex = "^[0-9,]+$";
|
||||
if(StringUtils.isEmpty(vibratePattern) || !vibratePattern.matches(regex) || vibratePattern.substring(0, 1).equals(",") || vibratePattern.substring(vibratePattern.length()-1).equals(","))
|
||||
{
|
||||
Toast.makeText(ActivityManageActionVibrate.this, getResources().getString(R.string.pleaseEnterValidVibrationPattern), Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -13,6 +13,7 @@ import android.location.LocationListener;
|
||||
import android.location.LocationManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
@ -21,6 +22,12 @@ import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.jens.automation2.receivers.ConnectivityReceiver;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
public class ActivityManagePoi extends Activity
|
||||
{
|
||||
public LocationManager myLocationManager;
|
||||
@ -31,6 +38,11 @@ public class ActivityManagePoi extends Activity
|
||||
Button bGetPosition, bSavePoi;
|
||||
ImageButton ibShowOnMap;
|
||||
EditText guiPoiName, guiPoiLatitude, guiPoiLongitude, guiPoiRadius;
|
||||
Calendar locationSearchStart = null;
|
||||
Timer timer = null;
|
||||
|
||||
final static int defaultRadius = 250;
|
||||
final static int searchTimeout = 120;
|
||||
|
||||
private static ProgressDialog progressDialog;
|
||||
|
||||
@ -104,7 +116,7 @@ public class ActivityManagePoi extends Activity
|
||||
myLocationManager.removeUpdates(myLocationListenerGps);
|
||||
ActivityMainPoi.poiToEdit = new PointOfInterest();
|
||||
ActivityMainPoi.poiToEdit.setLocation(new Location("POINT_LOCATION"));
|
||||
if(loadFormValuesToVariable())
|
||||
if(loadFormValuesToVariable(false))
|
||||
if(ActivityMainPoi.poiToEdit.create(this))
|
||||
{
|
||||
this.setResult(RESULT_OK);
|
||||
@ -114,7 +126,7 @@ public class ActivityManagePoi extends Activity
|
||||
private void changePoi()
|
||||
{
|
||||
myLocationManager.removeUpdates(myLocationListenerGps);
|
||||
if(loadFormValuesToVariable())
|
||||
if(loadFormValuesToVariable(false))
|
||||
if(ActivityMainPoi.poiToEdit.change(this))
|
||||
{
|
||||
this.setResult(RESULT_OK);
|
||||
@ -150,48 +162,142 @@ public class ActivityManagePoi extends Activity
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI Manager", getResources().getString(R.string.logGettingPositionWithProvider) + " " + provider1, 3);
|
||||
myLocationManager.requestLocationUpdates(provider1, 500, Settings.satisfactoryAccuracyNetwork, myLocationListenerNetwork);
|
||||
|
||||
locationSearchStart = Calendar.getInstance();
|
||||
startTimeout();
|
||||
|
||||
if(!Settings.privacyLocationing || !ConnectivityReceiver.isDataConnectionAvailable(AutomationService.getInstance()))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI Manager", getResources().getString(R.string.logGettingPositionWithProvider) + " " + provider1, 3);
|
||||
myLocationManager.requestLocationUpdates(provider1, 500, Settings.satisfactoryAccuracyNetwork, myLocationListenerNetwork);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "POI Manager", "Skipping network location query because private locationing is active.", 4);
|
||||
|
||||
Miscellaneous.logEvent("i", "POI Manager", getResources().getString(R.string.logGettingPositionWithProvider) + " " + provider2, 3);
|
||||
myLocationManager.requestLocationUpdates(provider2, 500, Settings.satisfactoryAccuracyGps, myLocationListenerGps);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void compareLocations()
|
||||
|
||||
private void startTimeout()
|
||||
{
|
||||
if(timer != null)
|
||||
stopTimeout();
|
||||
|
||||
timer = new Timer();
|
||||
|
||||
class TimeoutTask extends TimerTask
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
evaluateLocationResults();
|
||||
}
|
||||
}
|
||||
|
||||
Miscellaneous.logEvent("i", "POI Manager", "Starting timeout for location search: " + String.valueOf(searchTimeout) + " seconds", 5);
|
||||
|
||||
TimerTask timeoutTask = new TimeoutTask();
|
||||
timer.schedule(timeoutTask, searchTimeout * 1000);
|
||||
}
|
||||
|
||||
private void stopTimeout()
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI Manager", "Stopping timeout for location search.", 5);
|
||||
|
||||
if(timer != null)
|
||||
{
|
||||
timer.purge();
|
||||
timer.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
private void evaluateLocationResults()
|
||||
{
|
||||
/*
|
||||
Procedure:
|
||||
If we get a GPS result we take it and suggest a default minimum radius.
|
||||
If private locationing is active that's the only possible outcome other than a timeout.
|
||||
|
||||
If private locationing is not active
|
||||
If we get a network
|
||||
*/
|
||||
|
||||
// We have GPS
|
||||
if(locationGps != null)
|
||||
{
|
||||
myLocationManager.removeUpdates(myLocationListenerNetwork);
|
||||
|
||||
guiPoiLatitude.setText(String.valueOf(locationGps.getLatitude()));
|
||||
guiPoiLongitude.setText(String.valueOf(locationGps.getLongitude()));
|
||||
|
||||
String text;
|
||||
if(locationNetwork != null)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI Manager", getResources().getString(R.string.comparing), 4);
|
||||
|
||||
double variance = locationGps.distanceTo(locationNetwork);
|
||||
|
||||
String text = String.format(getResources().getString(R.string.distanceBetween), Math.round(variance));
|
||||
|
||||
// Toast.makeText(getBaseContext(), text, Toast.LENGTH_LONG).show();
|
||||
Miscellaneous.logEvent("i", "POI Manager", text, 4);
|
||||
// if(variance > 50 && guiPoiRadius.getText().toString().length()>0 && Integer.parseInt(guiPoiRadius.getText().toString())<variance)
|
||||
// {
|
||||
// String text = "Positioning via network is off by " + variance + " meters. The radius you specify shouldn't be smaller than that.";
|
||||
getDialog(text, Math.round(variance) + 1).show();
|
||||
// Toast.makeText(getBaseContext(), "Positioning via network is off by " + variance + " meters. The radius you specify shouldn't be smaller than that.", Toast.LENGTH_LONG).show();
|
||||
// }
|
||||
text = String.format(getResources().getString(R.string.distanceBetween), Math.round(variance));
|
||||
getRadiusConfirmationDialog(text, Math.round(variance) + 1).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
progressDialog.dismiss();
|
||||
myLocationManager.removeUpdates(myLocationListenerNetwork);
|
||||
guiPoiRadius.setText("250");
|
||||
text = String.format(getResources().getString(R.string.locationFound), defaultRadius);
|
||||
getRadiusConfirmationDialog(text, defaultRadius).show();
|
||||
}
|
||||
Miscellaneous.logEvent("i", "POI Manager", text, 4);
|
||||
} // we have a great network signal:
|
||||
else if(locationNetwork != null && locationNetwork.getAccuracy() <= Settings.satisfactoryAccuracyGps && locationNetwork.getAccuracy() <= defaultRadius)
|
||||
{
|
||||
/*
|
||||
We do not yet have a GPS result. But we have a network result that is good enough
|
||||
to accept it a sole result. In that case we suggest a default radius, no variance.
|
||||
*/
|
||||
|
||||
guiPoiLatitude.setText(String.valueOf(locationNetwork.getLatitude()));
|
||||
guiPoiLongitude.setText(String.valueOf(locationNetwork.getLongitude()));
|
||||
|
||||
String text = String.format(getResources().getString(R.string.locationFound), defaultRadius);
|
||||
Miscellaneous.logEvent("i", "POI Manager", text, 4);
|
||||
|
||||
getRadiusConfirmationDialog(text, defaultRadius).show();
|
||||
}
|
||||
else if( // we have a bad network signal and nothing else, GPS result may still come in
|
||||
locationNetwork != null
|
||||
&&
|
||||
Calendar.getInstance().getTimeInMillis()
|
||||
<
|
||||
(locationSearchStart.getTimeInMillis() + ((long)searchTimeout * 1000))
|
||||
)
|
||||
{
|
||||
// Only a network location was found and it is also not very accurate.
|
||||
}
|
||||
else if( // we have a bad network signal and nothing else, timeout has expired, nothing else can possibly come in
|
||||
locationNetwork != null
|
||||
&&
|
||||
Calendar.getInstance().getTimeInMillis()
|
||||
>
|
||||
(locationSearchStart.getTimeInMillis() + ((long)searchTimeout * 1000))
|
||||
)
|
||||
{
|
||||
// Only a network location was found and it is also not very accurate.
|
||||
|
||||
guiPoiLatitude.setText(String.valueOf(locationNetwork.getLatitude()));
|
||||
guiPoiLongitude.setText(String.valueOf(locationNetwork.getLongitude()));
|
||||
|
||||
String text = String.format(getResources().getString(R.string.locationFoundInaccurate), defaultRadius);
|
||||
getRadiusConfirmationDialog(text, defaultRadius).show();
|
||||
Miscellaneous.logEvent("i", "POI Manager", text, 4);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "POI Manager", getResources().getString(R.string.logNotAllMeasurings), 4);
|
||||
{
|
||||
String text = String.format(getResources().getString(R.string.noLocationCouldBeFound), String.valueOf(searchTimeout));
|
||||
Miscellaneous.logEvent("i", "POI Manager", text, 2);
|
||||
|
||||
if(myLocationListenerNetwork != null)
|
||||
myLocationManager.removeUpdates(myLocationListenerNetwork);
|
||||
|
||||
myLocationManager.removeUpdates(myLocationListenerGps);
|
||||
progressDialog.dismiss();
|
||||
getErrorDialog(text).show();
|
||||
}
|
||||
}
|
||||
|
||||
private AlertDialog getNotificationDialog(String text)
|
||||
@ -203,15 +309,6 @@ public class ActivityManagePoi extends Activity
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
// switch(which)
|
||||
// {
|
||||
// case DialogInterface.BUTTON_POSITIVE:
|
||||
// guiPoiRadius.setText(String.valueOf(value));
|
||||
// break;
|
||||
// case DialogInterface.BUTTON_NEGATIVE:
|
||||
// break;
|
||||
// }
|
||||
|
||||
progressDialog = ProgressDialog.show(ActivityManagePoi.this, "", getResources().getString(R.string.gettingPosition), true, true);
|
||||
getLocation();
|
||||
}
|
||||
@ -222,8 +319,11 @@ public class ActivityManagePoi extends Activity
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
private AlertDialog getDialog(String text, final double value)
|
||||
|
||||
private AlertDialog getRadiusConfirmationDialog(String text, final double value)
|
||||
{
|
||||
stopTimeout();
|
||||
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener()
|
||||
{
|
||||
@ -248,10 +348,31 @@ public class ActivityManagePoi extends Activity
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
private AlertDialog getErrorDialog(String text)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
};
|
||||
alertDialogBuilder.setMessage(text);
|
||||
alertDialogBuilder.setPositiveButton(getResources().getString(R.string.ok), null);
|
||||
|
||||
if (Looper.myLooper() == null)
|
||||
Looper.prepare();
|
||||
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
public class MyLocationListenerGps implements LocationListener
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(Location location)
|
||||
{
|
||||
@ -261,10 +382,11 @@ public class ActivityManagePoi extends Activity
|
||||
// {
|
||||
// Miscellaneous.logEvent("i", "POI Manager", "satisfactoryNetworkAccuracy of " + String.valueOf(Settings.SATISFACTORY_ACCURACY_GPS) + "m reached. Removing location updates...");
|
||||
|
||||
Miscellaneous.logEvent("i", "POI Manager", "Unsubscribing from GPS location updates.", 5);
|
||||
myLocationManager.removeUpdates(this);
|
||||
locationGps = location;
|
||||
|
||||
compareLocations();
|
||||
evaluateLocationResults();
|
||||
// }
|
||||
}
|
||||
|
||||
@ -288,66 +410,27 @@ public class ActivityManagePoi extends Activity
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// public class MyLocationListenerWifi implements LocationListener
|
||||
// {
|
||||
//
|
||||
// @Override
|
||||
// public void onLocationChanged(Location location)
|
||||
// {
|
||||
// Miscellaneous.logEvent("i", "POI Manager", getResources().getString(R.string.gotGpsUpdate) + " " + String.valueOf(location.getAccuracy()));
|
||||
// // Deactivate when accuracy reached
|
||||
//// if(location.getAccuracy() < Settings.SATISFACTORY_ACCURACY_GPS)
|
||||
//// {
|
||||
//// Miscellaneous.logEvent("i", "POI Manager", "satisfactoryNetworkAccuracy of " + String.valueOf(Settings.SATISFACTORY_ACCURACY_GPS) + "m reached. Removing location updates...");
|
||||
//
|
||||
// myLocationManager.removeUpdates(this);
|
||||
// locationGps = location;
|
||||
//
|
||||
// compareLocations();
|
||||
//// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onProviderDisabled(String provider)
|
||||
// {
|
||||
// // TODO Auto-generated method stub
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onProviderEnabled(String provider)
|
||||
// {
|
||||
// // TODO Auto-generated method stub
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onStatusChanged(String provider, int status, Bundle extras)
|
||||
// {
|
||||
// // TODO Auto-generated method stub
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
public class MyLocationListenerNetwork implements LocationListener
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(Location location)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI Manager", getResources().getString(R.string.logGotNetworkUpdate) + " " + String.valueOf(location.getAccuracy()), 3);
|
||||
|
||||
myLocationManager.removeUpdates(this);
|
||||
locationNetwork = location;
|
||||
|
||||
// Deactivate when accuracy reached
|
||||
// if(location.getAccuracy() < Settings.SATISFACTORY_ACCURACY_GPS)
|
||||
// {
|
||||
// String text = "Network position found. satisfactoryNetworkAccuracy of " + String.valueOf(Settings.SATISFACTORY_ACCURACY_NETWORK) + "m reached. Removing location updates...";
|
||||
// Miscellaneous.logEvent("i", "POI Manager", text);
|
||||
myLocationManager.removeUpdates(this);
|
||||
locationNetwork = location;
|
||||
|
||||
compareLocations();
|
||||
// }
|
||||
if(location.getAccuracy() <= Settings.satisfactoryAccuracyGps)
|
||||
{
|
||||
// Accuracy is so good that we don't need to wait for GPS result
|
||||
Miscellaneous.logEvent("i", "POI Manager", "Unsubscribing from network location updates.", 5);
|
||||
myLocationManager.removeUpdates(myLocationListenerGps);
|
||||
}
|
||||
|
||||
evaluateLocationResults();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -370,7 +453,6 @@ public class ActivityManagePoi extends Activity
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void editPoi(PointOfInterest poi)
|
||||
@ -381,19 +463,22 @@ public class ActivityManagePoi extends Activity
|
||||
guiPoiRadius.setText(String.valueOf(poi.getRadius()));
|
||||
}
|
||||
|
||||
public boolean loadFormValuesToVariable()
|
||||
public boolean loadFormValuesToVariable(boolean checkOnlyCoordinates)
|
||||
{
|
||||
if(ActivityMainPoi.poiToEdit == null)
|
||||
ActivityMainPoi.poiToEdit = new PointOfInterest();
|
||||
|
||||
if(guiPoiName.getText().length() == 0)
|
||||
|
||||
if(!checkOnlyCoordinates)
|
||||
{
|
||||
Toast.makeText(this, getResources().getString(R.string.pleaseEnterValidName), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
if (guiPoiName.getText().length() == 0)
|
||||
{
|
||||
Toast.makeText(this, getResources().getString(R.string.pleaseEnterValidName), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
ActivityMainPoi.poiToEdit.setName(guiPoiName.getText().toString());
|
||||
}
|
||||
else
|
||||
ActivityMainPoi.poiToEdit.setName(guiPoiName.getText().toString());
|
||||
|
||||
|
||||
if(ActivityMainPoi.poiToEdit.getLocation() == null)
|
||||
ActivityMainPoi.poiToEdit.setLocation(new Location("POINT_LOCATION"));
|
||||
|
||||
@ -416,28 +501,31 @@ public class ActivityManagePoi extends Activity
|
||||
Toast.makeText(this, getResources().getString(R.string.pleaseEnterValidLongitude), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
|
||||
if(!checkOnlyCoordinates)
|
||||
{
|
||||
ActivityMainPoi.poiToEdit.setRadius(Double.parseDouble(guiPoiRadius.getText().toString()), this);
|
||||
try
|
||||
{
|
||||
ActivityMainPoi.poiToEdit.setRadius(Double.parseDouble(guiPoiRadius.getText().toString()), this);
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
Toast.makeText(this, getResources().getString(R.string.pleaseEnterValidRadius), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Toast.makeText(this, getResources().getString(R.string.unknownError), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch(NumberFormatException e)
|
||||
{
|
||||
Toast.makeText(this, getResources().getString(R.string.pleaseEnterValidRadius), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Toast.makeText(this, getResources().getString(R.string.unknownError), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void showOnMap()
|
||||
{
|
||||
if(loadFormValuesToVariable())
|
||||
if(loadFormValuesToVariable(true))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
@ -37,8 +38,8 @@ public class ActivityManageProfile extends Activity
|
||||
final static int intentCodeRingtonePickerNotificationsFile = 9020;
|
||||
final static int intentCodeRingtonePickerNotificationsRingtone = 9021;
|
||||
|
||||
CheckBox checkBoxChangeSoundMode, checkBoxChangeVolumeMusicVideoGameMedia, checkBoxChangeVolumeNotifications, checkBoxChangeVolumeAlarms, checkBoxChangeIncomingCallsRingtone, checkBoxChangeNotificationRingtone, checkBoxChangeAudibleSelection, checkBoxChangeScreenLockUnlockSound, checkBoxChangeHapticFeedback, checkBoxChangeVibrateWhenRinging, checkBoxVibrateWhenRinging, checkBoxAudibleSelection, checkBoxScreenLockUnlockSound, checkBoxHapticFeedback;
|
||||
Spinner spinnerSoundMode;
|
||||
CheckBox checkBoxChangeSoundMode, checkBoxChangeVolumeMusicVideoGameMedia, checkBoxChangeVolumeNotifications, checkBoxChangeVolumeAlarms, checkBoxChangeIncomingCallsRingtone, checkBoxChangeNotificationRingtone, checkBoxChangeAudibleSelection, checkBoxChangeScreenLockUnlockSound, checkBoxChangeHapticFeedback, checkBoxChangeVibrateWhenRinging, checkBoxVibrateWhenRinging, checkBoxAudibleSelection, checkBoxScreenLockUnlockSound, checkBoxHapticFeedback, checkBoxChangeDnd;
|
||||
Spinner spinnerSoundMode, spinnerDndMode;
|
||||
SeekBar seekBarVolumeMusic, seekBarVolumeNotifications, seekBarVolumeAlarms;
|
||||
Button bChangeSoundIncomingCalls, bChangeSoundNotifications, bSaveProfile;
|
||||
TextView tvIncomingCallsRingtone, tvNotificationsRingtone;
|
||||
@ -47,6 +48,7 @@ public class ActivityManageProfile extends Activity
|
||||
File incomingCallsRingtone = null, notificationsRingtone = null;
|
||||
|
||||
ArrayAdapter<String> soundModeAdapter;
|
||||
ArrayAdapter<String> dndModeAdapter;
|
||||
|
||||
public void setIncomingCallsRingtone(File incomingCallsRingtone)
|
||||
{
|
||||
@ -85,6 +87,7 @@ public class ActivityManageProfile extends Activity
|
||||
this.setContentView(R.layout.activity_manage_specific_profile);
|
||||
|
||||
checkBoxChangeSoundMode = (CheckBox)findViewById(R.id.checkBoxChangeSoundMode);
|
||||
checkBoxChangeDnd = (CheckBox)findViewById(R.id.checkBoxChangeDnd);
|
||||
checkBoxChangeVolumeMusicVideoGameMedia = (CheckBox)findViewById(R.id.checkBoxChangeVolumeMusicVideoGameMedia);
|
||||
checkBoxChangeVolumeNotifications = (CheckBox)findViewById(R.id.checkBoxChangeVolumeNotifications);
|
||||
checkBoxChangeVolumeAlarms = (CheckBox)findViewById(R.id.checkBoxChangeVolumeAlarms);
|
||||
@ -99,6 +102,7 @@ public class ActivityManageProfile extends Activity
|
||||
checkBoxHapticFeedback = (CheckBox)findViewById(R.id.checkBoxHapticFeedback);
|
||||
checkBoxVibrateWhenRinging = (CheckBox)findViewById(R.id.checkBoxVibrateWhenRinging);
|
||||
spinnerSoundMode = (Spinner)findViewById(R.id.spinnerSoundMode);
|
||||
spinnerDndMode = (Spinner)findViewById(R.id.spinnerDndMode);
|
||||
seekBarVolumeMusic = (SeekBar)findViewById(R.id.seekBarVolumeMusic);
|
||||
seekBarVolumeNotifications = (SeekBar)findViewById(R.id.seekBarVolumeNotifications);
|
||||
seekBarVolumeAlarms = (SeekBar)findViewById(R.id.seekBarVolumeAlarms);
|
||||
@ -114,6 +118,7 @@ public class ActivityManageProfile extends Activity
|
||||
checkBoxScreenLockUnlockSound.setEnabled(false);
|
||||
checkBoxHapticFeedback.setEnabled(false);
|
||||
spinnerSoundMode.setEnabled(false);
|
||||
spinnerDndMode.setEnabled(false);
|
||||
seekBarVolumeMusic.setEnabled(false);
|
||||
seekBarVolumeNotifications.setEnabled(false);
|
||||
seekBarVolumeAlarms.setEnabled(false);
|
||||
@ -121,6 +126,14 @@ public class ActivityManageProfile extends Activity
|
||||
bChangeSoundNotifications.setEnabled(false);
|
||||
|
||||
spinnerSoundMode.setSelection(0);
|
||||
spinnerDndMode.setSelection(0);
|
||||
|
||||
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
|
||||
{
|
||||
// Disable DND controls
|
||||
checkBoxChangeDnd.setEnabled(false);
|
||||
spinnerDndMode.setEnabled(false);
|
||||
}
|
||||
|
||||
// Scale SeekBars to the system's maximum volume values
|
||||
AudioManager am = (AudioManager) Miscellaneous.getAnyContext().getSystemService(Context.AUDIO_SERVICE);
|
||||
@ -128,8 +141,30 @@ public class ActivityManageProfile extends Activity
|
||||
seekBarVolumeNotifications.setMax(am.getStreamMaxVolume(AudioManager.STREAM_NOTIFICATION));
|
||||
seekBarVolumeAlarms.setMax(am.getStreamMaxVolume(AudioManager.STREAM_ALARM));
|
||||
|
||||
soundModeAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, new String[] { getResources().getString(R.string.soundModeSilent), getResources().getString(R.string.soundModeVibrate), getResources().getString(R.string.soundModeNormal) });
|
||||
soundModeAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, new String[]
|
||||
{
|
||||
getResources().getString(R.string.soundModeSilent),
|
||||
getResources().getString(R.string.soundModeVibrate),
|
||||
getResources().getString(R.string.soundModeNormal)
|
||||
});
|
||||
spinnerSoundMode.setAdapter(soundModeAdapter);
|
||||
|
||||
dndModeAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, new String[]
|
||||
{
|
||||
getResources().getString(R.string.dndOff),
|
||||
getResources().getString(R.string.dndPriority),
|
||||
getResources().getString(R.string.dndNothing),
|
||||
getResources().getString(R.string.dndAlarms)
|
||||
});
|
||||
spinnerDndMode.setAdapter(dndModeAdapter);
|
||||
/*
|
||||
Order in spinner: 1, 2, 4, 3
|
||||
NotificationManager.INTERRUPTION_FILTER_UNKNOWN -> Returned when the value is unavailable for any reason.
|
||||
NotificationManager.INTERRUPTION_FILTER_ALL -> 1 -> Normal interruption filter - no notifications are suppressed. -> essentially turn off DND
|
||||
NotificationManager.INTERRUPTION_FILTER_PRIORITY -> 2 -> Priority interruption filter - all notifications are suppressed except those that match the priority criteria.
|
||||
NotificationManager.INTERRUPTION_FILTER_ALARMS -> 4 -> Alarms only interruption filter - all notifications except those of category
|
||||
NotificationManager.INTERRUPTION_FILTER_NONE -> 3 -> No interruptions filter - all notifications are suppressed and all audio streams (except those used for phone calls) and vibrations are muted.
|
||||
*/
|
||||
|
||||
checkBoxChangeSoundMode.setOnCheckedChangeListener(new OnCheckedChangeListener()
|
||||
{
|
||||
@ -139,6 +174,14 @@ public class ActivityManageProfile extends Activity
|
||||
spinnerSoundMode.setEnabled(isChecked);
|
||||
}
|
||||
});
|
||||
checkBoxChangeDnd.setOnCheckedChangeListener(new OnCheckedChangeListener()
|
||||
{
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
|
||||
{
|
||||
spinnerDndMode.setEnabled(isChecked);
|
||||
}
|
||||
});
|
||||
checkBoxChangeVolumeMusicVideoGameMedia.setOnCheckedChangeListener(new OnCheckedChangeListener()
|
||||
{
|
||||
@Override
|
||||
@ -327,6 +370,7 @@ public class ActivityManageProfile extends Activity
|
||||
{
|
||||
etName.setText(ActivityMainProfiles.profileToEdit.getName());
|
||||
checkBoxChangeSoundMode.setChecked(ActivityMainProfiles.profileToEdit.getChangeSoundMode());
|
||||
checkBoxChangeDnd.setChecked(ActivityMainProfiles.profileToEdit.getChangeDndMode());
|
||||
checkBoxChangeVolumeMusicVideoGameMedia.setChecked(ActivityMainProfiles.profileToEdit.getChangeVolumeMusicVideoGameMedia());
|
||||
checkBoxChangeVolumeNotifications.setChecked(ActivityMainProfiles.profileToEdit.getChangeVolumeNotifications());
|
||||
checkBoxChangeVolumeAlarms.setChecked(ActivityMainProfiles.profileToEdit.getChangeVolumeAlarms());
|
||||
@ -338,6 +382,7 @@ public class ActivityManageProfile extends Activity
|
||||
checkBoxChangeVibrateWhenRinging.setChecked(ActivityMainProfiles.profileToEdit.getChangeVibrateWhenRinging());
|
||||
|
||||
spinnerSoundMode.setSelection(ActivityMainProfiles.profileToEdit.getSoundMode());
|
||||
spinnerDndMode.setSelection(ActivityMainProfiles.profileToEdit.getDndMode()-1);
|
||||
seekBarVolumeMusic.setProgress(ActivityMainProfiles.profileToEdit.getVolumeMusic());
|
||||
seekBarVolumeNotifications.setProgress(ActivityMainProfiles.profileToEdit.getVolumeNotifications());
|
||||
seekBarVolumeAlarms.setProgress(ActivityMainProfiles.profileToEdit.getVolumeAlarms());
|
||||
@ -359,6 +404,7 @@ public class ActivityManageProfile extends Activity
|
||||
|
||||
ActivityMainProfiles.profileToEdit.setName(etName.getText().toString());
|
||||
ActivityMainProfiles.profileToEdit.setChangeSoundMode(checkBoxChangeSoundMode.isChecked());
|
||||
ActivityMainProfiles.profileToEdit.setChangeDndMode(checkBoxChangeDnd.isChecked());
|
||||
ActivityMainProfiles.profileToEdit.setChangeVolumeMusicVideoGameMedia(checkBoxChangeVolumeMusicVideoGameMedia.isChecked());
|
||||
ActivityMainProfiles.profileToEdit.setChangeVolumeNotifications(checkBoxChangeVolumeNotifications.isChecked());
|
||||
ActivityMainProfiles.profileToEdit.setChangeVolumeAlarms(checkBoxChangeVolumeAlarms.isChecked());
|
||||
@ -374,6 +420,7 @@ public class ActivityManageProfile extends Activity
|
||||
ActivityMainProfiles.profileToEdit.setHapticFeedback(checkBoxHapticFeedback.isChecked());
|
||||
ActivityMainProfiles.profileToEdit.setVibrateWhenRinging(checkBoxVibrateWhenRinging.isChecked());
|
||||
ActivityMainProfiles.profileToEdit.setSoundMode(spinnerSoundMode.getSelectedItemPosition());
|
||||
ActivityMainProfiles.profileToEdit.setDndMode(spinnerDndMode.getSelectedItemPosition()+1);
|
||||
ActivityMainProfiles.profileToEdit.setVolumeMusic(seekBarVolumeMusic.getProgress());
|
||||
ActivityMainProfiles.profileToEdit.setVolumeNotifications(seekBarVolumeNotifications.getProgress());
|
||||
ActivityMainProfiles.profileToEdit.setVolumeAlarms(seekBarVolumeAlarms.getProgress());
|
||||
@ -401,21 +448,23 @@ public class ActivityManageProfile extends Activity
|
||||
}
|
||||
|
||||
if(!checkBoxChangeSoundMode.isChecked()
|
||||
&
|
||||
&&
|
||||
!checkBoxChangeDnd.isChecked()
|
||||
&&
|
||||
!checkBoxChangeVolumeMusicVideoGameMedia.isChecked()
|
||||
&
|
||||
&&
|
||||
!checkBoxChangeVolumeNotifications.isChecked()
|
||||
&
|
||||
&&
|
||||
!checkBoxChangeVolumeAlarms.isChecked()
|
||||
&
|
||||
&&
|
||||
!checkBoxChangeIncomingCallsRingtone.isChecked()
|
||||
&
|
||||
&&
|
||||
!checkBoxChangeNotificationRingtone.isChecked()
|
||||
&
|
||||
&&
|
||||
!checkBoxChangeAudibleSelection.isChecked()
|
||||
&
|
||||
&&
|
||||
!checkBoxChangeScreenLockUnlockSound.isChecked()
|
||||
&
|
||||
&&
|
||||
!checkBoxChangeHapticFeedback.isChecked()
|
||||
)
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,297 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.text.InputFilter;
|
||||
import android.text.Spanned;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.jens.automation2.receivers.DeviceOrientationListener;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class ActivityManageTriggerDeviceOrientation extends Activity
|
||||
{
|
||||
TextView currentAzimuth, currentPitch, currentRoll, tvAppliesAzimuth, tvAppliesPitch, tvAppliesRoll;
|
||||
Button bApplyPositionValues, bSavePositionValues;
|
||||
EditText etDesiredAzimuth, etDesiredAzimuthTolerance, etDesiredPitch, etDesiredPitchTolerance, etDesiredRoll, etDesiredRollTolerance;
|
||||
CheckBox chkDevicePositionApplies;
|
||||
|
||||
public static String vectorFieldName = "deviceVector";
|
||||
|
||||
boolean editMode = false;
|
||||
|
||||
float desiredAzimuth, desiredPitch, desiredRoll, desiredAzimuthTolerance, desiredPitchTolerance, desiredRollTolerance;
|
||||
|
||||
public void updateFields(float azimuth, float pitch, float roll)
|
||||
{
|
||||
currentAzimuth.setText(Float.toString(azimuth));
|
||||
currentPitch.setText(Float.toString(pitch));
|
||||
currentRoll.setText(Float.toString(roll));
|
||||
|
||||
try
|
||||
{
|
||||
desiredAzimuth = Float.parseFloat(etDesiredAzimuth.getText().toString());
|
||||
desiredAzimuthTolerance = Float.parseFloat(etDesiredAzimuthTolerance.getText().toString());
|
||||
if (desiredAzimuthTolerance == 180 || (desiredAzimuth - desiredAzimuthTolerance <= azimuth && azimuth <= desiredAzimuth + desiredAzimuthTolerance))
|
||||
{
|
||||
tvAppliesAzimuth.setText(getResources().getString(R.string.yes));
|
||||
tvAppliesAzimuth.setTextColor(Color.GREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
tvAppliesAzimuth.setText(getResources().getString(R.string.no));
|
||||
tvAppliesAzimuth.setTextColor(Color.RED);
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
tvAppliesAzimuth.setText("");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
desiredPitch = Float.parseFloat(etDesiredPitch.getText().toString());
|
||||
desiredPitchTolerance = Float.parseFloat(etDesiredPitchTolerance.getText().toString());
|
||||
if (desiredPitchTolerance == 180 || (desiredPitch - desiredPitchTolerance <= pitch && pitch <= desiredPitch + desiredPitchTolerance))
|
||||
{
|
||||
tvAppliesPitch.setText(getResources().getString(R.string.yes));
|
||||
tvAppliesPitch.setTextColor(Color.GREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
tvAppliesPitch.setText(getResources().getString(R.string.no));
|
||||
tvAppliesPitch.setTextColor(Color.RED);
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
tvAppliesPitch.setText("");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
desiredRoll = Float.parseFloat(etDesiredRoll.getText().toString());
|
||||
desiredRollTolerance = Float.parseFloat(etDesiredRollTolerance.getText().toString());
|
||||
if (desiredRollTolerance == 180 || (desiredRoll - desiredRollTolerance <= roll && roll <= desiredRoll + desiredRollTolerance))
|
||||
{
|
||||
tvAppliesRoll.setText(getResources().getString(R.string.yes));
|
||||
tvAppliesRoll.setTextColor(Color.GREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
tvAppliesRoll.setText(getResources().getString(R.string.no));
|
||||
tvAppliesRoll.setTextColor(Color.RED);
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
tvAppliesRoll.setText("");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_manage_trigger_device_orientation);
|
||||
|
||||
currentAzimuth = (TextView) findViewById(R.id.tvCurrentAzimuth);
|
||||
currentPitch = (TextView) findViewById(R.id.tvCurrentOrientationPitch);
|
||||
currentRoll = (TextView) findViewById(R.id.tvCurrentRoll);
|
||||
tvAppliesAzimuth = (TextView) findViewById(R.id.tvAppliesAzimuth);
|
||||
tvAppliesPitch = (TextView) findViewById(R.id.tvAppliesPitch);
|
||||
tvAppliesRoll = (TextView) findViewById(R.id.tvAppliesRoll);
|
||||
|
||||
bApplyPositionValues = (Button) findViewById(R.id.bApplyPositionValues);
|
||||
bSavePositionValues = (Button) findViewById(R.id.bSavePositionValues);
|
||||
|
||||
etDesiredAzimuth = (EditText) findViewById(R.id.etDesiredAzimuth);
|
||||
etDesiredAzimuthTolerance = (EditText) findViewById(R.id.etDesiredAzimuthTolerance);
|
||||
etDesiredPitch = (EditText) findViewById(R.id.etDesiredPitch);
|
||||
etDesiredPitchTolerance = (EditText) findViewById(R.id.etDesiredPitchTolerance);
|
||||
etDesiredRoll = (EditText) findViewById(R.id.etDesiredRoll);
|
||||
etDesiredRollTolerance = (EditText) findViewById(R.id.etDesiredRollTolerance);
|
||||
|
||||
chkDevicePositionApplies = (CheckBox)findViewById(R.id.chkDevicePositionApplies);
|
||||
|
||||
// etDesiredAzimuth.setFilters(new InputFilter[]{new InputFilterMinMax(-180, 180)});
|
||||
// etDesiredPitch.setFilters(new InputFilter[]{new InputFilterMinMax(-180, 180)});
|
||||
// etDesiredRoll.setFilters(new InputFilter[]{new InputFilterMinMax(-180, 180)});
|
||||
etDesiredAzimuthTolerance.setFilters(new InputFilter[]{new InputFilterMinMax(0, 180)});
|
||||
etDesiredPitchTolerance.setFilters(new InputFilter[]{new InputFilterMinMax(0, 180)});
|
||||
etDesiredRollTolerance.setFilters(new InputFilter[]{new InputFilterMinMax(0, 180)});
|
||||
|
||||
if(getIntent().hasExtra(vectorFieldName))
|
||||
{
|
||||
editMode = true;
|
||||
try
|
||||
{
|
||||
boolean chkValue = getIntent().getBooleanExtra(ActivityManageRule.intentNameTriggerParameter1, true);
|
||||
chkDevicePositionApplies.setChecked(chkValue);
|
||||
String values[] = getIntent().getStringExtra(vectorFieldName).split(Trigger.triggerParameter2Split);
|
||||
etDesiredAzimuth.setText(values[0]);
|
||||
etDesiredAzimuthTolerance.setText(values[1]);
|
||||
etDesiredPitch.setText(values[2]);
|
||||
etDesiredPitchTolerance.setText(values[3]);
|
||||
etDesiredRoll.setText(values[4]);
|
||||
etDesiredRollTolerance.setText(values[5]);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Toast.makeText(ActivityManageTriggerDeviceOrientation.this, getResources().getString(R.string.triggerWrong), Toast.LENGTH_SHORT).show();
|
||||
Miscellaneous.logEvent("e", "DevicePositionTrigger", "There\'s something wrong with a device position trigger. Content: " + getIntent().getStringExtra(vectorFieldName) + ", " + Log.getStackTraceString(e), 1);
|
||||
}
|
||||
}
|
||||
|
||||
bApplyPositionValues.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
// Round the values. Too long decimals will destroy the layout
|
||||
|
||||
if(!StringUtils.isEmpty(currentAzimuth.getText()))
|
||||
etDesiredAzimuth.setText(String.valueOf(Math.round(Float.parseFloat(currentAzimuth.getText().toString()))));
|
||||
|
||||
if(!StringUtils.isEmpty(currentPitch.getText()))
|
||||
etDesiredPitch.setText(String.valueOf(Math.round(Float.parseFloat(currentPitch.getText().toString()))));
|
||||
|
||||
if(!StringUtils.isEmpty(currentRoll.getText()))
|
||||
etDesiredRoll.setText(String.valueOf(Math.round(Float.parseFloat(currentRoll.getText().toString()))));
|
||||
}
|
||||
});
|
||||
|
||||
bSavePositionValues.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
if(!checkInputs(true))
|
||||
{
|
||||
Toast.makeText(ActivityManageTriggerDeviceOrientation.this, getResources().getString(R.string.enterValidNumbersIntoAllFields), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Save
|
||||
Intent returnData = new Intent();
|
||||
returnData.putExtra(ActivityManageRule.intentNameTriggerParameter1, chkDevicePositionApplies.isChecked());
|
||||
returnData.putExtra(vectorFieldName,
|
||||
etDesiredAzimuth.getText().toString() + Trigger.triggerParameter2Split +
|
||||
etDesiredAzimuthTolerance.getText().toString() + Trigger.triggerParameter2Split +
|
||||
etDesiredPitch.getText().toString() + Trigger.triggerParameter2Split +
|
||||
etDesiredPitchTolerance.getText().toString() + Trigger.triggerParameter2Split +
|
||||
etDesiredRoll.getText().toString() + Trigger.triggerParameter2Split +
|
||||
etDesiredRollTolerance.getText().toString());
|
||||
|
||||
setResult(RESULT_OK, returnData);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
boolean checkInputs(boolean showMessages)
|
||||
{
|
||||
if(
|
||||
!StringUtils.isEmpty(etDesiredAzimuth.getText().toString()) && Miscellaneous.isNumeric(etDesiredAzimuth.getText().toString())
|
||||
&&
|
||||
!StringUtils.isEmpty(etDesiredAzimuthTolerance.getText().toString()) && Miscellaneous.isNumeric(etDesiredAzimuthTolerance.getText().toString())
|
||||
&&
|
||||
!StringUtils.isEmpty(etDesiredPitch.getText().toString()) && Miscellaneous.isNumeric(etDesiredPitch.getText().toString())
|
||||
&&
|
||||
!StringUtils.isEmpty(etDesiredPitchTolerance.getText().toString()) && Miscellaneous.isNumeric(etDesiredPitchTolerance.getText().toString())
|
||||
&&
|
||||
!StringUtils.isEmpty(etDesiredRoll.getText().toString()) && Miscellaneous.isNumeric(etDesiredRoll.getText().toString())
|
||||
&&
|
||||
!StringUtils.isEmpty(etDesiredRollTolerance.getText().toString()) && Miscellaneous.isNumeric(etDesiredRollTolerance.getText().toString())
|
||||
)
|
||||
{
|
||||
float da = Float.parseFloat(etDesiredAzimuth.getText().toString());
|
||||
float dp = Float.parseFloat(etDesiredPitch.getText().toString());
|
||||
float dr = Float.parseFloat(etDesiredRoll.getText().toString());
|
||||
|
||||
if(Math.abs(da) > 180 || Math.abs(dp) > 180 || Math.abs(dr) > 180)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(showMessages)
|
||||
{
|
||||
float dat = Float.parseFloat(etDesiredAzimuthTolerance.getText().toString());
|
||||
float dpt = Float.parseFloat(etDesiredPitchTolerance.getText().toString());
|
||||
float drt = Float.parseFloat(etDesiredRollTolerance.getText().toString());
|
||||
|
||||
/*
|
||||
The user may enter a tolerance of 180° for two directions, but not all three.
|
||||
Otherwise this trigger would always apply.
|
||||
*/
|
||||
if (Math.abs(dat) >= 180 && Math.abs(dpt) >= 180 && Math.abs(drt) >= 180)
|
||||
{
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.warning), getResources().getString(R.string.toleranceOf180OnlyAllowedIn2Fields), ActivityManageTriggerDeviceOrientation.this).show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume()
|
||||
{
|
||||
super.onResume();
|
||||
DeviceOrientationListener.getInstance().startSensorFromConfigActivity(ActivityManageTriggerDeviceOrientation.this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause()
|
||||
{
|
||||
super.onPause();
|
||||
DeviceOrientationListener.getInstance().stopSensorFromConfigActivity();
|
||||
}
|
||||
|
||||
public class InputFilterMinMax implements InputFilter
|
||||
{
|
||||
private float minimumValue;
|
||||
private float maximumValue;
|
||||
|
||||
public InputFilterMinMax(float minimumValue, float maximumValue)
|
||||
{
|
||||
this.minimumValue = minimumValue;
|
||||
this.maximumValue = maximumValue;
|
||||
}
|
||||
|
||||
private boolean isInRange(float a, float b, float c)
|
||||
{
|
||||
return b > a ? c >= a && c <= b : c >= b && c <= a;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend)
|
||||
{
|
||||
try
|
||||
{
|
||||
int input = Integer.parseInt(dest.subSequence(0, dstart).toString() + source + dest.subSequence(dend, dest.length()));
|
||||
if (isInRange(minimumValue, maximumValue, input))
|
||||
return null;
|
||||
}
|
||||
catch (NumberFormatException nfe)
|
||||
{
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
@ -31,6 +31,13 @@ import static com.jens.automation2.Trigger.triggerParameter2Split;
|
||||
|
||||
public class ActivityManageTriggerNotification extends Activity
|
||||
{
|
||||
public static final String intentNameNotificationApp = "app";
|
||||
public static final String intentNameNotificationTitleDir = "titleDir";
|
||||
public static final String intentNameNotificationTitle = "title";
|
||||
public static final String intentNameNotificationTextDir = "textDir";
|
||||
public static final String intentNameNotificationText = "text";
|
||||
public static final String intentNameNotificationDirection = "direction";
|
||||
|
||||
public static Trigger editedNotificationTrigger;
|
||||
boolean edit = false;
|
||||
ProgressDialog progressDialog = null;
|
||||
@ -323,12 +330,12 @@ public class ActivityManageTriggerNotification extends Activity
|
||||
else
|
||||
{
|
||||
Intent data = new Intent();
|
||||
data.putExtra("direction", chkNotificationDirection.isChecked());
|
||||
data.putExtra("app", app);
|
||||
data.putExtra("titleDir", titleDir);
|
||||
data.putExtra("title", title);
|
||||
data.putExtra("textDir", textDir);
|
||||
data.putExtra("text", text);
|
||||
data.putExtra(intentNameNotificationDirection, chkNotificationDirection.isChecked());
|
||||
data.putExtra(intentNameNotificationApp, app);
|
||||
data.putExtra(intentNameNotificationTitleDir, titleDir);
|
||||
data.putExtra(intentNameNotificationTitle, title);
|
||||
data.putExtra(intentNameNotificationTextDir, textDir);
|
||||
data.putExtra(intentNameNotificationText, text);
|
||||
ActivityManageTriggerNotification.this.setResult(RESULT_OK, data);
|
||||
}
|
||||
|
||||
@ -395,4 +402,4 @@ public class ActivityManageTriggerNotification extends Activity
|
||||
getActionStartActivityDialog1().show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ActivityManageTriggerProfile extends Activity
|
||||
{
|
||||
public static final String profileFieldName = "profileName";
|
||||
|
||||
boolean editMode = false;
|
||||
|
||||
Button bSaveTriggerProfile;
|
||||
Spinner spinnerProfiles;
|
||||
CheckBox chkProfileActive, chkProfileCheckSettings;
|
||||
|
||||
ArrayAdapter<Profile> profileSpinnerAdapter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_manage_trigger_profile);
|
||||
|
||||
bSaveTriggerProfile = (Button)findViewById(R.id.bSaveTriggerProfile);
|
||||
spinnerProfiles = (Spinner)findViewById(R.id.spinnerProfiles);
|
||||
chkProfileActive = (CheckBox)findViewById(R.id.chkProfileActive);
|
||||
chkProfileCheckSettings = (CheckBox)findViewById(R.id.chkProfileCheckSettings);
|
||||
|
||||
try
|
||||
{
|
||||
profileSpinnerAdapter = new ArrayAdapter<Profile>(this, R.layout.text_view_for_poi_listview_mediumtextsize, Profile.getProfileCollection());
|
||||
loadProfileItems();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("w", "ActivityManageTriggerProfile", Log.getStackTraceString(e), 1);
|
||||
}
|
||||
|
||||
if(getIntent().hasExtra(ActivityManageRule.intentNameTriggerParameter2))
|
||||
{
|
||||
editMode = true;
|
||||
|
||||
boolean active = getIntent().getBooleanExtra(ActivityManageRule.intentNameTriggerParameter1, true);
|
||||
chkProfileActive.setChecked(active);
|
||||
|
||||
try
|
||||
{
|
||||
String values[] = getIntent().getStringExtra(ActivityManageRule.intentNameTriggerParameter2).split(Trigger.triggerParameter2Split);
|
||||
if(values.length >= 2)
|
||||
{
|
||||
boolean checkSettings = Boolean.parseBoolean(values[0]);
|
||||
chkProfileCheckSettings.setChecked(checkSettings);
|
||||
|
||||
String profileName = values[0];
|
||||
|
||||
List<Profile> profileList = Profile.getProfileCollection();
|
||||
for(int i = 0; i < profileList.size(); i++)
|
||||
{
|
||||
if(profileList.get(i).getName().equals(profileName))
|
||||
{
|
||||
spinnerProfiles.setSelection(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Toast.makeText(ActivityManageTriggerProfile.this, getResources().getString(R.string.triggerWrong), Toast.LENGTH_SHORT).show();
|
||||
Miscellaneous.logEvent("e", "ActivityManageTriggerProfile", "There\'s something wrong with parameters. Content: " + getIntent().getStringExtra(ActivityManageRule.intentNameActionParameter2) + ", " + Log.getStackTraceString(e), 1);
|
||||
}
|
||||
}
|
||||
|
||||
bSaveTriggerProfile.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
Intent returnData = new Intent();
|
||||
returnData.putExtra(ActivityManageRule.intentNameTriggerParameter1, chkProfileActive.isChecked());
|
||||
returnData.putExtra(ActivityManageRule.intentNameTriggerParameter2,
|
||||
spinnerProfiles.getSelectedItem().toString() + Trigger.triggerParameter2Split +
|
||||
chkProfileCheckSettings.isChecked());
|
||||
|
||||
setResult(RESULT_OK, returnData);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void loadProfileItems()
|
||||
{
|
||||
try
|
||||
{
|
||||
if(spinnerProfiles.getAdapter() == null)
|
||||
spinnerProfiles.setAdapter(profileSpinnerAdapter);
|
||||
|
||||
profileSpinnerAdapter.notifyDataSetChanged();
|
||||
}
|
||||
catch(NullPointerException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
@ -6,11 +6,16 @@ import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.TimePicker;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
|
||||
@ -18,8 +23,9 @@ public class ActivityManageTriggerTimeFrame extends Activity
|
||||
{
|
||||
Button bSaveTimeFrame;
|
||||
TimePicker startPicker, stopPicker;
|
||||
CheckBox checkMonday, checkTuesday, checkWednesday, checkThursday, checkFriday, checkSaturday, checkSunday;
|
||||
CheckBox checkMonday, checkTuesday, checkWednesday, checkThursday, checkFriday, checkSaturday, checkSunday, chkRepeat;
|
||||
RadioButton radioTimeFrameEntering, radioTimeFrameLeaving;
|
||||
EditText etRepeatEvery;
|
||||
|
||||
public static Trigger editedTimeFrameTrigger = null;
|
||||
|
||||
@ -44,7 +50,9 @@ public class ActivityManageTriggerTimeFrame extends Activity
|
||||
checkSunday = (CheckBox)findViewById(R.id.checkSunday);
|
||||
radioTimeFrameEntering = (RadioButton)findViewById(R.id.radioTimeFrameEntering);
|
||||
radioTimeFrameLeaving = (RadioButton)findViewById(R.id.radioTimeFrameLeaving);
|
||||
|
||||
chkRepeat = (CheckBox)findViewById(R.id.chkRepeat);
|
||||
etRepeatEvery = (EditText)findViewById(R.id.etRepeatEvery);
|
||||
|
||||
bSaveTimeFrame.setOnClickListener(new OnClickListener()
|
||||
{
|
||||
@Override
|
||||
@ -92,11 +100,43 @@ public class ActivityManageTriggerTimeFrame extends Activity
|
||||
{
|
||||
Toast.makeText(getBaseContext(), getResources().getString(R.string.selectOneDay), Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
boolean goOn = false;
|
||||
if(chkRepeat.isChecked())
|
||||
{
|
||||
if(!StringUtils.isEmpty(etRepeatEvery.getText().toString()))
|
||||
{
|
||||
try
|
||||
{
|
||||
long value = Long.parseLong(etRepeatEvery.getText().toString());
|
||||
if(value > 0)
|
||||
{
|
||||
goOn = true;
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
goOn = true;
|
||||
|
||||
if(!goOn)
|
||||
{
|
||||
Toast.makeText(getBaseContext(), getResources().getString(R.string.enterRepetitionTime), Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
|
||||
if(editedTimeFrameTrigger.getTimeFrame() == null)
|
||||
{
|
||||
// add new one
|
||||
editedTimeFrameTrigger.setTimeFrame(new TimeFrame(startTime, stopTime, dayList));
|
||||
if(chkRepeat.isChecked())
|
||||
editedTimeFrameTrigger.setTimeFrame(new TimeFrame(startTime, stopTime, dayList, Long.parseLong(etRepeatEvery.getText().toString())));
|
||||
else
|
||||
editedTimeFrameTrigger.setTimeFrame(new TimeFrame(startTime, stopTime, dayList, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
// edit one
|
||||
@ -104,6 +144,11 @@ public class ActivityManageTriggerTimeFrame extends Activity
|
||||
editedTimeFrameTrigger.getTimeFrame().setTriggerTimeStop(stopTime);
|
||||
editedTimeFrameTrigger.getTimeFrame().getDayList().clear();
|
||||
editedTimeFrameTrigger.getTimeFrame().setDayList(dayList);
|
||||
|
||||
if(chkRepeat.isChecked())
|
||||
editedTimeFrameTrigger.getTimeFrame().setRepetition(Long.parseLong(etRepeatEvery.getText().toString()));
|
||||
else
|
||||
editedTimeFrameTrigger.getTimeFrame().setRepetition(0);
|
||||
}
|
||||
|
||||
editedTimeFrameTrigger.setTriggerParameter(radioTimeFrameEntering.isChecked());
|
||||
@ -112,6 +157,15 @@ public class ActivityManageTriggerTimeFrame extends Activity
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
chkRepeat.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener()
|
||||
{
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
|
||||
{
|
||||
etRepeatEvery.setEnabled(isChecked);
|
||||
}
|
||||
});
|
||||
|
||||
if(editedTimeFrameTrigger.getTimeFrame() != null)
|
||||
loadVariableIntoGui();
|
||||
@ -158,6 +212,12 @@ public class ActivityManageTriggerTimeFrame extends Activity
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(editedTimeFrameTrigger.getTimeFrame().getRepetition() > 0)
|
||||
{
|
||||
chkRepeat.setChecked(true);
|
||||
etRepeatEvery.setText(String.valueOf(editedTimeFrameTrigger.getTimeFrame().getRepetition()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,9 +7,12 @@ import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.wifi.ScanResult;
|
||||
import android.net.wifi.WifiConfiguration;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
@ -32,6 +35,9 @@ import java.util.List;
|
||||
|
||||
public class ActivityManageTriggerWifi extends Activity
|
||||
{
|
||||
public final static String intentNameWifiState = "wifiState";
|
||||
public final static String intentNameWifiName = "wifiName";
|
||||
|
||||
RadioButton rbTriggerWifiConnected, rbTriggerWifiDisconnected;
|
||||
EditText etTriggerWifiName;
|
||||
Spinner spinnerWifiList;
|
||||
@ -55,6 +61,7 @@ public class ActivityManageTriggerWifi extends Activity
|
||||
|
||||
wifiSpinnerAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, wifiList);
|
||||
spinnerWifiList.setAdapter(wifiSpinnerAdapter);
|
||||
spinnerWifiList.setEnabled(false); // bug in Android; this only works when done in code, not in xml
|
||||
|
||||
if (getIntent().hasExtra("edit"))
|
||||
{
|
||||
@ -128,12 +135,20 @@ public class ActivityManageTriggerWifi extends Activity
|
||||
|
||||
void reallyLoadWifiList()
|
||||
{
|
||||
WifiManager myWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
|
||||
if(Build.VERSION.SDK_INT >= 30)
|
||||
{
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.hint), getResources().getString(R.string.wifiApi30), ActivityManageTriggerWifi.this).show();
|
||||
loadListOfVisibleWifis();
|
||||
}
|
||||
else
|
||||
{
|
||||
WifiManager myWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
|
||||
|
||||
for (WifiConfiguration wifi : myWifiManager.getConfiguredNetworks())
|
||||
wifiList.add(wifi.SSID.replaceAll("\"+$", "").replaceAll("^\"+", ""));
|
||||
for (WifiConfiguration wifi : myWifiManager.getConfiguredNetworks())
|
||||
wifiList.add(wifi.SSID.replaceAll("\"+$", "").replaceAll("^\"+", ""));
|
||||
}
|
||||
|
||||
if(wifiList.size() > 0)
|
||||
if (wifiList.size() > 0)
|
||||
{
|
||||
spinnerWifiList.setEnabled(true);
|
||||
Collections.sort(wifiList);
|
||||
@ -147,6 +162,24 @@ public class ActivityManageTriggerWifi extends Activity
|
||||
wifiSpinnerAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
void loadListOfVisibleWifis()
|
||||
{
|
||||
List<ScanResult> results = null;
|
||||
|
||||
try
|
||||
{
|
||||
WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService(WIFI_SERVICE);
|
||||
results = wifiManager.getScanResults();
|
||||
|
||||
for (ScanResult wifi : results)
|
||||
wifiList.add(wifi.SSID.replaceAll("\"+$", "").replaceAll("^\"+", ""));
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "loadListOfVisibleWifis()", Log.getStackTraceString(e), 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)
|
||||
{
|
||||
|
@ -2,9 +2,12 @@ package com.jens.automation2;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
@ -12,6 +15,8 @@ import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.PowerManager;
|
||||
import android.provider.Settings;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@ -40,6 +45,8 @@ public class ActivityPermissions extends Activity
|
||||
private static final int requestCodeForPermissionsNotificationPolicy = 12044;
|
||||
private static final int requestCodeForPermissionsBackgroundLocation = 12045;
|
||||
private static final int requestCodeForPermissionsNotifications = 12046;
|
||||
private static final int requestCodeForPermissionsDeviceAdmin = 12047;
|
||||
private static final int requestCodeForPermissionsBatteryOptimization = 12048;
|
||||
protected String[] specificPermissionsToRequest = null;
|
||||
|
||||
public static String intentExtraName = "permissionsToBeRequested";
|
||||
@ -85,15 +92,6 @@ public class ActivityPermissions extends Activity
|
||||
}
|
||||
});
|
||||
|
||||
// bRequestPermissions.setOnClickListener(new View.OnClickListener()
|
||||
// {
|
||||
// @Override
|
||||
// public void onClick(View v)
|
||||
// {
|
||||
// finish();
|
||||
// }
|
||||
// });
|
||||
|
||||
bRequestPermissions.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
@ -102,9 +100,6 @@ public class ActivityPermissions extends Activity
|
||||
// Request the basic permissions, that are absolutely required.
|
||||
//getRequiredPermissions(true); // request permissions to access sd card access and "receive boot completed"
|
||||
|
||||
//fillPermissionMaps();
|
||||
|
||||
|
||||
if(specificPermissionsToRequest != null)
|
||||
requestSpecificPermission(specificPermissionsToRequest);
|
||||
else
|
||||
@ -123,7 +118,6 @@ public class ActivityPermissions extends Activity
|
||||
if(extras != null)
|
||||
{
|
||||
specificPermissionsToRequest = extras.getStringArray(ActivityPermissions.intentExtraName);;
|
||||
// requestSpecificPermission(permissionsToRequest);
|
||||
tvPermissionsExplanationLong.setText(R.string.permissionsExplanationSmall);
|
||||
tvPermissionsExplanation.setText("");
|
||||
fillExplanationText();
|
||||
@ -245,9 +239,9 @@ public class ActivityPermissions extends Activity
|
||||
if(
|
||||
s.equalsIgnoreCase(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
||
|
||||
s.equalsIgnoreCase(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
s.equalsIgnoreCase(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
||
|
||||
s.equalsIgnoreCase(Manifest.permission.ACCESS_COARSE_LOCATION)
|
||||
s.equalsIgnoreCase(Manifest.permission.ACCESS_COARSE_LOCATION)
|
||||
)
|
||||
{
|
||||
if (!Miscellaneous.googleToBlameForLocation(true))
|
||||
@ -289,6 +283,16 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
return verifyNotificationPermission();
|
||||
}
|
||||
else if (s.equals(Manifest.permission.BIND_DEVICE_ADMIN))
|
||||
{
|
||||
return haveDeviceAdmin();
|
||||
}
|
||||
else if (s.equals(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS))
|
||||
{
|
||||
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
String packageName = context.getApplicationContext().getPackageName();
|
||||
return pm.isIgnoringBatteryOptimizations(packageName);
|
||||
}
|
||||
else
|
||||
{
|
||||
int res = context.checkCallingOrSelfPermission(s);
|
||||
@ -299,6 +303,28 @@ public class ActivityPermissions extends Activity
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean haveDeviceAdmin()
|
||||
{
|
||||
DevicePolicyManager deviceManger = (DevicePolicyManager)Miscellaneous.getAnyContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
|
||||
ComponentName compName = new ComponentName(Miscellaneous.getAnyContext(), DeviceAdmin.class);
|
||||
boolean active = deviceManger.isAdminActive(compName);
|
||||
return active;
|
||||
}
|
||||
|
||||
public static void requestDeviceAdmin()
|
||||
{
|
||||
if(!haveDeviceAdmin())
|
||||
{
|
||||
// DevicePolicyManager deviceManger = (DevicePolicyManager)Miscellaneous.getAnyContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
|
||||
ComponentName compName = new ComponentName(ActivityPermissions.getInstance(), DeviceAdmin.class) ;
|
||||
|
||||
Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN );
|
||||
intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN , compName );
|
||||
intent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION , Miscellaneous.getAnyContext().getResources().getString(R.string.deviceAdminNote));
|
||||
ActivityPermissions.getInstance().startActivityForResult(intent, requestCodeForPermissionsDeviceAdmin);
|
||||
}
|
||||
}
|
||||
|
||||
public static String[] getRequiredPermissions(boolean onlyGeneral)
|
||||
{
|
||||
ArrayList<String> requiredPermissions = new ArrayList<String>();
|
||||
@ -315,20 +341,18 @@ public class ActivityPermissions extends Activity
|
||||
addToArrayListUnique("android.permission.RECEIVE_BOOT_COMPLETED", requiredPermissions);
|
||||
*/
|
||||
|
||||
// if (!havePermission(ActivityPermissions.writeExternalStoragePermissionName, workingContext))
|
||||
// addToArrayListUnique(ActivityPermissions.writeExternalStoragePermissionName, requiredPermissions);
|
||||
|
||||
if(!havePermission(Manifest.permission.WRITE_SETTINGS, workingContext))
|
||||
{
|
||||
for (Profile profile : Profile.getProfileCollection())
|
||||
{
|
||||
if (profile.changeIncomingCallsRingtone)
|
||||
{
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!havePermission(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, workingContext))
|
||||
addToArrayListUnique(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, requiredPermissions);
|
||||
|
||||
if (!onlyGeneral)
|
||||
{
|
||||
for (Rule rule : Rule.getRuleCollection())
|
||||
@ -340,9 +364,9 @@ public class ActivityPermissions extends Activity
|
||||
|
||||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
||
|
||||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
||
|
||||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_COARSE_LOCATION)
|
||||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_COARSE_LOCATION)
|
||||
)
|
||||
{
|
||||
if (!Miscellaneous.googleToBlameForLocation(true))
|
||||
@ -422,11 +446,11 @@ public class ActivityPermissions extends Activity
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case charging:
|
||||
addToArrayListUnique(Manifest.permission.READ_PHONE_STATE, requiredPermissions);
|
||||
// addToArrayListUnique(Manifest.permission.READ_PHONE_STATE, requiredPermissions);
|
||||
// addToArrayListUnique("android.permission.BATTERY_STATS", requiredPermissions);
|
||||
break;
|
||||
case headsetPlugged:
|
||||
addToArrayListUnique(Manifest.permission.READ_PHONE_STATE, requiredPermissions);
|
||||
// addToArrayListUnique(Manifest.permission.READ_PHONE_STATE, requiredPermissions);
|
||||
break;
|
||||
case nfcTag:
|
||||
addToArrayListUnique(Manifest.permission.NFC, requiredPermissions);
|
||||
@ -505,12 +529,13 @@ public class ActivityPermissions extends Activity
|
||||
break;
|
||||
case sendTextMessage:
|
||||
addToArrayListUnique(Manifest.permission.SEND_SMS, requiredPermissions);
|
||||
checkPermissionsInVariableUse(action.getParameter2(), requiredPermissions);
|
||||
checkPermissionsInVariableUse(action.getParameter2(), requiredPermissions);
|
||||
break;
|
||||
case setAirplaneMode:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
// https://stackoverflow.com/questions/32185628/connectivitymanager-requestnetwork-in-android-6-0
|
||||
// addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
/* Permission was not required anymore, even before Android 6: https://su.chainfire.eu/#updates-permission
|
||||
addToArrayListUnique(permissionNameSuperuser, requiredPermissions);*/
|
||||
break;
|
||||
@ -523,7 +548,8 @@ public class ActivityPermissions extends Activity
|
||||
case setDataConnection:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
// https://stackoverflow.com/questions/32185628/connectivitymanager-requestnetwork-in-android-6-0
|
||||
// addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.READ_PHONE_STATE, requiredPermissions);
|
||||
/* Permission was not required anymore, even before Android 6: https://su.chainfire.eu/#updates-permission
|
||||
addToArrayListUnique(permissionNameSuperuser, requiredPermissions);*/
|
||||
@ -533,16 +559,25 @@ public class ActivityPermissions extends Activity
|
||||
break;
|
||||
case setUsbTethering:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
// https://stackoverflow.com/questions/32185628/connectivitymanager-requestnetwork-in-android-6-0
|
||||
// addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case setBluetoothTethering:
|
||||
//addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.BLUETOOTH, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.BLUETOOTH_ADMIN, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
break;
|
||||
case setWifi:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
// https://stackoverflow.com/questions/32185628/connectivitymanager-requestnetwork-in-android-6-0
|
||||
// addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case setWifiTethering:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
// https://stackoverflow.com/questions/32185628/connectivitymanager-requestnetwork-in-android-6-0
|
||||
// addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
|
||||
/*
|
||||
@ -559,9 +594,9 @@ public class ActivityPermissions extends Activity
|
||||
if(
|
||||
action.getParameter2().contains(Actions.wireguard_tunnel_up)
|
||||
||
|
||||
action.getParameter2().contains(Actions.wireguard_tunnel_down)
|
||||
action.getParameter2().contains(Actions.wireguard_tunnel_down)
|
||||
||
|
||||
action.getParameter2().contains(Actions.wireguard_tunnel_refresh)
|
||||
action.getParameter2().contains(Actions.wireguard_tunnel_refresh)
|
||||
)
|
||||
addToArrayListUnique(ActivityPermissions.permissionNameWireguard, requiredPermissions);
|
||||
// if(
|
||||
@ -589,36 +624,36 @@ public class ActivityPermissions extends Activity
|
||||
break;
|
||||
case turnUsbTetheringOff:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case turnUsbTetheringOn:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case turnWifiOff:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case turnWifiOn:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case turnWifiTetheringOff:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case turnWifiTetheringOn:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case waitBeforeNextAction:
|
||||
break;
|
||||
case wakeupDevice:
|
||||
addToArrayListUnique(Manifest.permission.WAKE_LOCK, requiredPermissions);
|
||||
case playSound:
|
||||
addToArrayListUnique(Manifest.permission.READ_EXTERNAL_STORAGE, requiredPermissions);
|
||||
break;
|
||||
case turnScreenOnOrOff:
|
||||
if(action.getParameter1())
|
||||
addToArrayListUnique(Manifest.permission.WAKE_LOCK, requiredPermissions);
|
||||
else
|
||||
addToArrayListUnique(Manifest.permission.BIND_DEVICE_ADMIN, requiredPermissions);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -658,7 +693,7 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
for (Action action : rule.getActionSet())
|
||||
{
|
||||
if(action.equals(actionType))
|
||||
if(action.getAction().equals(actionType))
|
||||
addToArrayListUnique(rule.getName(), returnList);
|
||||
}
|
||||
}
|
||||
@ -685,26 +720,16 @@ public class ActivityPermissions extends Activity
|
||||
case Manifest.permission.BIND_NOTIFICATION_LISTENER_SERVICE:
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.notification))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
|
||||
break;
|
||||
case permissionNameGoogleActivityDetection:
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.activityDetection))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
|
||||
break;
|
||||
case Manifest.permission.ACTIVITY_RECOGNITION:
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.activityDetection))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
|
||||
break;
|
||||
case Manifest.permission.ACCESS_COARSE_LOCATION:
|
||||
// usingElements.add(getResources().getString(R.string.android_permission_ACCESS_COARSE_LOCATION));
|
||||
usingElements.add(getResources().getString(R.string.manageLocations));
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.pointOfInterest))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.speed))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
break;
|
||||
case Manifest.permission.ACCESS_FINE_LOCATION:
|
||||
usingElements.add(getResources().getString(R.string.manageLocations));
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.pointOfInterest))
|
||||
@ -761,14 +786,6 @@ public class ActivityPermissions extends Activity
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.wifiConnection))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
break;
|
||||
/*case "android.permission.BATTERY_STATS":
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.batteryLevel))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.charging))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.usb_host_connection))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
break;*/
|
||||
case Manifest.permission.BLUETOOTH_ADMIN:
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.bluetoothConnection))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
@ -832,6 +849,17 @@ public class ActivityPermissions extends Activity
|
||||
case Manifest.permission.FOREGROUND_SERVICE:
|
||||
usingElements.add(getResources().getString(R.string.startAutomationAsService));
|
||||
break;
|
||||
case Manifest.permission.READ_EXTERNAL_STORAGE:
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.playSound))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
break;
|
||||
case Manifest.permission.BIND_DEVICE_ADMIN:
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnScreenOnOrOff))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
break;
|
||||
case Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS:
|
||||
usingElements.add(getResources().getString(R.string.recommendedForBetterReliability));
|
||||
break;
|
||||
}
|
||||
|
||||
return usingElements;
|
||||
@ -859,13 +887,19 @@ public class ActivityPermissions extends Activity
|
||||
}
|
||||
}
|
||||
|
||||
if (requestCode == requestCodeForPermissionsDeviceAdmin)
|
||||
{
|
||||
NotificationManager mNotificationManager = (NotificationManager) ActivityPermissions.this.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
if (mNotificationManager.isNotificationPolicyAccessGranted())
|
||||
requestPermissions(cachedPermissionsToRequest, true);
|
||||
}
|
||||
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||
{
|
||||
if (requestCode == requestCodeForPermissionsBackgroundLocation)
|
||||
{
|
||||
NotificationManager mNotificationManager = (NotificationManager) ActivityPermissions.this.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
if (mNotificationManager.isNotificationPolicyAccessGranted())
|
||||
if (havePermission(Manifest.permission.ACCESS_BACKGROUND_LOCATION, ActivityPermissions.this))
|
||||
requestPermissions(cachedPermissionsToRequest, true);
|
||||
}
|
||||
}
|
||||
@ -873,6 +907,10 @@ public class ActivityPermissions extends Activity
|
||||
if (requestCode == requestCodeForPermissionsNotifications)
|
||||
if(havePermission(Manifest.permission.BIND_NOTIFICATION_LISTENER_SERVICE, ActivityPermissions.this))
|
||||
requestPermissions(cachedPermissionsToRequest, true);
|
||||
|
||||
if (requestCode == requestCodeForPermissionsBatteryOptimization)
|
||||
if(havePermission(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, ActivityPermissions.this))
|
||||
requestPermissions(cachedPermissionsToRequest, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -923,12 +961,18 @@ public class ActivityPermissions extends Activity
|
||||
startActivityForResult(intent, requestCodeForPermissionsWriteSettings);
|
||||
return;
|
||||
}
|
||||
if (s.equalsIgnoreCase(Manifest.permission.BIND_DEVICE_ADMIN))
|
||||
{
|
||||
requiredPermissions.remove(s);
|
||||
cachedPermissionsToRequest = requiredPermissions;
|
||||
requestDeviceAdmin();
|
||||
return;
|
||||
}
|
||||
else if (s.equalsIgnoreCase(Manifest.permission.ACCESS_NOTIFICATION_POLICY))
|
||||
{
|
||||
requiredPermissions.remove(s);
|
||||
cachedPermissionsToRequest = requiredPermissions;
|
||||
Intent intent = new Intent(android.provider.Settings.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS);
|
||||
// intent.setData(Uri.parse("package:" + getPackageName()));
|
||||
startActivityForResult(intent, requestCodeForPermissionsNotificationPolicy);
|
||||
return;
|
||||
}
|
||||
@ -936,19 +980,39 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
requiredPermissions.remove(s);
|
||||
cachedPermissionsToRequest = requiredPermissions;
|
||||
Intent intent = new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS");
|
||||
Intent intent = new Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS);
|
||||
startActivityForResult(intent, requestCodeForPermissionsNotifications);
|
||||
return;
|
||||
}
|
||||
// else if (s.equalsIgnoreCase(permissionNameLocationBackground) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||
// {
|
||||
// requiredPermissions.remove(s);
|
||||
// cachedPermissionsToRequest = requiredPermissions;
|
||||
// Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
// intent.setData(Uri.parse("package:" + getPackageName()));
|
||||
// startActivityForResult(intent, requestCodeForPermissionsBackgroundLocation);
|
||||
// return;
|
||||
// }
|
||||
else if(s.equals(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS))
|
||||
{
|
||||
requiredPermissions.remove(s);
|
||||
cachedPermissionsToRequest = requiredPermissions;
|
||||
String packageName = getApplicationContext().getPackageName();
|
||||
Intent intent = new Intent(android.provider.Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
|
||||
intent.setData(Uri.parse("package:" + packageName));
|
||||
startActivityForResult(intent, requestCodeForPermissionsBatteryOptimization);
|
||||
return;
|
||||
}
|
||||
else if (s.equalsIgnoreCase(Manifest.permission.ACCESS_BACKGROUND_LOCATION) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||
{
|
||||
AlertDialog dialog = Miscellaneous.messageBox(getResources().getString(R.string.readLocation), getResources().getString(R.string.pleaseGiveBgLocation), ActivityPermissions.this);
|
||||
dialog.setOnDismissListener(new DialogInterface.OnDismissListener()
|
||||
{
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog)
|
||||
{
|
||||
requiredPermissions.remove(s);
|
||||
cachedPermissionsToRequest = requiredPermissions;
|
||||
Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
intent.setData(Uri.parse("package:" + getPackageName()));
|
||||
startActivityForResult(intent, requestCodeForPermissionsBackgroundLocation);
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -958,7 +1022,7 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
if(!ActivityPermissions.isPermissionDeclaratedInManifest(Miscellaneous.getAnyContext(), Manifest.permission.SEND_SMS)
|
||||
&&
|
||||
Miscellaneous.isGooglePlayInstalled(Miscellaneous.getAnyContext())
|
||||
Miscellaneous.isGooglePlayInstalled(Miscellaneous.getAnyContext())
|
||||
)
|
||||
{
|
||||
requiredPermissions.remove(Manifest.permission.PROCESS_OUTGOING_CALLS);
|
||||
@ -968,8 +1032,6 @@ public class ActivityPermissions extends Activity
|
||||
if(requiredPermissions.contains(Manifest.permission.SEND_SMS))
|
||||
{
|
||||
if(!ActivityPermissions.isPermissionDeclaratedInManifest(Miscellaneous.getAnyContext(), Manifest.permission.SEND_SMS)
|
||||
&&
|
||||
Miscellaneous.isGooglePlayInstalled(Miscellaneous.getAnyContext())
|
||||
)
|
||||
{
|
||||
requiredPermissions.remove(Manifest.permission.SEND_SMS);
|
||||
@ -986,8 +1048,8 @@ public class ActivityPermissions extends Activity
|
||||
|
||||
Miscellaneous.logEvent("i", "Permissions", "Requesting permissions: " + permissions, 2);
|
||||
|
||||
// Toast.makeText(ActivityPermissions.this, "Requesting permissions. Amount: " + String.valueOf(requiredPermissions.size()), Toast.LENGTH_LONG).show();
|
||||
requestPermissions(requiredPermissions.toArray(new String[requiredPermissions.size()]), requestCodeForPermissions);
|
||||
if(requiredPermissions.size() > 0)
|
||||
requestPermissions(requiredPermissions.toArray(new String[requiredPermissions.size()]), requestCodeForPermissions);
|
||||
}
|
||||
else
|
||||
setHaveAllPermissions();
|
||||
@ -1005,17 +1067,11 @@ public class ActivityPermissions extends Activity
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "onRequestPermissionsResult()", "onRequestPermissionsResult()", 3);
|
||||
// Toast.makeText(ActivityPermissions.this, "onRequestPermissionsResult()", Toast.LENGTH_LONG).show();
|
||||
|
||||
// ArrayList<String> disabledFeatures = new ArrayList<String>();
|
||||
ArrayList<String> deniedPermissions = new ArrayList<String>();
|
||||
|
||||
if (requestCode == requestCodeForPermissions)
|
||||
{
|
||||
/*ArrayList<String> affectedGeneralList = new ArrayList<String>();
|
||||
ArrayList<String> affectedTriggersList = new ArrayList<String>();
|
||||
ArrayList<String> affectedActionList = new ArrayList<String>();*/
|
||||
|
||||
for (int i=0; i < grantResults.length; i++)
|
||||
{
|
||||
if(permissions[i].equalsIgnoreCase(Manifest.permission.WRITE_EXTERNAL_STORAGE) && grantResults[i] == PackageManager.PERMISSION_GRANTED)
|
||||
@ -1075,8 +1131,8 @@ public class ActivityPermissions extends Activity
|
||||
if(deniedPermissions.size() > 0)
|
||||
{
|
||||
/*
|
||||
The user denied certain permissions. With the exception of write-storage we need to live with that
|
||||
and simply disable features while keeping the notification alive. The user may dismiss it anyway.
|
||||
The user denied certain permissions. We need to live with that and simply disable
|
||||
features while keeping the notification alive. The user may dismiss it anyway.
|
||||
*/
|
||||
|
||||
Miscellaneous.logEvent("w", "Denied permissions", getResources().getString(R.string.theFollowingPermissionsHaveBeenDenied) + Miscellaneous.explode(", ", deniedPermissions), 3);
|
||||
@ -1155,10 +1211,6 @@ public class ActivityPermissions extends Activity
|
||||
private void setHaveAllPermissions()
|
||||
{
|
||||
setResult(RESULT_OK);
|
||||
// All permissions have been granted.
|
||||
NotificationManager mNotificationManager = (NotificationManager) Miscellaneous.getAnyContext().getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
mNotificationManager.cancel(notificationIdPermissions);
|
||||
ActivityMainScreen.updateMainScreen();
|
||||
|
||||
try
|
||||
{
|
||||
@ -1169,6 +1221,14 @@ public class ActivityPermissions extends Activity
|
||||
// Activity may not have been loaded, yet.
|
||||
}
|
||||
|
||||
// All permissions have been granted.
|
||||
NotificationManager mNotificationManager = (NotificationManager) Miscellaneous.getAnyContext().getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
mNotificationManager.cancel(notificationIdPermissions);
|
||||
if(AutomationService.getInstance() != null)
|
||||
AutomationService.getInstance().cancelNotification();
|
||||
|
||||
ActivityMainScreen.updateMainScreen();
|
||||
|
||||
this.finish();
|
||||
}
|
||||
|
||||
@ -1297,10 +1357,7 @@ public class ActivityPermissions extends Activity
|
||||
mapActionPermissions.put("setWifiTethering", Manifest.permission.WRITE_SETTINGS);
|
||||
mapActionPermissions.put("setWifiTethering", Manifest.permission.CHANGE_NETWORK_STATE);
|
||||
mapActionPermissions.put("setWifiTethering", Manifest.permission.ACCESS_NETWORK_STATE);
|
||||
// mapActionPermissions.put("speakText", Manifest.permission.ACCESS_NOTIFICATION_POLICY);
|
||||
// mapActionPermissions.put("startOtherActivity", "");
|
||||
mapActionPermissions.put("triggerUrl", Manifest.permission.INTERNET);
|
||||
// Hier müßte ein Hinweis kommen, daß nur die Variablen verwendet werden können, für die es Rechte gibt.
|
||||
mapActionPermissions.put("turnBluetoothOff", Manifest.permission.BLUETOOTH_ADMIN);
|
||||
mapActionPermissions.put("turnBluetoothOff", Manifest.permission.BLUETOOTH);
|
||||
mapActionPermissions.put("turnBluetoothOff", Manifest.permission.ACCESS_NETWORK_STATE);
|
||||
@ -1325,213 +1382,11 @@ public class ActivityPermissions extends Activity
|
||||
mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.WRITE_SETTINGS);
|
||||
mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.CHANGE_NETWORK_STATE);
|
||||
mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.ACCESS_NETWORK_STATE);
|
||||
mapActionPermissions.put("playSound", Manifest.permission.READ_EXTERNAL_STORAGE);
|
||||
// mapActionPermissions.put("waitBeforeNextAction", "");
|
||||
mapActionPermissions.put("wakeupDevice", Manifest.permission.WAKE_LOCK);
|
||||
}
|
||||
|
||||
/*
|
||||
<string name="android.permission.SEND_SMS"></string>
|
||||
<string name="android.permission.SEND_SMS_NO_CONFIRMATION"></string>
|
||||
<string name="android.permission.RECEIVE_SMS"></string>
|
||||
<string name="android.permission.RECEIVE_MMS"></string>
|
||||
<string name="android.permission.RECEIVE_EMERGENCY_BROADCAST"></string>
|
||||
<string name="android.permission.READ_CELL_BROADCASTS"></string>
|
||||
<string name="android.permission.READ_SMS"></string>
|
||||
<string name="android.permission.WRITE_SMS"></string>
|
||||
<string name="android.permission.RECEIVE_WAP_PUSH"></string>
|
||||
<string name="android.permission.READ_CONTACTS"></string>
|
||||
<string name="android.permission.WRITE_CONTACTS"></string>
|
||||
<string name="android.permission.BIND_DIRECTORY_SEARCH"></string>
|
||||
<string name="android.permission.READ_CALL_LOG"></string>
|
||||
<string name="android.permission.WRITE_CALL_LOG"></string>
|
||||
<string name="android.permission.READ_SOCIAL_STREAM"></string>
|
||||
<string name="android.permission.WRITE_SOCIAL_STREAM"></string>
|
||||
<string name="android.permission.READ_PROFILE"></string>
|
||||
<string name="android.permission.WRITE_PROFILE"></string>
|
||||
<string name="android.permission.READ_CALENDAR"></string>
|
||||
<string name="android.permission.WRITE_CALENDAR"></string>
|
||||
<string name="android.permission.READ_USER_DICTIONARY"></string>
|
||||
<string name="android.permission.WRITE_USER_DICTIONARY"></string>
|
||||
<string name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"></string>
|
||||
<string name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"></string>
|
||||
<string name="com.android.alarm.permission.SET_ALARM"></string>
|
||||
<string name="com.android.voicemail.permission.ADD_VOICEMAIL"></string>
|
||||
<string name="android.permission.ACCESS_FINE_LOCATION"></string>
|
||||
<string name="android.permission.ACCESS_COARSE_LOCATION"></string>
|
||||
<string name="android.permission.ACCESS_MOCK_LOCATION"></string>
|
||||
<string name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"></string>
|
||||
<string name="android.permission.INSTALL_LOCATION_PROVIDER"></string>
|
||||
<string name="android.permission.INTERNET"></string>
|
||||
<string name="android.permission.ACCESS_NETWORK_STATE"></string>
|
||||
<string name="android.permission.ACCESS_WIFI_STATE"></string>
|
||||
<string name="android.permission.CHANGE_WIFI_STATE"></string>
|
||||
<string name="android.permission.ACCESS_WIMAX_STATE"></string>
|
||||
<string name="android.permission.CHANGE_WIMAX_STATE"></string>
|
||||
<string name="android.permission.BLUETOOTH"></string>
|
||||
<string name="android.permission.BLUETOOTH_ADMIN"></string>
|
||||
<string name="android.permission.BLUETOOTH_STACK"></string>
|
||||
<string name="android.permission.NFC"></string>
|
||||
<string name="android.permission.CONNECTIVITY_INTERNAL"></string>
|
||||
<string name="android.permission.RECEIVE_DATA_ACTIVITY_CHANGE"></string>
|
||||
<string name="android.permission.GET_ACCOUNTS"></string>
|
||||
<string name="android.permission.AUTHENTICATE_ACCOUNTS"></string>
|
||||
<string name="android.permission.USE_CREDENTIALS"></string>
|
||||
<string name="android.permission.MANAGE_ACCOUNTS"></string>
|
||||
<string name="android.permission.ACCOUNT_MANAGER"></string>
|
||||
<string name="android.permission.CHANGE_WIFI_MULTICAST_STATE"></string>
|
||||
<string name="android.permission.VIBRATE"></string>
|
||||
<string name="android.permission.FLASHLIGHT"></string>
|
||||
<string name="android.permission.WAKE_LOCK"></string>
|
||||
<string name="android.permission.MODIFY_AUDIO_SETTINGS"></string>
|
||||
<string name="android.permission.MANAGE_USB"></string>
|
||||
<string name="android.permission.ACCESS_MTP"></string>
|
||||
<string name="android.permission.HARDWARE_TEST"></string>
|
||||
<string name="android.permission.NET_ADMIN"></string>
|
||||
<string name="android.permission.REMOTE_AUDIO_PLAYBACK"></string>
|
||||
<string name="android.permission.RECORD_AUDIO"></string>
|
||||
<string name="android.permission.CAMERA"></string>
|
||||
<string name="android.permission.PROCESS_OUTGOING_CALLS"></string>
|
||||
<string name="android.permission.MODIFY_PHONE_STATE"></string>
|
||||
<string name="android.permission.READ_PHONE_STATE"></string>
|
||||
<string name="android.permission.READ_PRIVILEGED_PHONE_STATE"></string>
|
||||
<string name="android.permission.CALL_PHONE"></string>
|
||||
<string name="android.permission.USE_SIP"></string>
|
||||
<string name="android.permission.READ_EXTERNAL_STORAGE"></string>
|
||||
<string name="android.permission.WRITE_EXTERNAL_STORAGE"></string>
|
||||
<string name="android.permission.WRITE_MEDIA_STORAGE"></string>
|
||||
<string name="android.permission.DISABLE_KEYGUARD"></string>
|
||||
<string name="android.permission.GET_TASKS"></string>
|
||||
<string name="android.permission.INTERACT_ACROSS_USERS"></string>
|
||||
<string name="android.permission.INTERACT_ACROSS_USERS_FULL"></string>
|
||||
<string name="android.permission.MANAGE_USERS"></string>
|
||||
<string name="android.permission.GET_DETAILED_TASKS"></string>
|
||||
<string name="android.permission.REORDER_TASKS"></string>
|
||||
<string name="android.permission.REMOVE_TASKS"></string>
|
||||
<string name="android.permission.START_ANY_ACTIVITY"></string>
|
||||
<string name="android.permission.RESTART_PACKAGES"></string>
|
||||
<string name="android.permission.KILL_BACKGROUND_PROCESSES"></string>
|
||||
<string name="android.permission.SYSTEM_ALERT_WINDOW"></string>
|
||||
<string name="android.permission.SET_WALLPAPER"></string>
|
||||
<string name="android.permission.SET_WALLPAPER_HINTS"></string>
|
||||
<string name="android.permission.SET_TIME"></string>
|
||||
<string name="android.permission.SET_TIME_ZONE"></string>
|
||||
<string name="android.permission.EXPAND_STATUS_BAR"></string>
|
||||
<string name="android.permission.READ_SYNC_SETTINGS"></string>
|
||||
<string name="android.permission.WRITE_SYNC_SETTINGS"></string>
|
||||
<string name="android.permission.READ_SYNC_STATS"></string>
|
||||
<string name="android.permission.SET_SCREEN_COMPATIBILITY"></string>
|
||||
<string name="android.permission.ACCESS_ALL_EXTERNAL_STORAGE"></string>
|
||||
<string name="android.permission.CHANGE_CONFIGURATION"></string>
|
||||
<string name="android.permission.WRITE_SETTINGS"></string>
|
||||
<string name="android.permission.WRITE_GSERVICES"></string>
|
||||
<string name="android.permission.SET_SCREEN_COMPATIBILITY"></string>
|
||||
<string name="android.permission.CHANGE_CONFIGURATION"></string>
|
||||
<string name="android.permission.FORCE_STOP_PACKAGES"></string>
|
||||
<string name="android.permission.RETRIEVE_WINDOW_CONTENT"></string>
|
||||
<string name="android.permission.SET_ANIMATION_SCALE"></string>
|
||||
<string name="android.permission.PERSISTENT_ACTIVITY"></string>
|
||||
<string name="android.permission.GET_PACKAGE_SIZE"></string>
|
||||
<string name="android.permission.SET_PREFERRED_APPLICATIONS"></string>
|
||||
<string name="android.permission.RECEIVE_BOOT_COMPLETED"></string>
|
||||
<string name="android.permission.BROADCAST_STICKY"></string>
|
||||
<string name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"></string>
|
||||
<string name="android.permission.MOUNT_FORMAT_FILESYSTEMS"></string>
|
||||
<string name="android.permission.ASEC_ACCESS"></string>
|
||||
<string name="android.permission.ASEC_CREATE"></string>
|
||||
<string name="android.permission.ASEC_DESTROY"></string>
|
||||
<string name="android.permission.ASEC_MOUNT_UNMOUNT"></string>
|
||||
<string name="android.permission.ASEC_RENAME"></string>
|
||||
<string name="android.permission.WRITE_APN_SETTINGS"></string>
|
||||
<string name="android.permission.SUBSCRIBED_FEEDS_READ"></string>
|
||||
<string name="android.permission.SUBSCRIBED_FEEDS_WRITE"></string>
|
||||
<string name="android.permission.CHANGE_NETWORK_STATE"></string>
|
||||
<string name="android.permission.CLEAR_APP_CACHE"></string>
|
||||
<string name="android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK"></string>
|
||||
<string name="android.permission.WRITE_SECURE_SETTINGS"></string>
|
||||
<string name="android.permission.DUMP"></string>
|
||||
<string name="android.permission.READ_LOGS"></string>
|
||||
<string name="android.permission.SET_DEBUG_APP"></string>
|
||||
<string name="android.permission.SET_PROCESS_LIMIT"></string>
|
||||
<string name="android.permission.SET_ALWAYS_FINISH"></string>
|
||||
<string name="android.permission.SIGNAL_PERSISTENT_PROCESSES"></string>
|
||||
<string name="android.permission.DIAGNOSTIC"></string>
|
||||
<string name="android.permission.STATUS_BAR"></string>
|
||||
<string name="android.permission.STATUS_BAR_SERVICE"></string>
|
||||
<string name="android.permission.FORCE_BACK"></string>
|
||||
<string name="android.permission.UPDATE_DEVICE_STATS"></string>
|
||||
<string name="android.permission.INTERNAL_SYSTEM_WINDOW"></string>
|
||||
<string name="android.permission.MANAGE_APP_TOKENS"></string>
|
||||
<string name="android.permission.FREEZE_SCREEN"></string>
|
||||
<string name="android.permission.INJECT_EVENTS"></string>
|
||||
<string name="android.permission.FILTER_EVENTS"></string>
|
||||
<string name="android.permission.RETRIEVE_WINDOW_INFO"></string>
|
||||
<string name="android.permission.TEMPORARY_ENABLE_ACCESSIBILITY"></string>
|
||||
<string name="android.permission.MAGNIFY_DISPLAY"></string>
|
||||
<string name="android.permission.SET_ACTIVITY_WATCHER"></string>
|
||||
<string name="android.permission.SHUTDOWN"></string>
|
||||
<string name="android.permission.STOP_APP_SWITCHES"></string>
|
||||
<string name="android.permission.READ_INPUT_STATE"></string>
|
||||
<string name="android.permission.BIND_INPUT_METHOD"></string>
|
||||
<string name="android.permission.BIND_ACCESSIBILITY_SERVICE"></string>
|
||||
<string name="android.permission.BIND_TEXT_SERVICE"></string>
|
||||
<string name="android.permission.BIND_VPN_SERVICE"></string>
|
||||
<string name="android.permission.BIND_WALLPAPER"></string>
|
||||
<string name="android.permission.BIND_DEVICE_ADMIN"></string>
|
||||
<string name="android.permission.SET_ORIENTATION"></string>
|
||||
<string name="android.permission.SET_POINTER_SPEED"></string>
|
||||
<string name="android.permission.SET_KEYBOARD_LAYOUT"></string>
|
||||
<string name="android.permission.INSTALL_PACKAGES"></string>
|
||||
<string name="android.permission.CLEAR_APP_USER_DATA"></string>
|
||||
<string name="android.permission.DELETE_CACHE_FILES"></string>
|
||||
<string name="android.permission.DELETE_PACKAGES"></string>
|
||||
<string name="android.permission.MOVE_PACKAGE"></string>
|
||||
<string name="android.permission.CHANGE_COMPONENT_ENABLED_STATE"></string>
|
||||
<string name="android.permission.GRANT_REVOKE_PERMISSIONS"></string>
|
||||
<string name="android.permission.ACCESS_SURFACE_FLINGER"></string>
|
||||
<string name="android.permission.READ_FRAME_BUFFER"></string>
|
||||
<string name="android.permission.CONFIGURE_WIFI_DISPLAY"></string>
|
||||
<string name="android.permission.CONTROL_WIFI_DISPLAY"></string>
|
||||
<string name="android.permission.BRICK"></string>
|
||||
<string name="android.permission.REBOOT"></string>
|
||||
<string name="android.permission.DEVICE_POWER"></string>
|
||||
<string name="android.permission.NET_TUNNELING"></string>
|
||||
<string name="android.permission.FACTORY_TEST"></string>
|
||||
<string name="android.permission.BROADCAST_PACKAGE_REMOVED"></string>
|
||||
<string name="android.permission.BROADCAST_SMS"></string>
|
||||
<string name="android.permission.BROADCAST_WAP_PUSH"></string>
|
||||
<string name="android.permission.MASTER_CLEAR"></string>
|
||||
<string name="android.permission.CALL_PRIVILEGED"></string>
|
||||
<string name="android.permission.PERFORM_CDMA_PROVISIONING"></string>
|
||||
<string name="android.permission.CONTROL_LOCATION_UPDATES"></string>
|
||||
<string name="android.permission.ACCESS_CHECKIN_PROPERTIES"></string>
|
||||
<string name="android.permission.PACKAGE_USAGE_STATS"></string>
|
||||
<string name="android.permission.BATTERY_STATS"></string>
|
||||
<string name="android.permission.BACKUP"></string>
|
||||
<string name="android.permission.CONFIRM_FULL_BACKUP"></string>
|
||||
<string name="android.permission.BIND_REMOTEVIEWS"></string>
|
||||
<string name="android.permission.BIND_APPWIDGET"></string>
|
||||
<string name="android.permission.BIND_KEYGUARD_APPWIDGET"></string>
|
||||
<string name="android.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS"></string>
|
||||
<string name="android.permission.CHANGE_BACKGROUND_DATA_SETTING"></string>
|
||||
<string name="android.permission.GLOBAL_SEARCH"></string>
|
||||
<string name="android.permission.GLOBAL_SEARCH_CONTROL"></string>
|
||||
<string name="android.permission.SET_WALLPAPER_COMPONENT"></string>
|
||||
<string name="android.permission.READ_DREAM_STATE"></string>
|
||||
<string name="android.permission.WRITE_DREAM_STATE"></string>
|
||||
<string name="android.permission.ACCESS_CACHE_FILESYSTEM"></string>
|
||||
<string name="android.permission.COPY_PROTECTED_DATA"></string>
|
||||
<string name="android.permission.CRYPT_KEEPER"></string>
|
||||
<string name="android.permission.READ_NETWORK_USAGE_HISTORY"></string>
|
||||
<string name="android.permission.MANAGE_NETWORK_POLICY"></string>
|
||||
<string name="android.permission.MODIFY_NETWORK_ACCOUNTING"></string>
|
||||
<string name="android.intent.category.MASTER_CLEAR.permission.C2D_MESSAGE"></string>
|
||||
<string name="android.permission.PACKAGE_VERIFICATION_AGENT"></string>
|
||||
<string name="android.permission.BIND_PACKAGE_VERIFIER"></string>
|
||||
<string name="android.permission.SERIAL_PORT"></string>
|
||||
<string name="android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY"></string>
|
||||
<string name="android.permission.UPDATE_LOCK"></string>
|
||||
*/
|
||||
|
||||
public static boolean isPermissionDeclaratedInManifest(Context context, String permission)
|
||||
{
|
||||
PackageManager pm = context.getPackageManager();
|
||||
@ -1550,12 +1405,11 @@ public class ActivityPermissions extends Activity
|
||||
ArrayList<String> requestedPermissionsArrayList = new ArrayList<String>();
|
||||
requestedPermissionsArrayList.addAll(requestedPermissionsList);
|
||||
return (requestedPermissionsArrayList.contains(permission));
|
||||
// Log.i(ExConsts.TAG, ""+requestedPermissionsArrayList);
|
||||
}
|
||||
}
|
||||
catch (PackageManager.NameNotFoundException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
Miscellaneous.logEvent("w", "ActivityPermissions", Log.getStackTraceString(e), 2);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.preference.CheckBoxPreference;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.PreferenceActivity;
|
||||
|
||||
@ -9,11 +10,18 @@ import com.jens.automation2.R.layout;
|
||||
public class ActivitySettings extends PreferenceActivity
|
||||
{
|
||||
ListPreference lpStartScreenOptionsValues;
|
||||
CheckBoxPreference chkPrefUpdateCheck;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(layout.settings);
|
||||
addPreferencesFromResource(layout.activity_settings);
|
||||
|
||||
if(BuildConfig.FLAVOR.equals("apkFlavor"))
|
||||
{
|
||||
chkPrefUpdateCheck = (CheckBoxPreference) findPreference("automaticUpdateCheck");
|
||||
chkPrefUpdateCheck.setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,14 +30,14 @@ public class ActivityVolumeTest extends Activity
|
||||
instance = this;
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_volume_test);
|
||||
setContentView(R.layout.activity_volume_calibration);
|
||||
|
||||
tvCurrentVolume = (TextView)findViewById(R.id.tvCurrentVolume);
|
||||
etReferenceValue = (EditText)findViewById(R.id.etReferenceValue);
|
||||
sbReferenceValue = (SeekBar)findViewById(R.id.sbReferenceValue);
|
||||
tvVolumeTestExplanation = (TextView)findViewById(R.id.tvVolumeTestExplanation);
|
||||
tvVolumeTestExplanation = (TextView)findViewById(R.id.tvVolumeCalibrationExplanation);
|
||||
|
||||
tvVolumeTestExplanation.setText(String.format(getResources().getString(R.string.volumeTesterExplanation), String.valueOf(volumeRefreshInterval)));
|
||||
tvVolumeTestExplanation.setText(String.format(getResources().getString(R.string.volumeCalibrationExplanation), String.valueOf(volumeRefreshInterval)));
|
||||
|
||||
etReferenceValue.setText(String.valueOf(Settings.referenceValueForNoiseLevelMeasurements));
|
||||
|
||||
|
65
app/src/main/java/com/jens/automation2/AsyncTasks.java
Normal file
65
app/src/main/java/com/jens/automation2/AsyncTasks.java
Normal file
@ -0,0 +1,65 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
|
||||
public class AsyncTasks
|
||||
{
|
||||
public static class AsyncTaskUpdateCheck extends AsyncTask<Context, Void, Boolean>
|
||||
{
|
||||
public static boolean checkRunning = false;
|
||||
|
||||
@Override
|
||||
protected Boolean doInBackground(Context... contexts)
|
||||
{
|
||||
if(checkRunning)
|
||||
return false;
|
||||
else
|
||||
checkRunning = true;
|
||||
|
||||
try
|
||||
{
|
||||
String result = Miscellaneous.downloadURL("https://server47.de/automation/?action=getLatestVersionCode", null, null).trim();
|
||||
int latestVersion = Integer.parseInt(result);
|
||||
|
||||
// At this point the update check itself has already been successful.
|
||||
|
||||
Settings.lastUpdateCheck = Calendar.getInstance().getTimeInMillis();
|
||||
Settings.writeSettings(contexts[0]);
|
||||
|
||||
if (latestVersion > BuildConfig.VERSION_CODE)
|
||||
{
|
||||
// There's a new update
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Error checking for update", Log.getStackTraceString(e), 3);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Boolean result)
|
||||
{
|
||||
try
|
||||
{
|
||||
ActivityMainScreen.getActivityMainScreenInstance().processUpdateCheckResult(result);
|
||||
}
|
||||
catch (NullPointerException e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "NewsDownload", "There was a problem displaying the update check result, probably ActivityMainScreen isn't currently shown: " + Log.getStackTraceString(e), 2);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "NewsDownload", "There was a problem displaying the update check result: " + Log.getStackTraceString(e), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -24,6 +24,7 @@ import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
|
||||
import com.jens.automation2.Trigger.Trigger_Enum;
|
||||
import com.jens.automation2.location.LocationProvider;
|
||||
@ -197,7 +198,8 @@ public class AutomationService extends Service implements OnInitListener
|
||||
|
||||
if (checkStartupRequirements(this, startAtBoot))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Service", this.getResources().getString(R.string.logServiceStarting), 1);
|
||||
Miscellaneous.logEvent("i", "Service", this.getResources().getString(R.string.logServiceStarting) + " VERSION_CODE: " + BuildConfig.VERSION_CODE + ", VERSION_NAME: " + BuildConfig.VERSION_NAME + ", flavor: " + BuildConfig.FLAVOR, 1);
|
||||
Miscellaneous.logEvent("i", "Service", ActivityMaintenance.getSystemInfo(), 1);
|
||||
|
||||
startUpRoutine();
|
||||
|
||||
@ -211,7 +213,7 @@ public class AutomationService extends Service implements OnInitListener
|
||||
ActivityMainScreen.updateMainScreen();
|
||||
|
||||
this.isRunning = true;
|
||||
Miscellaneous.logEvent("i", "Service", this.getResources().getString(R.string.serviceStarted) + " " + String.format(this.getResources().getString(R.string.version), BuildConfig.VERSION_NAME + "(Build " + BuildConfig.VERSION_CODE + ")"), 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);
|
||||
Toast.makeText(this, this.getResources().getString(R.string.serviceStarted), Toast.LENGTH_LONG).show();
|
||||
// ********** Test area **********
|
||||
// Miscellaneous.logEvent("i", "setNetworkType", "bin hier.", 3);
|
||||
@ -258,7 +260,8 @@ public class AutomationService extends Service implements OnInitListener
|
||||
case reloadSettings:
|
||||
Settings.readFromPersistentStorage(this);
|
||||
applySettingsAndRules();
|
||||
myLocationProvider.applySettingsAndRules();
|
||||
if(myLocationProvider != null)
|
||||
myLocationProvider.applySettingsAndRules();
|
||||
break;
|
||||
case updateNotification:
|
||||
this.updateNotification();
|
||||
@ -271,16 +274,7 @@ public class AutomationService extends Service implements OnInitListener
|
||||
|
||||
public void applySettingsAndRules()
|
||||
{
|
||||
if (Settings.useTextToSpeechOnNormal | Settings.useTextToSpeechOnSilent | Settings.useTextToSpeechOnVibrate)
|
||||
{
|
||||
if (ttsEngine == null)
|
||||
ttsEngine = new TextToSpeech(this, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ttsEngine != null)
|
||||
ttsEngine.shutdown();
|
||||
}
|
||||
checkForTtsEngine();
|
||||
|
||||
startLocationProvider();
|
||||
ReceiverCoordinator.startAllReceivers();
|
||||
@ -303,7 +297,7 @@ public class AutomationService extends Service implements OnInitListener
|
||||
|
||||
public void checkForTtsEngine()
|
||||
{
|
||||
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)
|
||||
ttsEngine = new TextToSpeech(this, this);
|
||||
@ -332,7 +326,7 @@ public class AutomationService extends Service implements OnInitListener
|
||||
|
||||
protected void startLocationProvider()
|
||||
{
|
||||
if(ActivityPermissions.havePermission("android.permission.ACCESS_COARSE_LOCATION", AutomationService.this))
|
||||
if(ActivityPermissions.havePermission(Manifest.permission.ACCESS_COARSE_LOCATION, AutomationService.this))
|
||||
myLocationProvider = new LocationProvider(this); //autostart with this (only) constructor
|
||||
}
|
||||
|
||||
@ -342,19 +336,22 @@ public class AutomationService extends Service implements OnInitListener
|
||||
{
|
||||
boolean displayNotification = false;
|
||||
|
||||
String rule = "";
|
||||
|
||||
outerLoop:
|
||||
for(Rule r : Rule.getRuleCollection())
|
||||
{
|
||||
if(r.isRuleActive())
|
||||
{
|
||||
if(!r.haveEnoughPermissions())
|
||||
// for (String permission : ActivityPermissions.getPermissionsForRule(r))
|
||||
{
|
||||
// if (!ActivityPermissions.havePermission(permission, AutomationService.this))
|
||||
{
|
||||
// r.setRuleActive(false);
|
||||
// r.change(AutomationService.this);
|
||||
if(!displayNotification)
|
||||
{
|
||||
displayNotification = true;
|
||||
rule = r.getName();
|
||||
break outerLoop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -362,18 +359,16 @@ public class AutomationService extends Service implements OnInitListener
|
||||
|
||||
if(displayNotification)
|
||||
{
|
||||
// Toast.makeText(Miscellaneous.getAnyContext(), "Require more permissions.", Toast.LENGTH_LONG).show();
|
||||
// Update notification or show new one that notifiies of the lack or permissions.
|
||||
|
||||
Intent intent = new Intent(AutomationService.this, ActivityPermissions.class);
|
||||
PendingIntent pi = PendingIntent.getActivity(AutomationService.this, 0, intent, 0);
|
||||
|
||||
Miscellaneous.logEvent("w", "Features disabled", "Features disabled because of rule " + rule, 5);
|
||||
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
|
||||
Miscellaneous.createDismissableNotificationWithDelay(1010, getResources().getString(R.string.featuresDisabled), ActivityPermissions.notificationIdPermissions, pi);
|
||||
else
|
||||
Miscellaneous.createDismissableNotification(getResources().getString(R.string.featuresDisabled), ActivityPermissions.notificationIdPermissions, pi);
|
||||
}
|
||||
// else
|
||||
// Toast.makeText(Miscellaneous.getAnyContext(), "Have all required permissions.", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -390,6 +385,9 @@ public class AutomationService extends Service implements OnInitListener
|
||||
Intent intent = new Intent(AutomationService.this, ActivityMainTabLayout.class);
|
||||
PendingIntent pi = PendingIntent.getActivity(AutomationService.this, 0, intent, 0);
|
||||
// Miscellaneous.createDismissableNotification(getResources().getString(R.string.settingsReferringToRestrictedFeatures), ActivityPermissions.notificationIdPermissions, pi);
|
||||
|
||||
Miscellaneous.logEvent("w", "Features disabled", "Background location disabled because Google to blame.", 5);
|
||||
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
|
||||
Miscellaneous.createDismissableNotificationWithDelay(3300, getResources().getString(R.string.featuresDisabled), notificationIdRestrictions, pi);
|
||||
else
|
||||
@ -398,6 +396,11 @@ public class AutomationService extends Service implements OnInitListener
|
||||
}
|
||||
}
|
||||
|
||||
public void cancelNotification()
|
||||
{
|
||||
NotificationManagerCompat.from(AutomationService.this).cancelAll();
|
||||
}
|
||||
|
||||
protected void checkForMissingBackgroundLocationPermission()
|
||||
{
|
||||
if(Miscellaneous.googleToBlameForLocation(true))
|
||||
@ -405,28 +408,13 @@ public class AutomationService extends Service implements OnInitListener
|
||||
Intent intent = new Intent(AutomationService.this, ActivityMainTabLayout.class);
|
||||
PendingIntent pi = PendingIntent.getActivity(AutomationService.this, 0, intent, 0);
|
||||
|
||||
Miscellaneous.logEvent("w", "Features disabled", "Background location disabled because Google to blame.", 5);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
|
||||
Miscellaneous.createDismissableNotificationWithDelay(2200, getResources().getString(R.string.featuresDisabled), notificationIdLocationRestriction, pi);
|
||||
else
|
||||
Miscellaneous.createDismissableNotification(getResources().getString(R.string.featuresDisabled), notificationIdLocationRestriction, pi);
|
||||
}
|
||||
|
||||
/*
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||
{
|
||||
if (BuildConfig.FLAVOR.equalsIgnoreCase("googlePlayFlavor"))
|
||||
{
|
||||
if (Rule.isAnyRuleUsing(Trigger_Enum.pointOfInterest))
|
||||
{
|
||||
Intent intent = new Intent(AutomationService.this, ActivityMainTabLayout.class);
|
||||
PendingIntent pi = PendingIntent.getActivity(AutomationService.this, 0, intent, 0);
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
|
||||
Miscellaneous.createDismissableNotificationWithDelay(2200, getResources().getString(R.string.featuresDisabled), notificationIdLocationRestriction, pi);
|
||||
else
|
||||
Miscellaneous.createDismissableNotification(getResources().getString(R.string.featuresDisabled), notificationIdLocationRestriction, pi);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public static void startAutomationService(Context context, boolean startAtBoot)
|
||||
@ -447,7 +435,6 @@ public class AutomationService extends Service implements OnInitListener
|
||||
private void stopRoutine()
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Service", "Stopping service...", 3);
|
||||
// Log.i("STOP", "Stopping");
|
||||
try
|
||||
{
|
||||
myLocationProvider.stopLocationService();
|
||||
@ -476,7 +463,6 @@ public class AutomationService extends Service implements OnInitListener
|
||||
builder.setWhen(System.currentTimeMillis());
|
||||
builder.setContentIntent(myPendingIntent);
|
||||
|
||||
// Notification defaultNotification = new Notification();
|
||||
Notification defaultNotification = builder.build();
|
||||
|
||||
defaultNotification.icon = R.drawable.ic_launcher;
|
||||
@ -494,31 +480,6 @@ public class AutomationService extends Service implements OnInitListener
|
||||
// defaultNotification.ledOffMS = 1500;
|
||||
|
||||
return builder;
|
||||
|
||||
/*NotificationManager mNotificationManager = (NotificationManager) AutomationService.getInstance().getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
NotificationCompat.Builder builder;
|
||||
builder = new NotificationCompat.Builder(AutomationService.getInstance());
|
||||
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||
builder.setCategory(Notification.CATEGORY_EVENT);
|
||||
|
||||
builder.setWhen(System.currentTimeMillis());
|
||||
|
||||
builder.setContentTitle("Automation");
|
||||
builder.setSmallIcon(R.drawable.ic_launcher);
|
||||
// builder.setContentText(textToDisplay);
|
||||
// builder.setSmallIcon(icon);
|
||||
// builder.setContentIntent(pendingIntent);
|
||||
// builder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||
{
|
||||
NotificationChannel channel = new NotificationChannel("notify_001", "Channel human readable title", NotificationManager.IMPORTANCE_DEFAULT);
|
||||
mNotificationManager.createNotificationChannel(channel);
|
||||
}
|
||||
|
||||
return builder;*/
|
||||
}
|
||||
|
||||
protected static NotificationCompat.Builder createDefaultNotificationBuilder()
|
||||
@ -568,76 +529,68 @@ public class AutomationService extends Service implements OnInitListener
|
||||
|
||||
if(instance != null)
|
||||
{
|
||||
// if(Settings.showIconWhenServiceIsRunning)
|
||||
// {
|
||||
Miscellaneous.logEvent("i", "Notification", "Request to update notification.", 4);
|
||||
|
||||
String bodyText="";
|
||||
String lastRuleString = "";
|
||||
|
||||
if(PointOfInterest.getPointOfInterestCollection() != null && PointOfInterest.getPointOfInterestCollection().size() > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
PointOfInterest activePoi = PointOfInterest.getActivePoi();
|
||||
if(activePoi == null)
|
||||
{
|
||||
PointOfInterest closestPoi = PointOfInterest.getClosestPOI(instance.getLocationProvider().getCurrentLocation());
|
||||
bodyText = AutomationService.getInstance().getResources().getString(R.string.activePoi) + ": " + AutomationService.getInstance().getResources().getString(R.string.none) + "\n" + AutomationService.getInstance().getResources().getString(R.string.closestPoi) + ": " + closestPoi.getName() + lastRuleString;
|
||||
}
|
||||
else
|
||||
{
|
||||
bodyText = AutomationService.getInstance().getResources().getString(R.string.activePoi) + ": " + activePoi.getName() + lastRuleString;
|
||||
}
|
||||
}
|
||||
catch(NullPointerException e)
|
||||
{
|
||||
if(
|
||||
Rule.isAnyRuleUsing(Trigger_Enum.pointOfInterest)
|
||||
&&
|
||||
ActivityPermissions.havePermission(Manifest.permission.ACCESS_COARSE_LOCATION, AutomationService.getInstance())
|
||||
&&
|
||||
ActivityPermissions.havePermission(Manifest.permission.ACCESS_FINE_LOCATION, AutomationService.getInstance())
|
||||
)
|
||||
bodyText = instance.getResources().getString(R.string.stillGettingPosition);
|
||||
else
|
||||
bodyText = instance.getResources().getString(R.string.locationEngineNotActive);
|
||||
}
|
||||
}
|
||||
|
||||
Miscellaneous.logEvent("i", "Notification", "Request to update notification.", 4);
|
||||
|
||||
String bodyText="";
|
||||
String lastRuleString = "";
|
||||
|
||||
if(PointOfInterest.getPointOfInterestCollection() != null && PointOfInterest.getPointOfInterestCollection().size() > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
lastRuleString = instance.getResources().getString(R.string.lastRule) + " " + Rule.getLastActivatedRule().getName() + " " + instance.getResources().getString(R.string.at) + " " + Rule.getLastActivatedRuleActivationTime().toLocaleString();
|
||||
PointOfInterest activePoi = PointOfInterest.getActivePoi();
|
||||
if(activePoi == null)
|
||||
{
|
||||
PointOfInterest closestPoi = PointOfInterest.getClosestPOI(instance.getLocationProvider().getCurrentLocation());
|
||||
bodyText = AutomationService.getInstance().getResources().getString(R.string.activePoi) + ": " + AutomationService.getInstance().getResources().getString(R.string.none) + "\n" + AutomationService.getInstance().getResources().getString(R.string.closestPoi) + ": " + closestPoi.getName() + lastRuleString;
|
||||
}
|
||||
else
|
||||
{
|
||||
bodyText = AutomationService.getInstance().getResources().getString(R.string.activePoi) + ": " + activePoi.getName() + lastRuleString;
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
catch(NullPointerException e)
|
||||
{
|
||||
lastRuleString = instance.getResources().getString(R.string.lastRule) + " n./a.";
|
||||
if(
|
||||
Rule.isAnyRuleUsing(Trigger_Enum.pointOfInterest)
|
||||
&&
|
||||
ActivityPermissions.havePermission(Manifest.permission.ACCESS_COARSE_LOCATION, AutomationService.getInstance())
|
||||
&&
|
||||
ActivityPermissions.havePermission(Manifest.permission.ACCESS_FINE_LOCATION, AutomationService.getInstance())
|
||||
)
|
||||
bodyText = instance.getResources().getString(R.string.stillGettingPosition);
|
||||
else
|
||||
bodyText = instance.getResources().getString(R.string.locationEngineNotActive);
|
||||
}
|
||||
}
|
||||
|
||||
String textToDisplay = bodyText + " " + lastRuleString;
|
||||
// if(Build.VERSION.SDK_INT < 11)
|
||||
// {
|
||||
// myNotification.setLatestEventInfo(instance, "Automation", textToDisplay, myPendingIntent);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
notificationBuilder.setContentText(textToDisplay);
|
||||
notificationBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
||||
try
|
||||
{
|
||||
lastRuleString = instance.getResources().getString(R.string.lastRule) + " " + Rule.getLastActivatedRule().getName() + " " + instance.getResources().getString(R.string.at) + " " + Rule.getLastActivatedRuleActivationTime().toLocaleString();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
lastRuleString = instance.getResources().getString(R.string.lastRule) + " n./a.";
|
||||
}
|
||||
|
||||
myNotification = notificationBuilder.build();
|
||||
myNotification.defaults = 0;
|
||||
// }
|
||||
String textToDisplay = bodyText + " " + lastRuleString;
|
||||
|
||||
if(notificationBuilder == null)
|
||||
notificationBuilder = createDefaultNotificationBuilder();
|
||||
|
||||
notificationBuilder.setContentText(textToDisplay);
|
||||
notificationBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
||||
|
||||
myNotification = notificationBuilder.build();
|
||||
myNotification.defaults = 0;
|
||||
|
||||
// NotificationManager notificationManager = (NotificationManager) instance.getSystemService(NOTIFICATION_SERVICE);
|
||||
// hide the notification after its selected
|
||||
// hide the notification after its selected
|
||||
// myNotification.flags |= Notification.FLAG_AUTO_CANCEL;
|
||||
myNotification.flags |= Notification.FLAG_NO_CLEAR;
|
||||
myNotification.flags |= Notification.FLAG_NO_CLEAR;
|
||||
// notificationManager.notify(notificationId, myNotification);
|
||||
|
||||
instance.startForeground(notificationId, myNotification);
|
||||
// }
|
||||
// else
|
||||
// instance.startForeground(notificationId, null); // do not show icon in task bar
|
||||
instance.startForeground(notificationId, myNotification);
|
||||
}
|
||||
}
|
||||
|
||||
@ -661,18 +614,18 @@ public class AutomationService extends Service implements OnInitListener
|
||||
**/
|
||||
public void speak(String text, boolean force)
|
||||
{
|
||||
if(text.length() > 0 && (force | Settings.useTextToSpeechOnNormal | Settings.useTextToSpeechOnSilent | Settings.useTextToSpeechOnVibrate))
|
||||
if(text.length() > 0 && (force || Settings.useTextToSpeechOnNormal || Settings.useTextToSpeechOnSilent || Settings.useTextToSpeechOnVibrate))
|
||||
{
|
||||
AudioManager myAudioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
|
||||
int mode = myAudioManager.getRingerMode();
|
||||
|
||||
if(
|
||||
(mode == AudioManager.RINGER_MODE_NORMAL && Settings.useTextToSpeechOnNormal)
|
||||
|
|
||||
||
|
||||
(mode == AudioManager.RINGER_MODE_VIBRATE && Settings.useTextToSpeechOnVibrate)
|
||||
|
|
||||
||
|
||||
(mode == AudioManager.RINGER_MODE_SILENT && Settings.useTextToSpeechOnSilent)
|
||||
|
|
||||
||
|
||||
force
|
||||
)
|
||||
{
|
||||
@ -702,12 +655,12 @@ public class AutomationService extends Service implements OnInitListener
|
||||
{}
|
||||
}
|
||||
}
|
||||
Miscellaneous.logEvent("i", "TextToSpeech", "Speaking " + text + " in language " + ttsEngine.getLanguage().toLanguageTag(), 3);
|
||||
this.ttsEngine.speak(text, TextToSpeech.QUEUE_ADD, null);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "TextToSpeech", Log.getStackTraceString(e), 3);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -720,31 +673,6 @@ public class AutomationService extends Service implements OnInitListener
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
|
||||
// boolean isActivityFound = false;
|
||||
// ActivityManager activityManager = (ActivityManager)context.getSystemService (Context.ACTIVITY_SERVICE);
|
||||
// List<RunningTaskInfo> activitys = activityManager.getRunningTasks(Integer.MAX_VALUE);
|
||||
// isActivityFound = false;
|
||||
// for (int i = 0; i < activitys.size(); i++)
|
||||
// {
|
||||
// if (activitys.get(i).topActivity.toString().equalsIgnoreCase("ComponentInfo{com.jens.automation/com.jens.automation.ActivityMainScreen}"))
|
||||
// {
|
||||
// isActivityFound = true;
|
||||
// }
|
||||
// }
|
||||
// Miscellaneous.logEvent("i", "ActivityMainScreen", "Activity running status: " + String.valueOf(isActivityFound), 5);
|
||||
// return isActivityFound;
|
||||
|
||||
// ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
// List<RunningTaskInfo> tasks = activityManager.getRunningTasks(Integer.MAX_VALUE);
|
||||
//
|
||||
// for (RunningTaskInfo task : tasks)
|
||||
// {
|
||||
// if (context.getPackageName().equalsIgnoreCase(task.baseActivity.getPackageName()))
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// return false;
|
||||
}
|
||||
|
||||
public static boolean isMyServiceRunning(Context context)
|
||||
@ -756,7 +684,6 @@ public class AutomationService extends Service implements OnInitListener
|
||||
{
|
||||
if(AutomationService.class.getName().equals(service.service.getClassName()))
|
||||
{
|
||||
// return AutomationService.getInstance() != null && AutomationService.getInstance().isRunning;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -765,9 +692,8 @@ public class AutomationService extends Service implements OnInitListener
|
||||
{
|
||||
if(Log.getStackTraceString(e).contains("activate")) // Means that a poi has been activated/deactivated. Service is running.
|
||||
return true;
|
||||
// return AutomationService.getInstance() != null && AutomationService.getInstance().isRunning;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
22
app/src/main/java/com/jens/automation2/DeviceAdmin.java
Normal file
22
app/src/main/java/com/jens/automation2/DeviceAdmin.java
Normal file
@ -0,0 +1,22 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.app.admin.DeviceAdminReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
public class DeviceAdmin extends DeviceAdminReceiver
|
||||
{
|
||||
@Override
|
||||
public void onEnabled (Context context , Intent intent)
|
||||
{
|
||||
super.onEnabled(context , intent) ;
|
||||
Miscellaneous.logEvent("i", "DeviceAdmin", "Got permission BIND_DEVICE_ADMIN.", 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisabled (Context context , Intent intent)
|
||||
{
|
||||
super.onDisabled(context , intent) ;
|
||||
Miscellaneous.logEvent("i", "DeviceAdmin", "Permission BIND_DEVICE_ADMIN taken.", 3);
|
||||
}
|
||||
}
|
@ -14,7 +14,10 @@ import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.database.Cursor;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
@ -75,6 +78,8 @@ import java.security.NoSuchAlgorithmException;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.sql.Time;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
@ -121,15 +126,6 @@ public class Miscellaneous extends Service
|
||||
if(url.toLowerCase().contains("https"))
|
||||
{
|
||||
connection = (HttpsURLConnection) urlObject.openConnection();
|
||||
|
||||
// if(Settings.httpAcceptAllCertificates)
|
||||
// {
|
||||
// SSLContext sc = SSLContext.getInstance("TLS");
|
||||
// sc.init(null, getInsecureTrustManager(), new java.security.SecureRandom());
|
||||
// HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
|
||||
// Miscellaneous.disableSSLCertificateChecking();
|
||||
// HttpsURLConnection.setDefaultHostnameVerifier(getInsecureHostnameVerifier());
|
||||
// }
|
||||
}
|
||||
else
|
||||
connection = (HttpURLConnection) urlObject.openConnection();
|
||||
@ -220,7 +216,15 @@ public class Miscellaneous extends Service
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public static int boolToInt(boolean input)
|
||||
{
|
||||
if(input)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent arg0)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
@ -456,6 +460,14 @@ public class Miscellaneous extends Service
|
||||
|
||||
public static boolean compare(String direction, String needle, String haystack)
|
||||
{
|
||||
// If only one of needle or haystack is null
|
||||
if(
|
||||
(needle == null && haystack != null)
|
||||
||
|
||||
(needle != null && haystack == null)
|
||||
)
|
||||
return false;
|
||||
|
||||
switch(direction)
|
||||
{
|
||||
case Trigger.directionEquals:
|
||||
@ -540,6 +552,22 @@ public class Miscellaneous extends Service
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isDarkModeEnabled(Context context)
|
||||
{
|
||||
int mode = context.getResources().getConfiguration().uiMode;
|
||||
switch(mode)
|
||||
{
|
||||
case 33:
|
||||
case Configuration.UI_MODE_NIGHT_YES:
|
||||
return true;
|
||||
case 17:
|
||||
case Configuration.UI_MODE_NIGHT_NO:
|
||||
case Configuration.UI_MODE_NIGHT_UNDEFINED:
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public static String replaceVariablesInText(String source, Context context) throws Exception
|
||||
@ -608,7 +636,10 @@ public class Miscellaneous extends Service
|
||||
if(notificationTitle != null && notificationTitle.length() > 0)
|
||||
source = source.replace("[notificationTitle]", notificationTitle);
|
||||
else
|
||||
{
|
||||
source = source.replace("notificationTitle unknown", notificationTitle);
|
||||
Miscellaneous.logEvent("w", "Variable replacement", "notificationTitle was empty.", 3);
|
||||
}
|
||||
}
|
||||
|
||||
if(source.contains("[notificationText]"))
|
||||
@ -618,7 +649,10 @@ public class Miscellaneous extends Service
|
||||
if(notificationText != null && notificationText.length() > 0)
|
||||
source = source.replace("[notificationText]", notificationText);
|
||||
else
|
||||
{
|
||||
source = source.replace("notificationText unknown", notificationText);
|
||||
Miscellaneous.logEvent("w", "Variable replacement", "notificationText was empty.", 3);
|
||||
}
|
||||
}
|
||||
|
||||
// Miscellaneous.logEvent("i", "URL after replace", source);
|
||||
@ -665,6 +699,24 @@ public class Miscellaneous extends Service
|
||||
|
||||
return alertDialog.create();
|
||||
}
|
||||
|
||||
private boolean haveNetworkConnection()
|
||||
{
|
||||
boolean haveConnectedWifi = false;
|
||||
boolean haveConnectedMobile = false;
|
||||
|
||||
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
NetworkInfo[] netInfo = cm.getAllNetworkInfo();
|
||||
for (NetworkInfo ni : netInfo) {
|
||||
if (ni.getTypeName().equalsIgnoreCase("WIFI"))
|
||||
if (ni.isConnected())
|
||||
haveConnectedWifi = true;
|
||||
if (ni.getTypeName().equalsIgnoreCase("MOBILE"))
|
||||
if (ni.isConnected())
|
||||
haveConnectedMobile = true;
|
||||
}
|
||||
return haveConnectedWifi || haveConnectedMobile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the device is rooted.
|
||||
@ -673,9 +725,13 @@ public class Miscellaneous extends Service
|
||||
*/
|
||||
public static boolean isPhoneRooted()
|
||||
{
|
||||
// if(true)
|
||||
// return true;
|
||||
|
||||
// get from build info
|
||||
String buildTags = Build.TAGS;
|
||||
if (buildTags != null && buildTags.contains("test-keys")) {
|
||||
if (buildTags != null && buildTags.contains("test-keys"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -882,6 +938,7 @@ public class Miscellaneous extends Service
|
||||
dismissableNotificationBuilder.setContentText(textToDisplay);
|
||||
dismissableNotificationBuilder.setContentIntent(pendingIntent);
|
||||
dismissableNotificationBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
||||
dismissableNotificationBuilder.setAutoCancel(true);
|
||||
|
||||
Notification dismissableNotification = dismissableNotificationBuilder.build();
|
||||
|
||||
@ -983,6 +1040,7 @@ public class Miscellaneous extends Service
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||
builder.setCategory(Notification.CATEGORY_SERVICE);
|
||||
|
||||
builder.setAutoCancel(true);
|
||||
builder.setWhen(System.currentTimeMillis());
|
||||
builder.setContentIntent(myPendingIntent);
|
||||
|
||||
@ -1015,6 +1073,23 @@ public class Miscellaneous extends Service
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String explode(String glue, String[] inputArray)
|
||||
{
|
||||
if(inputArray != null)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (String s : inputArray)
|
||||
builder.append(s + glue);
|
||||
|
||||
if (builder.length() > 0)
|
||||
builder.delete(builder.length() - glue.length(), builder.length());
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
public static boolean isGooglePlayInstalled(Context context)
|
||||
{
|
||||
// return false;
|
||||
@ -1102,11 +1177,11 @@ public class Miscellaneous extends Service
|
||||
}
|
||||
catch (IllegalAccessException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
Miscellaneous.logEvent("w", "runMethodReflective", Log.getStackTraceString(e),5 );
|
||||
}
|
||||
catch (InvocationTargetException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
Miscellaneous.logEvent("w", "runMethodReflective", Log.getStackTraceString(e),5 );
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -1501,4 +1576,21 @@ public class Miscellaneous extends Service
|
||||
else*/
|
||||
return PhoneNumberUtils.compare(number1, number2);
|
||||
}
|
||||
|
||||
public static String formatDate(Date input)
|
||||
{
|
||||
DateFormat sdf = null;
|
||||
SimpleDateFormat fallBackFormatter = new SimpleDateFormat(Settings.dateFormat);
|
||||
|
||||
if(sdf == null && Settings.dateFormat != null)
|
||||
sdf = new SimpleDateFormat(Settings.dateFormat);
|
||||
|
||||
String formattedDate;
|
||||
if(sdf != null)
|
||||
formattedDate = sdf.format(input);
|
||||
else
|
||||
formattedDate = fallBackFormatter.format(input);
|
||||
|
||||
return formattedDate;
|
||||
}
|
||||
}
|
@ -23,7 +23,7 @@ import java.util.Map;
|
||||
public class News
|
||||
{
|
||||
Calendar publishDate;
|
||||
String applicablePlattform;
|
||||
String applicablePlatform;
|
||||
Map<String,NewsTranslation> translations = new HashMap<>();
|
||||
|
||||
public static class NewsTranslation
|
||||
@ -76,7 +76,7 @@ public class News
|
||||
if(oldFilePath.exists())
|
||||
oldFilePath.delete();
|
||||
|
||||
if (!(new File(filePath)).exists() || Settings.lastNewsPolltime == -1 || now.getTimeInMillis() >= Settings.lastNewsPolltime + (long)(Settings.newsDisplayForXDays * 24 * 60 * 60 * 1000))
|
||||
if (!(new File(filePath)).exists() || Settings.lastNewsPolltime == Settings.default_lastNewsPolltime || now.getTimeInMillis() >= Settings.lastNewsPolltime + (long)(Settings.newsDisplayForXDays * 24 * 60 * 60 * 1000))
|
||||
{
|
||||
String newsUrl = "https://server47.de/automation/appNews.php";
|
||||
newsContent = Miscellaneous.downloadURL(newsUrl, null, null);
|
||||
@ -151,9 +151,9 @@ public class News
|
||||
String publishDateString = neEl.getElementsByTagName("publishDate").item(0).getTextContent();
|
||||
newsEntry.setPublishDate(Miscellaneous.calendarFromLong(Long.parseLong(publishDateString) * 1000));
|
||||
|
||||
newsEntry.setApplicablePlattform(neEl.getElementsByTagName("applicablePlattforms").item(0).getTextContent());
|
||||
newsEntry.setApplicablePlatform(neEl.getElementsByTagName("applicablePlattforms").item(0).getTextContent());
|
||||
|
||||
if(newsEntry.getApplicablePlattform().equalsIgnoreCase("all") || newsEntry.getApplicablePlattform().equalsIgnoreCase(BuildConfig.FLAVOR))
|
||||
if(newsEntry.getApplicablePlatform().equalsIgnoreCase("all") || newsEntry.getApplicablePlatform().equalsIgnoreCase(BuildConfig.FLAVOR))
|
||||
returnList.add(newsEntry);
|
||||
}
|
||||
}
|
||||
@ -199,14 +199,14 @@ public class News
|
||||
this.publishDate = publishDate;
|
||||
}
|
||||
|
||||
public String getApplicablePlattform()
|
||||
public String getApplicablePlatform()
|
||||
{
|
||||
return applicablePlattform;
|
||||
return applicablePlatform;
|
||||
}
|
||||
|
||||
public void setApplicablePlattform(String applicablePlattform)
|
||||
public void setApplicablePlatform(String applicablePlatform)
|
||||
{
|
||||
this.applicablePlattform = applicablePlattform;
|
||||
this.applicablePlatform = applicablePlatform;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
@ -252,8 +252,9 @@ public class PointOfInterest implements Comparable<PointOfInterest>
|
||||
Settings.writeSettings(parentService);
|
||||
|
||||
Miscellaneous.logEvent("i", "POI", "Reached POI " + this.getName() + ". Checking if there's a rule that applies to that.", 2);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByPoi(this, true);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.pointOfInterest);
|
||||
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByPoi(this);
|
||||
if(ruleCandidates.size()==0)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI", "POI " + this.getName() + " not found in ANY rule.", 2);
|
||||
@ -264,18 +265,22 @@ public class PointOfInterest implements Comparable<PointOfInterest>
|
||||
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).applies(parentService) && ruleCandidates.get(i).haveEnoughPermissions())
|
||||
if(ruleCandidates.get(i).haveEnoughPermissions() && ruleCandidates.get(i).getsGreenLight(parentService))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI", "Rule " + ruleCandidates.get(i).getName() + " applies for entering POI " + this.getName() + ".", 2);
|
||||
ruleCandidates.get(i).activate(parentService, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Miscellaneous.logEvent("i", "POI", "Reached POI " + this.getName() + ". Done checking POI rules.", 2);
|
||||
|
||||
|
||||
parentService.updateNotification();
|
||||
ActivityMainScreen.updateMainScreen();
|
||||
}
|
||||
}
|
||||
|
||||
public void deactivate(AutomationService parentService)
|
||||
{
|
||||
if(this.isActivated())
|
||||
@ -285,8 +290,9 @@ public class PointOfInterest implements Comparable<PointOfInterest>
|
||||
Settings.writeSettings(parentService);
|
||||
|
||||
Miscellaneous.logEvent("i", "POI", "Left POI " + this.getName() + ". Checking if there's a rule that applies to that.", 2);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByPoi(this, false);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.pointOfInterest);
|
||||
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByPoi(this);
|
||||
if(ruleCandidates.size()==0)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI", "POI " + this.getName() + " not found in ANY rule.", 2);
|
||||
@ -296,7 +302,7 @@ public class PointOfInterest implements Comparable<PointOfInterest>
|
||||
Miscellaneous.logEvent("i", "POI", "POI " + this.getName() + " found in " + ruleCandidates.size() + " rule(s).", 2);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).applies(parentService))
|
||||
if(ruleCandidates.get(i).haveEnoughPermissions() && ruleCandidates.get(i).getsGreenLight(parentService))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI", "Rule " + ruleCandidates.get(i).getName() + " applies for leaving POI " + this.getName() + ".", 2);
|
||||
ruleCandidates.get(i).activate(parentService, false);
|
||||
@ -805,6 +811,7 @@ public class PointOfInterest implements Comparable<PointOfInterest>
|
||||
{
|
||||
String text = String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.overlapBetweenPois), otherPoi.getName(), String.valueOf(overlap));
|
||||
Miscellaneous.logEvent("w", "POI", text, 2);
|
||||
// Miscellaneous.messageBox("POI", text, Miscellaneous.getAnyContext()).show();
|
||||
Toast.makeText(Miscellaneous.getAnyContext(), text, Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
|
@ -1,10 +1,12 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.app.NotificationManager;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.media.AudioManager;
|
||||
import android.media.RingtoneManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.provider.MediaStore;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
@ -13,10 +15,12 @@ import com.jens.automation2.Action.Action_Enum;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Profile implements Comparable<Profile>
|
||||
{
|
||||
protected static ArrayList<Profile> profileCollection = new ArrayList<Profile>();
|
||||
protected static List<Profile> profileCollection = new ArrayList<Profile>();
|
||||
protected static List<Profile> profileActivationHistory = new ArrayList<>();
|
||||
|
||||
protected String name;
|
||||
protected String oldName;
|
||||
@ -24,6 +28,9 @@ public class Profile implements Comparable<Profile>
|
||||
protected boolean changeSoundMode;
|
||||
protected int soundMode;
|
||||
|
||||
protected boolean changeDndMode;
|
||||
protected int dndMode;
|
||||
|
||||
boolean changeVolumeMusicVideoGameMedia;
|
||||
protected int volumeMusic;
|
||||
|
||||
@ -81,6 +88,26 @@ public class Profile implements Comparable<Profile>
|
||||
return soundMode;
|
||||
}
|
||||
|
||||
public boolean getChangeDndMode()
|
||||
{
|
||||
return changeDndMode;
|
||||
}
|
||||
|
||||
public void setChangeDndMode(boolean changeDndMode)
|
||||
{
|
||||
this.changeDndMode = changeDndMode;
|
||||
}
|
||||
|
||||
public int getDndMode()
|
||||
{
|
||||
return dndMode;
|
||||
}
|
||||
|
||||
public void setDndMode(int dndMode)
|
||||
{
|
||||
this.dndMode = dndMode;
|
||||
}
|
||||
|
||||
public void setChangeVolumeMusicVideoGameMedia(boolean changeVolumeMusicVideoGameMedia)
|
||||
{
|
||||
this.changeVolumeMusicVideoGameMedia = changeVolumeMusicVideoGameMedia;
|
||||
@ -243,7 +270,7 @@ public class Profile implements Comparable<Profile>
|
||||
return hapticFeedback;
|
||||
}
|
||||
|
||||
public static ArrayList<Profile> getProfileCollection()
|
||||
public static List<Profile> getProfileCollection()
|
||||
{
|
||||
return profileCollection;
|
||||
}
|
||||
@ -264,18 +291,12 @@ public class Profile implements Comparable<Profile>
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean delete(AutomationService myAutomationService)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean applyRingTone(File ringtoneFile, int ringtoneType, Context context)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Request to set ringtone to " + ringtoneFile.getAbsolutePath(), 3);
|
||||
|
||||
if(!ringtoneFile.exists() | !ringtoneFile.canRead())
|
||||
if(!ringtoneFile.exists() || !ringtoneFile.canRead())
|
||||
{
|
||||
String message = "Ringtone file does not exist or cannot read it: " + ringtoneFile.getAbsolutePath();
|
||||
Miscellaneous.logEvent("i", "Profile", message, 3);
|
||||
@ -366,11 +387,23 @@ public class Profile implements Comparable<Profile>
|
||||
}
|
||||
|
||||
// Check if rules reference this profile
|
||||
ArrayList<Rule> rulesThatReferenceMe = Rule.findRuleCandidatesByProfile(this);
|
||||
ArrayList<Rule> rulesThatReferenceMe = Rule.findRuleCandidatesByActionProfile(this);
|
||||
if(rulesThatReferenceMe.size() > 0)
|
||||
{
|
||||
for(Rule oneRule : rulesThatReferenceMe)
|
||||
{
|
||||
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||
{
|
||||
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.profileActive)
|
||||
{
|
||||
String[] parts = oneTrigger.getTriggerParameter2().split(Trigger.triggerParameter2Split);
|
||||
parts[0] = this.name;
|
||||
|
||||
oneTrigger.setTriggerParameter2(Miscellaneous.explode(Trigger.triggerParameter2Split, parts));
|
||||
// We don't need to save the file. This will happen anyway in PointOfInterest.writePoisToFile() below.
|
||||
}
|
||||
}
|
||||
|
||||
for(Action oneAction : oneRule.getActionSet())
|
||||
{
|
||||
if(oneAction.getAction() == Action_Enum.changeSoundProfile)
|
||||
@ -399,19 +432,50 @@ public class Profile implements Comparable<Profile>
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean delete()
|
||||
{
|
||||
for(int i = 0; i< Profile.getProfileCollection().size(); i++)
|
||||
public Rule isInUseByRules()
|
||||
{
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.profileActive))
|
||||
{
|
||||
if(Profile.getProfileCollection().get(i).getName().equals(this.getName()))
|
||||
for (Rule rule : Rule.findRuleCandidatesByTriggerProfile(this))
|
||||
{
|
||||
Profile.getProfileCollection().remove(0);
|
||||
|
||||
// write to file
|
||||
return XmlFileInterface.writeFile();
|
||||
return rule;
|
||||
}
|
||||
}
|
||||
|
||||
else if(Rule.isAnyRuleUsing(Action_Enum.changeSoundProfile))
|
||||
{
|
||||
for (Rule rule : Rule.findRuleCandidatesByActionProfile(this))
|
||||
{
|
||||
return rule;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean delete(Context context)
|
||||
{
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.profileActive))
|
||||
{
|
||||
for (Rule rule : Rule.findRuleCandidatesByTriggerProfile(this))
|
||||
{
|
||||
Toast.makeText(context, String.format(context.getResources().getString(R.string.ruleXIsUsingProfileY), rule.getName(), this.getName()), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if(Rule.isAnyRuleUsing(Action_Enum.changeSoundProfile))
|
||||
{
|
||||
for (Rule rule : Rule.findRuleCandidatesByActionProfile(this))
|
||||
{
|
||||
Toast.makeText(context, String.format(context.getResources().getString(R.string.ruleXIsUsingProfileY), rule.getName(), this.getName()), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
profileCollection.remove(this);
|
||||
return XmlFileInterface.writeFile();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -439,6 +503,8 @@ public class Profile implements Comparable<Profile>
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile " + this.getName(), String.format(context.getResources().getString(R.string.profileActivate), this.getName()), 3);
|
||||
|
||||
profileActivationHistory.add(this);
|
||||
|
||||
AutomationService.getInstance().checkLockSoundChangesTimeElapsed();
|
||||
|
||||
if(AutomationService.getInstance().getLockSoundChangesEnd() == null)
|
||||
@ -449,6 +515,9 @@ public class Profile implements Comparable<Profile>
|
||||
|
||||
if(changeSoundMode)
|
||||
Actions.setSound(context, soundMode);
|
||||
|
||||
if(changeDndMode)
|
||||
Actions.setDND(context, dndMode);
|
||||
|
||||
if(changeVolumeMusicVideoGameMedia)
|
||||
am.setStreamVolume(AudioManager.STREAM_MUSIC, volumeMusic, AudioManager.FLAG_PLAY_SOUND);
|
||||
@ -464,10 +533,19 @@ public class Profile implements Comparable<Profile>
|
||||
applyRingTone(incomingCallsRingtone, RingtoneManager.TYPE_RINGTONE, context);
|
||||
|
||||
if(changeVibrateWhenRinging)
|
||||
if(vibrateWhenRinging)
|
||||
am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_ON);
|
||||
else
|
||||
am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
|
||||
{
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||
{
|
||||
android.provider.Settings.System.putInt(context.getContentResolver(), "vibrate_when_ringing", vibrateWhenRinging?1:0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vibrateWhenRinging)
|
||||
am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_ON);
|
||||
else
|
||||
am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
if(changeNotificationRingtone)
|
||||
if(notificationRingtone != null)
|
||||
@ -498,6 +576,20 @@ public class Profile implements Comparable<Profile>
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Profile " + this.getName(), context.getResources().getString(R.string.errorActivatingProfile) + " " + Log.getStackTraceString(e), 1);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI", "Checking for applicable rule after profile " + this.getName() + " has been activated.", 2);
|
||||
List<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.profileActive);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).haveEnoughPermissions() && ruleCandidates.get(i).getsGreenLight(AutomationService.getInstance()))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI", "Rule " + ruleCandidates.get(i).getName() + " applies after " + this.getName() + " has been activated.", 2);
|
||||
ruleCandidates.get(i).activate(AutomationService.getInstance(), false);
|
||||
}
|
||||
}
|
||||
Miscellaneous.logEvent("i", "POI", "Done checking for applicable rule after profile " + this.getName() + " has been activated.", 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -505,6 +597,104 @@ public class Profile implements Comparable<Profile>
|
||||
}
|
||||
}
|
||||
|
||||
public boolean areMySettingsCurrentlyActive(Context context)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile " + this.getName(), "Checking if profile's settings are currently active.", 3);
|
||||
|
||||
try
|
||||
{
|
||||
AudioManager am = (AudioManager) Miscellaneous.getAnyContext().getSystemService(Context.AUDIO_SERVICE);
|
||||
NotificationManager mNotificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
if(changeSoundMode)
|
||||
{
|
||||
if(am.getRingerMode() != soundMode)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeDndMode && Build.VERSION.SDK_INT >= 23)
|
||||
{
|
||||
if(mNotificationManager.getCurrentInterruptionFilter() != dndMode)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeVolumeMusicVideoGameMedia)
|
||||
{
|
||||
if(am.getStreamVolume(AudioManager.STREAM_MUSIC) != volumeMusic)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeVolumeNotifications)
|
||||
{
|
||||
if(am.getStreamVolume(AudioManager.STREAM_NOTIFICATION) != volumeNotifications)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeVolumeAlarms)
|
||||
{
|
||||
if(am.getStreamVolume(AudioManager.STREAM_ALARM) != volumeAlarms)
|
||||
return false;
|
||||
}
|
||||
|
||||
// if(changeIncomingCallsRingtone)
|
||||
// {
|
||||
// if (incomingCallsRingtone != null)
|
||||
// {
|
||||
// applyRingTone(incomingCallsRingtone, RingtoneManager.TYPE_RINGTONE, context);
|
||||
// }
|
||||
// }
|
||||
|
||||
if(changeVibrateWhenRinging)
|
||||
{
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||
{
|
||||
int currentSetting = android.provider.Settings.System.getInt(context.getContentResolver(), "vibrate_when_ringing");
|
||||
if(currentSetting != Miscellaneous.boolToInt(vibrateWhenRinging))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
int currentSetting = am.getVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER);
|
||||
if(currentSetting != Miscellaneous.boolToInt(vibrateWhenRinging))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// if(changeNotificationRingtone)
|
||||
// if(notificationRingtone != null)
|
||||
// applyRingTone(notificationRingtone, RingtoneManager.TYPE_NOTIFICATION, context);
|
||||
|
||||
if(changeScreenLockUnlockSound)
|
||||
{
|
||||
int currentSetting = android.provider.Settings.System.getInt(context.getContentResolver(), "lockscreen_sounds_enabled");
|
||||
if(currentSetting != Miscellaneous.boolToInt(screenLockUnlockSound))
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeAudibleSelection)
|
||||
{
|
||||
int currentSetting = android.provider.Settings.System.getInt(context.getContentResolver(), android.provider.Settings.System.SOUND_EFFECTS_ENABLED);
|
||||
if(currentSetting != Miscellaneous.boolToInt(audibleSelection))
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeHapticFeedback)
|
||||
{
|
||||
int currentSetting = android.provider.Settings.System.getInt(context.getContentResolver(), android.provider.Settings.System.HAPTIC_FEEDBACK_ENABLED);
|
||||
if(currentSetting != Miscellaneous.boolToInt(hapticFeedback))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Profile " + this.getName(), "Error while checking if profile settings are currently active. " + Log.getStackTraceString(e), 1);
|
||||
}
|
||||
|
||||
Miscellaneous.logEvent("i", "Profile " + this.getName(), "This profile's settings are currently active.", 4);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
@ -5,11 +5,12 @@ import android.util.Log;
|
||||
|
||||
import com.jens.automation2.location.CellLocationChangedReceiver;
|
||||
import com.jens.automation2.location.WifiBroadcastReceiver;
|
||||
import com.jens.automation2.receivers.AlarmListener;
|
||||
import com.jens.automation2.receivers.DateTimeListener;
|
||||
import com.jens.automation2.receivers.AutomationListenerInterface;
|
||||
import com.jens.automation2.receivers.BatteryReceiver;
|
||||
import com.jens.automation2.receivers.BluetoothReceiver;
|
||||
import com.jens.automation2.receivers.ConnectivityReceiver;
|
||||
import com.jens.automation2.receivers.DeviceOrientationListener;
|
||||
import com.jens.automation2.receivers.HeadphoneJackListener;
|
||||
import com.jens.automation2.receivers.NoiseListener;
|
||||
import com.jens.automation2.receivers.PhoneStatusListener;
|
||||
@ -42,10 +43,11 @@ public class ReceiverCoordinator
|
||||
Class adClass = Class.forName("ActivityDetectionReceiver");
|
||||
allImplementers = new Class[] {
|
||||
adClass,
|
||||
AlarmListener.class,
|
||||
DateTimeListener.class,
|
||||
BatteryReceiver.class,
|
||||
BluetoothReceiver.class,
|
||||
ConnectivityReceiver.class,
|
||||
DeviceOrientationListener.class,
|
||||
HeadphoneJackListener.class,
|
||||
//NfcReceiver.class,
|
||||
NoiseListener.class,
|
||||
@ -56,13 +58,12 @@ public class ReceiverCoordinator
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
// e.printStackTrace();
|
||||
|
||||
allImplementers = new Class[] {
|
||||
AlarmListener.class,
|
||||
DateTimeListener.class,
|
||||
BatteryReceiver.class,
|
||||
BluetoothReceiver.class,
|
||||
ConnectivityReceiver.class,
|
||||
DeviceOrientationListener.class,
|
||||
HeadphoneJackListener.class,
|
||||
//NfcReceiver.class,
|
||||
NoiseListener.class,
|
||||
@ -144,18 +145,18 @@ public class ReceiverCoordinator
|
||||
ConnectivityReceiver.startConnectivityReceiver(AutomationService.getInstance());
|
||||
|
||||
// startCellLocationChangedReceiver
|
||||
if(!ConnectivityReceiver.isAirplaneMode(AutomationService.getInstance()) && WifiBroadcastReceiver.mayCellLocationReceiverBeActivated() && (Rule.isAnyRuleUsing(Trigger.Trigger_Enum.pointOfInterest) | Rule.isAnyRuleUsing(Trigger.Trigger_Enum.speed)))
|
||||
if(!ConnectivityReceiver.isAirplaneMode(AutomationService.getInstance()) && WifiBroadcastReceiver.mayCellLocationReceiverBeActivated() && (Rule.isAnyRuleUsing(Trigger.Trigger_Enum.pointOfInterest) || Rule.isAnyRuleUsing(Trigger.Trigger_Enum.speed)))
|
||||
{
|
||||
if(!Miscellaneous.googleToBlameForLocation(true))
|
||||
CellLocationChangedReceiver.startCellLocationChangedReceiver();
|
||||
}
|
||||
|
||||
// startBatteryReceiver
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.charging) | Rule.isAnyRuleUsing(Trigger.Trigger_Enum.usb_host_connection) | Rule.isAnyRuleUsing(Trigger.Trigger_Enum.batteryLevel))
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.charging) || Rule.isAnyRuleUsing(Trigger.Trigger_Enum.usb_host_connection) || Rule.isAnyRuleUsing(Trigger.Trigger_Enum.batteryLevel))
|
||||
BatteryReceiver.startBatteryReceiver(AutomationService.getInstance());
|
||||
|
||||
// startAlarmListener
|
||||
AlarmListener.startAlarmListener(AutomationService.getInstance());
|
||||
DateTimeListener.startAlarmListener(AutomationService.getInstance());
|
||||
TimeZoneListener.startTimeZoneListener(AutomationService.getInstance());
|
||||
|
||||
// startNoiseListener
|
||||
@ -166,15 +167,15 @@ public class ReceiverCoordinator
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.process_started_stopped))
|
||||
ProcessListener.startProcessListener(AutomationService.getInstance());
|
||||
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.deviceOrientation))
|
||||
DeviceOrientationListener.getInstance().startListener(AutomationService.getInstance());
|
||||
|
||||
try
|
||||
{
|
||||
Class testClass = Class.forName(ActivityManageRule.activityDetectionClassPath);
|
||||
//startActivityDetectionReceiver
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.activityDetection))
|
||||
{
|
||||
Miscellaneous.runMethodReflective(activityDetectionClassPath, "startActivityDetectionReceiver", null);
|
||||
// ActivityDetectionReceiver.startActivityDetectionReceiver();
|
||||
}
|
||||
}
|
||||
catch(ClassNotFoundException e)
|
||||
{
|
||||
@ -199,15 +200,15 @@ public class ReceiverCoordinator
|
||||
WifiBroadcastReceiver.stopWifiReceiver();
|
||||
BatteryReceiver.stopBatteryReceiver();
|
||||
TimeZoneListener.stopTimeZoneListener();
|
||||
AlarmListener.stopAlarmListener(AutomationService.getInstance());
|
||||
DateTimeListener.stopAlarmListener(AutomationService.getInstance());
|
||||
NoiseListener.stopNoiseListener();
|
||||
ProcessListener.stopProcessListener(AutomationService.getInstance());
|
||||
DeviceOrientationListener.getInstance().stopListener(AutomationService.getInstance());
|
||||
|
||||
try
|
||||
{
|
||||
Class testClass = Class.forName(ActivityManageRule.activityDetectionClassPath);
|
||||
Miscellaneous.runMethodReflective("ActivityDetectionReceiver", "stopActivityDetectionReceiver", null);
|
||||
// ActivityDetectionReceiver.stopActivityDetectionReceiver();
|
||||
}
|
||||
catch(ClassNotFoundException e)
|
||||
{
|
||||
@ -216,6 +217,7 @@ public class ReceiverCoordinator
|
||||
|
||||
BluetoothReceiver.stopBluetoothReceiver();
|
||||
HeadphoneJackListener.getInstance().stopListener(AutomationService.getInstance());
|
||||
DeviceOrientationListener.getInstance().stopListener(AutomationService.getInstance());
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
@ -350,6 +352,24 @@ public class ReceiverCoordinator
|
||||
}
|
||||
}
|
||||
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.deviceOrientation))
|
||||
{
|
||||
if(!DeviceOrientationListener.getInstance().isListenerRunning())
|
||||
{
|
||||
Miscellaneous.logEvent("i", "DevicePositionListener", "Starting DevicePositionListener because used in a new/changed rule.", 4);
|
||||
// if(DevicePositionListener.getInstance().haveAllPermission())
|
||||
DeviceOrientationListener.getInstance().startListener(AutomationService.getInstance());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(DeviceOrientationListener.getInstance().isListenerRunning())
|
||||
{
|
||||
Miscellaneous.logEvent("i", "DevicePositionListener", "Shutting down DevicePositionListener because not used in any rule.", 4);
|
||||
DeviceOrientationListener.getInstance().stopListener(AutomationService.getInstance());
|
||||
}
|
||||
}
|
||||
|
||||
AutomationService.updateNotification();
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ public class Settings implements SharedPreferences
|
||||
public final static int lockSoundChangesInterval = 15;
|
||||
public static final int newsPollEveryXDays = 3;
|
||||
public static final int newsDisplayForXDays = 3;
|
||||
public static final int updateCheckFrequencyDays = 7;
|
||||
public static final String folderName = "Automation";
|
||||
public static final String zipFileName = "automation.zip";
|
||||
|
||||
@ -55,16 +56,21 @@ public class Settings implements SharedPreferences
|
||||
public static boolean rememberLastActivePoi;
|
||||
public static int locationRingBufferSize;
|
||||
public static long timeBetweenProcessMonitorings;
|
||||
public static long acceptDeviceOrientationSignalEveryX_MilliSeconds;
|
||||
public static int activityDetectionFrequency;
|
||||
public static int activityDetectionRequiredProbability;
|
||||
public static boolean privacyLocationing;
|
||||
public static int startScreen;
|
||||
public static int tabsPlacement;
|
||||
public static boolean executeRulesAndProfilesWithSingleClick;
|
||||
public static boolean displayNewsOnMainScreen;
|
||||
public static boolean automaticUpdateCheck;
|
||||
|
||||
public static boolean lockSoundChanges;
|
||||
public static boolean noticeAndroid9MicrophoneShown;
|
||||
public static boolean noticeAndroid10WifiShown;
|
||||
public static long lastNewsPolltime;
|
||||
public static long lastUpdateCheck;
|
||||
|
||||
public static ArrayList<String> whatHasBeenDone;
|
||||
|
||||
@ -108,14 +114,18 @@ public class Settings implements SharedPreferences
|
||||
protected static final boolean default_rememberLastActivePoi = true;
|
||||
protected static final int default_locationRingBufferSize=3;
|
||||
protected static final long default_timeBetweenProcessMonitorings = 60;
|
||||
protected static final long default_acceptDevicePositionSignalEveryX_MilliSeconds = 1000;
|
||||
protected static final int default_activityDetectionFrequency = 60;
|
||||
protected static final int default_activityDetectionRequiredProbability = 75;
|
||||
protected static final boolean default_privacyLocationing = false;
|
||||
protected static final int default_startScreen = 0;
|
||||
protected static final int default_tabsPlacement = 0;
|
||||
protected static final boolean default_executeRulesAndProfilesWithSingleClick = false;
|
||||
protected static final boolean default_displayNewsOnMainScreen = false;
|
||||
protected static final boolean default_automaticUpdateCheck = false;
|
||||
protected static final boolean default_lockSoundChanges = false;
|
||||
protected static final long default_lastNewsPolltime = -1;
|
||||
protected static final long default_lastUpdateCheck = -1;
|
||||
|
||||
@Override
|
||||
public boolean contains(String arg0)
|
||||
@ -228,6 +238,7 @@ public class Settings implements SharedPreferences
|
||||
lengthOfNoiseLevelMeasurements = Long.parseLong(prefs.getString("lengthOfNoiseLevelMeasurements", String.valueOf(default_lengthOfNoiseLevelMeasurements)));
|
||||
referenceValueForNoiseLevelMeasurements = Long.parseLong(prefs.getString("referenceValueForNoiseLevelMeasurements", String.valueOf(default_referenceValueForNoiseLevelMeasurements)));
|
||||
timeBetweenProcessMonitorings = Long.parseLong(prefs.getString("timeBetweenProcessMonitorings", String.valueOf(default_timeBetweenProcessMonitorings)));
|
||||
acceptDeviceOrientationSignalEveryX_MilliSeconds = Long.parseLong(prefs.getString("acceptDevicePositionSignalEveryX_MilliSeconds", String.valueOf(default_acceptDevicePositionSignalEveryX_MilliSeconds)));
|
||||
|
||||
httpAcceptAllCertificates = prefs.getBoolean("httpAcceptAllCertificates", default_httpAcceptAllCertificates);
|
||||
httpAttempts = Integer.parseInt(prefs.getString("httpAttempts", String.valueOf(default_httpAttempts)));
|
||||
@ -247,8 +258,10 @@ public class Settings implements SharedPreferences
|
||||
|
||||
privacyLocationing = prefs.getBoolean("privacyLocationing", default_privacyLocationing);
|
||||
startScreen = Integer.parseInt(prefs.getString("startScreen", String.valueOf(default_startScreen)));
|
||||
tabsPlacement = Integer.parseInt(prefs.getString("tabsPlacement", String.valueOf(default_tabsPlacement)));
|
||||
|
||||
executeRulesAndProfilesWithSingleClick = prefs.getBoolean("executeRulesAndProfilesWithSingleClick", default_executeRulesAndProfilesWithSingleClick);
|
||||
automaticUpdateCheck = prefs.getBoolean("automaticUpdateCheck", default_automaticUpdateCheck);
|
||||
displayNewsOnMainScreen = prefs.getBoolean("displayNewsOnMainScreen", default_displayNewsOnMainScreen);
|
||||
|
||||
lockSoundChanges = prefs.getBoolean("lockSoundChanges", default_lockSoundChanges);
|
||||
@ -256,6 +269,7 @@ public class Settings implements SharedPreferences
|
||||
noticeAndroid10WifiShown = prefs.getBoolean("noticeAndroid10WifiShown", false);
|
||||
|
||||
lastNewsPolltime = prefs.getLong("lastNewsPolltime", default_lastNewsPolltime);
|
||||
lastUpdateCheck = prefs.getLong("lastUpdateCheck", default_lastUpdateCheck);
|
||||
|
||||
String whbdString = prefs.getString("whatHasBeenDone", "");
|
||||
if(whbdString != null && whbdString.length() > 0)
|
||||
@ -420,6 +434,9 @@ public class Settings implements SharedPreferences
|
||||
if(!prefs.contains("timeBetweenProcessMonitorings") | force)
|
||||
editor.putString("timeBetweenProcessMonitorings", String.valueOf(default_timeBetweenProcessMonitorings));
|
||||
|
||||
if(!prefs.contains("acceptDevicePositionSignalEveryX_MilliSeconds") | force)
|
||||
editor.putString("acceptDevicePositionSignalEveryX_MilliSeconds", String.valueOf(default_acceptDevicePositionSignalEveryX_MilliSeconds));
|
||||
|
||||
if(!prefs.contains("activityDetectionFrequency") | force)
|
||||
editor.putString("activityDetectionFrequency", String.valueOf(default_activityDetectionFrequency));
|
||||
|
||||
@ -432,9 +449,15 @@ public class Settings implements SharedPreferences
|
||||
if(!prefs.contains("startScreen") | force)
|
||||
editor.putString("startScreen", String.valueOf(default_startScreen));
|
||||
|
||||
if(!prefs.contains("tabsPlacement") | force)
|
||||
editor.putString("tabsPlacement", String.valueOf(default_tabsPlacement));
|
||||
|
||||
if(!prefs.contains("executeRulesAndProfilesWithSingleClick") | force)
|
||||
editor.putBoolean("executeRulesAndProfilesWithSingleClick", default_executeRulesAndProfilesWithSingleClick);
|
||||
|
||||
if(!prefs.contains("automaticUpdateCheck") | force)
|
||||
editor.putBoolean("automaticUpdateCheck", default_automaticUpdateCheck);
|
||||
|
||||
if(!prefs.contains("displayNewsOnMainScreen") | force)
|
||||
editor.putBoolean("displayNewsOnMainScreen", default_displayNewsOnMainScreen);
|
||||
|
||||
@ -447,6 +470,9 @@ public class Settings implements SharedPreferences
|
||||
if(!prefs.contains("lastNewsPolltime") | force)
|
||||
editor.putLong("lastNewsPolltime", default_lastNewsPolltime);
|
||||
|
||||
if(!prefs.contains("lastUpdateCheck") | force)
|
||||
editor.putLong("lastUpdateCheck", default_lastUpdateCheck);
|
||||
|
||||
if(!prefs.contains("whatHasBeenDone") | force)
|
||||
editor.putString("whatHasBeenDone", "");
|
||||
|
||||
@ -506,11 +532,14 @@ public class Settings implements SharedPreferences
|
||||
editor.putString("httpAttemptGap", String.valueOf(httpAttemptGap));
|
||||
editor.putString("locationRingBufferSize", String.valueOf(locationRingBufferSize));
|
||||
editor.putString("timeBetweenProcessMonitorings", String.valueOf(timeBetweenProcessMonitorings));
|
||||
editor.putString("acceptDevicePositionSignalEveryX_MilliSeconds", String.valueOf(acceptDeviceOrientationSignalEveryX_MilliSeconds));
|
||||
editor.putString("activityDetectionFrequency", String.valueOf(activityDetectionFrequency));
|
||||
editor.putString("activityDetectionRequiredProbability", String.valueOf(activityDetectionRequiredProbability));
|
||||
editor.putBoolean("privacyLocationing", privacyLocationing);
|
||||
editor.putString("startScreen", String.valueOf(startScreen));
|
||||
editor.putString("tabsPlacement", String.valueOf(tabsPlacement));
|
||||
editor.putBoolean("executeRulesAndProfilesWithSingleClick", executeRulesAndProfilesWithSingleClick);
|
||||
editor.putBoolean("automaticUpdateCheck", automaticUpdateCheck);
|
||||
editor.putBoolean("displayNewsOnMainScreen", displayNewsOnMainScreen);
|
||||
|
||||
editor.putBoolean("lockSoundChanges", lockSoundChanges);
|
||||
@ -518,6 +547,7 @@ public class Settings implements SharedPreferences
|
||||
editor.putBoolean("noticeAndroid10WifiShown", noticeAndroid10WifiShown);
|
||||
|
||||
editor.putLong("lastNewsPolltime", lastNewsPolltime);
|
||||
editor.putLong("lastUpdateCheck", lastUpdateCheck);
|
||||
|
||||
editor.putString("whatHasBeenDone", Miscellaneous.explode(";", whatHasBeenDone));
|
||||
|
||||
@ -559,4 +589,4 @@ public class Settings implements SharedPreferences
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -6,70 +6,90 @@ import java.util.ArrayList;
|
||||
public class TimeFrame
|
||||
{
|
||||
// Defines a timeframe
|
||||
private Time triggerTimeStart;
|
||||
private Time triggerTimeStop;
|
||||
protected Time triggerTimeStart;
|
||||
protected Time triggerTimeStop;
|
||||
protected long repetition;
|
||||
|
||||
private ArrayList<Integer> dayList = new ArrayList<Integer>();
|
||||
public ArrayList<Integer> getDayList()
|
||||
protected final static String separator = "/";
|
||||
|
||||
private ArrayList<Integer> dayList = new ArrayList<Integer>();
|
||||
public ArrayList<Integer> getDayList()
|
||||
{
|
||||
return dayList;
|
||||
}
|
||||
public void setDayList(ArrayList<Integer> dayList)
|
||||
{
|
||||
this.dayList = dayList;
|
||||
}
|
||||
public void setDayListFromString(String dayListString)
|
||||
{
|
||||
// Log.i("Parsing", "Full string: " + dayListString);
|
||||
char[] dayListCharArray = dayListString.toCharArray();
|
||||
|
||||
dayList = new ArrayList<Integer>();
|
||||
for(char item : dayListCharArray)
|
||||
{
|
||||
return dayList;
|
||||
}
|
||||
public void setDayList(ArrayList<Integer> dayList)
|
||||
{
|
||||
this.dayList = dayList;
|
||||
}
|
||||
public void setDayListFromString(String dayListString)
|
||||
{
|
||||
// Log.i("Parsing", "Full string: " + dayListString);
|
||||
char[] dayListCharArray = dayListString.toCharArray();
|
||||
|
||||
dayList = new ArrayList<Integer>();
|
||||
for(char item : dayListCharArray)
|
||||
{
|
||||
// Log.i("Parsing", String.valueOf(item));
|
||||
dayList.add(Integer.parseInt(String.valueOf(item)));
|
||||
}
|
||||
dayList.add(Integer.parseInt(String.valueOf(item)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Time getTriggerTimeStart()
|
||||
{
|
||||
return triggerTimeStart;
|
||||
}
|
||||
public void setTriggerTimeStart(Time triggerTimeStart)
|
||||
{
|
||||
this.triggerTimeStart = triggerTimeStart;
|
||||
}
|
||||
public Time getTriggerTimeStop()
|
||||
{
|
||||
return triggerTimeStop;
|
||||
}
|
||||
public void setTriggerTimeStop(Time triggerTimeStop)
|
||||
{
|
||||
this.triggerTimeStop = triggerTimeStop;
|
||||
}
|
||||
|
||||
public TimeFrame (Time timeStart, Time timeEnd, ArrayList<Integer> dayList2)
|
||||
{
|
||||
this.setTriggerTimeStart(timeStart);
|
||||
this.setTriggerTimeStop(timeEnd);
|
||||
this.setDayList(dayList2);
|
||||
}
|
||||
TimeFrame (String fileContent)
|
||||
{
|
||||
String[] dateArray = fileContent.split("/"); // example: timestart/timestop/days[int]
|
||||
this.setTriggerTimeStart(Time.valueOf(dateArray[0]));
|
||||
this.setTriggerTimeStop(Time.valueOf(dateArray[1]));
|
||||
this.setDayListFromString(dateArray[2]);
|
||||
}
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
String returnString = this.getTriggerTimeStart().toString() + "/" + this.getTriggerTimeStop().toString() + "/";
|
||||
|
||||
for(Integer oneDay : this.getDayList())
|
||||
returnString += String.valueOf(oneDay);
|
||||
|
||||
return returnString;
|
||||
}
|
||||
}
|
||||
public Time getTriggerTimeStart()
|
||||
{
|
||||
return triggerTimeStart;
|
||||
}
|
||||
public void setTriggerTimeStart(Time triggerTimeStart)
|
||||
{
|
||||
this.triggerTimeStart = triggerTimeStart;
|
||||
}
|
||||
|
||||
public Time getTriggerTimeStop()
|
||||
{
|
||||
return triggerTimeStop;
|
||||
}
|
||||
public void setTriggerTimeStop(Time triggerTimeStop)
|
||||
{
|
||||
this.triggerTimeStop = triggerTimeStop;
|
||||
}
|
||||
|
||||
public long getRepetition()
|
||||
{
|
||||
return repetition;
|
||||
}
|
||||
|
||||
public void setRepetition(long repetition)
|
||||
{
|
||||
this.repetition = repetition;
|
||||
}
|
||||
|
||||
public TimeFrame (Time timeStart, Time timeEnd, ArrayList<Integer> dayList2, long repetition)
|
||||
{
|
||||
this.setTriggerTimeStart(timeStart);
|
||||
this.setTriggerTimeStop(timeEnd);
|
||||
this.setDayList(dayList2);
|
||||
this.setRepetition(repetition);
|
||||
}
|
||||
|
||||
public TimeFrame (String fileContent)
|
||||
{
|
||||
String[] dateArray = fileContent.split(separator); // example: timestart/timestop/days[int]/repetition
|
||||
this.setTriggerTimeStart(Time.valueOf(dateArray[0]));
|
||||
this.setTriggerTimeStop(Time.valueOf(dateArray[1]));
|
||||
this.setDayListFromString(dateArray[2]);
|
||||
if(dateArray.length > 3) // may not exist in old config files
|
||||
this.setRepetition(Long.parseLong(dateArray[3]));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
String returnString = this.getTriggerTimeStart().toString() + separator + this.getTriggerTimeStop().toString() + separator;
|
||||
|
||||
for(Integer oneDay : this.getDayList())
|
||||
returnString += String.valueOf(oneDay);
|
||||
|
||||
returnString += separator + String.valueOf(repetition);
|
||||
|
||||
return returnString;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -93,7 +93,7 @@ public class XmlFileInterface
|
||||
{
|
||||
//start a tag called "root"
|
||||
serializer.startTag(null, "PointOfInterest");
|
||||
|
||||
|
||||
//i indent code just to have a view similar to xml-tree
|
||||
serializer.startTag(null, "name");
|
||||
serializer.text(PointOfInterest.getPointOfInterestCollection().get(i).getName());
|
||||
@ -170,9 +170,9 @@ public class XmlFileInterface
|
||||
serializer.startTag(null, "changeVibrateWhenRinging");
|
||||
serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getChangeVibrateWhenRinging()));
|
||||
serializer.endTag(null, "changeVibrateWhenRinging");//
|
||||
serializer.startTag(null, "changeVibrateWhenRinging");
|
||||
serializer.startTag(null, "vibrateWhenRinging");
|
||||
serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getVibrateWhenRinging()));
|
||||
serializer.endTag(null, "changeVibrateWhenRinging");
|
||||
serializer.endTag(null, "vibrateWhenRinging");
|
||||
|
||||
serializer.startTag(null, "changeNotificationRingtone");
|
||||
serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getChangeNotificationRingtone()));
|
||||
@ -204,13 +204,19 @@ public class XmlFileInterface
|
||||
serializer.endTag(null, "changeHapticFeedback");//
|
||||
serializer.startTag(null, "hapticFeedback");
|
||||
serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getHapticFeedback()));
|
||||
serializer.endTag(null, "hapticFeedback");
|
||||
serializer.endTag(null, "hapticFeedback");
|
||||
|
||||
serializer.startTag(null, "changeDndMode");
|
||||
serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getChangeDndMode()));
|
||||
serializer.endTag(null, "changeDndMode");//
|
||||
serializer.startTag(null, "dndMode");
|
||||
serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getDndMode()));
|
||||
serializer.endTag(null, "dndMode");
|
||||
|
||||
serializer.endTag(null, "Profile");
|
||||
}
|
||||
serializer.endTag(null, "ProfileCollection");
|
||||
|
||||
|
||||
|
||||
|
||||
serializer.startTag(null, "RuleCollection");
|
||||
for(int i=0; i<Rule.getRuleCollection().size(); i++)
|
||||
@ -607,6 +613,10 @@ public class XmlFileInterface
|
||||
newProfile.setChangeSoundMode(Boolean.parseBoolean(readTag(parser, "changeSoundMode")));
|
||||
else if (name.equals("soundMode"))
|
||||
newProfile.setSoundMode(Integer.parseInt(readTag(parser, "soundMode")));
|
||||
else if (name.equals("changeDndMode"))
|
||||
newProfile.setChangeDndMode(Boolean.parseBoolean(readTag(parser, "changeDndMode")));
|
||||
else if (name.equals("dndMode"))
|
||||
newProfile.setDndMode(Integer.parseInt(readTag(parser, "dndMode")));
|
||||
else if (name.equals("changeVolumeMusicVideoGameMedia"))
|
||||
newProfile.setChangeVolumeMusicVideoGameMedia(Boolean.parseBoolean(readTag(parser, "changeVolumeMusicVideoGameMedia")));
|
||||
else if (name.equals("volumeMusic"))
|
||||
@ -641,6 +651,8 @@ public class XmlFileInterface
|
||||
else
|
||||
newProfile.setNotificationRingtone(null);
|
||||
}
|
||||
else if (name.equals("vibrateWhenRinging"))
|
||||
newProfile.setVibrateWhenRinging(Boolean.parseBoolean(readTag(parser, "vibrateWhenRinging")));
|
||||
else if (name.equals("changeAudibleSelection"))
|
||||
newProfile.setChangeAudibleSelection(Boolean.parseBoolean(readTag(parser, "changeAudibleSelection")));
|
||||
else if (name.equals("audibleSelection"))
|
||||
@ -752,6 +764,8 @@ public class XmlFileInterface
|
||||
try
|
||||
{
|
||||
newRule.setTriggerSet(readTriggerCollection(parser));
|
||||
for(Trigger t : newRule.getTriggerSet())
|
||||
t.setParentRule(newRule);
|
||||
}
|
||||
catch (XmlPullParserException e)
|
||||
{
|
||||
@ -767,6 +781,8 @@ public class XmlFileInterface
|
||||
try
|
||||
{
|
||||
newRule.setActionSet(readActionCollection(parser));
|
||||
for(Action a : newRule.getActionSet())
|
||||
a.setParentRule(newRule);
|
||||
}
|
||||
catch (XmlPullParserException e)
|
||||
{
|
||||
@ -803,7 +819,15 @@ public class XmlFileInterface
|
||||
// Starts by looking for the entry tag
|
||||
if (name.equals("Trigger"))
|
||||
{
|
||||
triggerCollection.add(readTrigger(parser));
|
||||
try
|
||||
{
|
||||
triggerCollection.add(readTrigger(parser));
|
||||
}
|
||||
catch (IllegalArgumentException | NullPointerException e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "XMLFileInterface", "Unknown trigger found in config file. File was probably created by a newer program version. Details: " + Log.getStackTraceString(e), 1);
|
||||
Miscellaneous.messageBox(context.getString(R.string.error), context.getString(R.string.elementSkipped), context).show();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -814,7 +838,6 @@ public class XmlFileInterface
|
||||
return (triggerCollection);
|
||||
}
|
||||
|
||||
|
||||
private static Trigger readTrigger(XmlPullParser parser) throws IOException, XmlPullParserException
|
||||
{
|
||||
|
||||
@ -866,7 +889,7 @@ public class XmlFileInterface
|
||||
{
|
||||
String triggerEventString = readTag(parser, "TriggerEvent");
|
||||
|
||||
if(triggerEventString.equals("process_started_stopped") | triggerEventString.equals("process_running"))
|
||||
if(triggerEventString.equals("process_started_stopped") || triggerEventString.equals("process_running"))
|
||||
newTrigger.setTriggerType(Trigger_Enum.process_started_stopped);
|
||||
else
|
||||
newTrigger.setTriggerType(Trigger_Enum.valueOf(triggerEventString));
|
||||
@ -916,7 +939,6 @@ public class XmlFileInterface
|
||||
}
|
||||
else if(newTrigger.getTriggerType() == Trigger_Enum.wifiConnection)
|
||||
{
|
||||
// newTrigger.setWifiName(triggerParameter2);
|
||||
newTrigger.setTriggerParameter2(triggerParameter2);
|
||||
}
|
||||
else if(newTrigger.getTriggerType() == Trigger_Enum.process_started_stopped)
|
||||
@ -1039,7 +1061,15 @@ public class XmlFileInterface
|
||||
// Starts by looking for the entry tag
|
||||
if (name.equals("Action"))
|
||||
{
|
||||
actionCollection.add(readAction(parser));
|
||||
try
|
||||
{
|
||||
actionCollection.add(readAction(parser));
|
||||
}
|
||||
catch (IllegalArgumentException | NullPointerException e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "XMLFileInterface", "Unknown action found in config file. File was probably created by a newer program version. Details: " + Log.getStackTraceString(e), 1);
|
||||
Miscellaneous.messageBox(context.getString(R.string.error), context.getString(R.string.elementSkipped), context).show();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1048,7 +1078,6 @@ public class XmlFileInterface
|
||||
}
|
||||
return (actionCollection);
|
||||
}
|
||||
|
||||
|
||||
private static Action readAction(XmlPullParser parser) throws IOException, XmlPullParserException
|
||||
{
|
||||
@ -1123,7 +1152,14 @@ public class XmlFileInterface
|
||||
newAction.setAction(Action_Enum.enableScreenRotation);
|
||||
else if(actionNameString.equals("disableScreenRotation"))
|
||||
newAction.setAction(Action_Enum.disableScreenRotation);
|
||||
// *** deprecated
|
||||
else if(actionNameString.equals("disableScreenRotation"))
|
||||
newAction.setAction(Action_Enum.disableScreenRotation);
|
||||
else if(actionNameString.equals("wakeupDevice"))
|
||||
{
|
||||
newAction.setAction(Action_Enum.turnScreenOnOrOff);
|
||||
newAction.setParameter1(true);
|
||||
}
|
||||
// *** deprecated
|
||||
|
||||
else
|
||||
newAction.setAction(Action_Enum.valueOf(actionNameString));
|
||||
@ -1191,6 +1227,18 @@ public class XmlFileInterface
|
||||
newAction.setParameter1(false);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.disableScreenRotation))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setDisplayRotation);
|
||||
newAction.setParameter1(false);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.turnScreenOnOrOff) && newAction.getParameter1())
|
||||
{
|
||||
/*
|
||||
If param1 == true we will keep it because this action used to be of type wakeUpDevice.
|
||||
*/
|
||||
}
|
||||
else
|
||||
// exclusion for deprecated types
|
||||
newAction.setParameter1(Boolean.parseBoolean(readTag(parser, "ActionParameter1")));
|
||||
@ -1212,7 +1260,14 @@ public class XmlFileInterface
|
||||
{
|
||||
newAction.setParameter2(tag);
|
||||
}
|
||||
}
|
||||
/*
|
||||
androidx.security.crypto.MasterKey.Builder
|
||||
|
||||
MasterKey mainKey = new MasterKey.Builder(context)
|
||||
.setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
|
||||
.build();
|
||||
*/
|
||||
}
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.startOtherActivity)) // separator has been changed, convert in old files
|
||||
{
|
||||
@ -1263,9 +1318,6 @@ public class XmlFileInterface
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Miscellaneous.logEvent("i", "New Rule from file", newPoi.name + "/" + String.valueOf(newPoi.radius) + "/" + String.valueOf(newPoi.location.getLatitude()) + "/" + String.valueOf(newPoi.location.getLongitude()) + "/" + String.valueOf(newPoi.changeWifiState) + "/" + String.valueOf(newPoi.desiredWifiState) + "/" + String.valueOf(newPoi.changeCameraState) + "/" + String.valueOf(newPoi.desiredCameraState) + "/" + String.valueOf(newPoi.changeSoundSetting) + "/" + String.valueOf(newPoi.desiredSoundSetting));
|
||||
|
||||
return newAction;
|
||||
}
|
||||
|
||||
|
@ -130,6 +130,21 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isCellLocationChangedReceiverPossible()
|
||||
{
|
||||
if(telephonyManager == null)
|
||||
telephonyManager = (TelephonyManager) AutomationService.getInstance().getSystemService(Context.TELEPHONY_SERVICE);
|
||||
|
||||
if(
|
||||
ConnectivityReceiver.isAirplaneMode(AutomationService.getInstance())
|
||||
||
|
||||
telephonyManager.getSimState() != TelephonyManager.SIM_STATE_READY
|
||||
)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
public Location getLocation(String accuracy)
|
||||
{
|
||||
Criteria crit = new Criteria();
|
||||
@ -137,7 +152,7 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
||||
String myProviderName;
|
||||
|
||||
// If privacy mode or no data connection available
|
||||
if(Settings.privacyLocationing | !ConnectivityReceiver.isDataConnectionAvailable(AutomationService.getInstance()))
|
||||
if(Settings.privacyLocationing || !ConnectivityReceiver.isDataConnectionAvailable(AutomationService.getInstance()))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "CellLocation", Miscellaneous.getAnyContext().getResources().getString(R.string.enforcingGps), 4);
|
||||
myProviderName = LocationManager.GPS_PROVIDER;
|
||||
@ -175,6 +190,9 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
||||
}
|
||||
else
|
||||
{
|
||||
if(myLocationManager == null)
|
||||
myLocationManager = (LocationManager) AutomationService.getInstance().getSystemService(Context.LOCATION_SERVICE);
|
||||
|
||||
if(!myLocationManager.isProviderEnabled(myProviderName))
|
||||
{
|
||||
if(myProviderName.equals(LocationManager.NETWORK_PROVIDER))
|
||||
@ -226,13 +244,11 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
||||
return currentLocation;
|
||||
}
|
||||
|
||||
|
||||
public void setCurrentLocation(Location currentLocation)
|
||||
{
|
||||
this.currentLocation = currentLocation;
|
||||
}
|
||||
|
||||
|
||||
public class MyLocationListener implements LocationListener
|
||||
{
|
||||
@Override
|
||||
@ -322,12 +338,12 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
||||
{
|
||||
if(telephonyManager == null)
|
||||
telephonyManager = (TelephonyManager) AutomationService.getInstance().getSystemService(Context.TELEPHONY_SERVICE);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if(!cellLocationListenerActive)
|
||||
{
|
||||
if(!ConnectivityReceiver.isAirplaneMode(AutomationService.getInstance()))
|
||||
if(!ConnectivityReceiver.isAirplaneMode(AutomationService.getInstance()) && telephonyManager.getSimState() == TelephonyManager.SIM_STATE_READY)
|
||||
{
|
||||
if(WifiBroadcastReceiver.mayCellLocationReceiverBeActivated())
|
||||
{
|
||||
@ -353,10 +369,10 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
||||
// Miscellaneous.logEvent("i", "cellReceiver", "Not starting cellLocationListener because we have no data connection.", 4);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("w", "cellReceiver", "Wanted to activate CellLocationChangedReceiver, but Wifi-Receiver says not to.", 4);
|
||||
Miscellaneous.logEvent("w", "cellReceiver", "Wanted to activate CellLocationChangedReceiver, but Wifi-Receiver says not to.", 4);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "cellReceiver", "Not starting cellLocationListener because Airplane mode is active.", 4);
|
||||
Miscellaneous.logEvent("i", "cellReceiver", "Not starting cellLocationListener because Airplane mode is active or SIM_STATE is not ready.", 4);
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
@ -409,5 +425,4 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
||||
&&
|
||||
ActivityPermissions.havePermission("android.permission.ACCESS_WIFI_STATE", Miscellaneous.getAnyContext());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -7,6 +7,7 @@ import android.location.LocationManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.Log;
|
||||
|
||||
import com.jens.automation2.ActivityMainScreen;
|
||||
@ -26,13 +27,9 @@ import java.util.Calendar;
|
||||
|
||||
public class LocationProvider
|
||||
{
|
||||
|
||||
protected static boolean passiveLocationListenerActive = false;
|
||||
|
||||
protected static LocationListener passiveLocationListener;
|
||||
|
||||
protected static LocationProvider locationProviderInstance = null;
|
||||
|
||||
protected AutomationService parentService;
|
||||
public AutomationService getParentService()
|
||||
{
|
||||
@ -109,106 +106,128 @@ public class LocationProvider
|
||||
|
||||
public void setCurrentLocation(Location newLocation, boolean skipVerification)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Location", "Setting location.", 4);
|
||||
|
||||
currentLocation = newLocation;
|
||||
currentLocationStaticCopy = newLocation;
|
||||
|
||||
Miscellaneous.logEvent("i", "LocationListener", "Giving update to POI class", 4);
|
||||
PointOfInterest.positionUpdate(newLocation, parentService, false, skipVerification);
|
||||
|
||||
try
|
||||
if(newLocation != null)
|
||||
{
|
||||
if(
|
||||
locationList.size() >= 1
|
||||
&&
|
||||
locationList.get(locationList.size()-1).getTime() == newLocation.getTime()
|
||||
&&
|
||||
locationList.get(locationList.size()-1).getProvider().equals(newLocation.getProvider())
|
||||
Miscellaneous.logEvent("i", "Location", "Setting location.", 4);
|
||||
|
||||
currentLocation = newLocation;
|
||||
currentLocationStaticCopy = newLocation;
|
||||
|
||||
Miscellaneous.logEvent("i", "LocationListener", "Giving update to POI class", 4);
|
||||
PointOfInterest.positionUpdate(newLocation, parentService, false, skipVerification);
|
||||
|
||||
try
|
||||
{
|
||||
if (
|
||||
locationList.size() >= 1
|
||||
&&
|
||||
locationList.get(locationList.size() - 1).getTime() == newLocation.getTime()
|
||||
&&
|
||||
locationList.get(locationList.size() - 1).getProvider().equals(newLocation.getProvider())
|
||||
)
|
||||
{
|
||||
// This is a duplicate update, do not store it
|
||||
Miscellaneous.logEvent("i", "LocationListener", "Duplicate location, ignoring.", 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Speed", "Commencing speed calculation.", 4);
|
||||
// This part keeps the last two location entries to determine the current speed.
|
||||
|
||||
locationList.add(newLocation);
|
||||
|
||||
if(newLocation.hasSpeed())
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Speed", "Location has speed, taking that: " + String.valueOf(newLocation.getSpeed()) + " km/h", 4);
|
||||
setSpeed(newLocation.getSpeed()); // Take the value that came with the location, that should be more precise
|
||||
// This is a duplicate update, do not store it
|
||||
Miscellaneous.logEvent("i", "LocationListener", "Duplicate location, ignoring.", 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (locationList.size() >= 2)
|
||||
Miscellaneous.logEvent("i", "Speed", "Commencing speed calculation.", 4);
|
||||
// This part keeps the last two location entries to determine the current speed.
|
||||
|
||||
locationList.add(newLocation);
|
||||
|
||||
if (newLocation.hasSpeed())
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Speed", "Trying to calculate speed based on the last locations.", 4);
|
||||
|
||||
double currentSpeed;
|
||||
long timeDifferenceInSeconds = (Math.abs(locationList.get(locationList.size() - 2).getTime() - locationList.get(locationList.size() - 1).getTime())) / 1000; //milliseconds
|
||||
if (timeDifferenceInSeconds <= Settings.speedMaximumTimeBetweenLocations * 60)
|
||||
Miscellaneous.logEvent("i", "Speed", "Location has speed, taking that: " + String.valueOf(newLocation.getSpeed()) + " km/h", 4);
|
||||
setSpeed(newLocation.getSpeed()); // Take the value that came with the location, that should be more precise
|
||||
}
|
||||
else
|
||||
{
|
||||
speedCalculation:
|
||||
if (locationList.size() >= 2)
|
||||
{
|
||||
double distanceTraveled = locationList.get(locationList.size() - 2).distanceTo(locationList.get(locationList.size() - 1)); //results in meters
|
||||
|
||||
if (timeDifferenceInSeconds == 0)
|
||||
while (locationList.size() > 2)
|
||||
{
|
||||
Miscellaneous.logEvent("w", "Speed", "No time passed since last position. Can't calculate speed here.", 4);
|
||||
return;
|
||||
// Remove all entries except for the last 2
|
||||
Miscellaneous.logEvent("i", "Speed", "About to delete oldest position record until only 2 left. Currently have " + String.valueOf(locationList.size()) + " records.", 4);
|
||||
locationList.remove(0);
|
||||
}
|
||||
|
||||
currentSpeed = distanceTraveled / timeDifferenceInSeconds * 3.6; // convert m/s --> km/h
|
||||
/*
|
||||
The two most recent locations in the list must have a usable accuracy.
|
||||
*/
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
if
|
||||
(
|
||||
(locationList.get(i).getProvider().equals(LocationManager.GPS_PROVIDER) && locationList.get(i).getAccuracy() > Settings.satisfactoryAccuracyGps)
|
||||
||
|
||||
(locationList.get(i).getProvider().equals(LocationManager.NETWORK_PROVIDER) && locationList.get(i).getAccuracy() > Settings.satisfactoryAccuracyNetwork)
|
||||
)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Speed", "Not using 2 most recent locations for speed calculation because at least one does not have a satisfactory accuracy: " + locationList.get(i).toString(), 4);
|
||||
break speedCalculation;
|
||||
}
|
||||
}
|
||||
|
||||
Miscellaneous.logEvent("i", "Speed", "Trying to calculate speed based on the last locations.", 4);
|
||||
|
||||
double currentSpeed;
|
||||
long timeDifferenceInSeconds = (Math.abs(locationList.get(locationList.size() - 2).getTime() - locationList.get(locationList.size() - 1).getTime())) / 1000; //milliseconds
|
||||
if (timeDifferenceInSeconds <= Settings.speedMaximumTimeBetweenLocations * 60)
|
||||
{
|
||||
double distanceTraveled = locationList.get(locationList.size() - 2).distanceTo(locationList.get(locationList.size() - 1)); //results in meters
|
||||
|
||||
if (timeDifferenceInSeconds == 0)
|
||||
{
|
||||
Miscellaneous.logEvent("w", "Speed", "No time passed since last position. Can't calculate speed here.", 4);
|
||||
return;
|
||||
}
|
||||
|
||||
currentSpeed = distanceTraveled / timeDifferenceInSeconds * 3.6; // convert m/s --> km/h
|
||||
|
||||
/*
|
||||
Due to strange factors the time difference might be 0 resulting in mathematical error.
|
||||
*/
|
||||
if (Double.isInfinite(currentSpeed) | Double.isNaN(currentSpeed))
|
||||
Miscellaneous.logEvent("i", "Speed", "Error while calculating speed.", 4);
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Speed", "Current speed: " + String.valueOf(currentSpeed) + " km/h", 2);
|
||||
|
||||
setSpeed(currentSpeed);
|
||||
|
||||
// execute matching rules containing speed
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesBySpeed();
|
||||
for (Rule oneRule : ruleCandidates)
|
||||
if (Double.isInfinite(currentSpeed) | Double.isNaN(currentSpeed))
|
||||
Miscellaneous.logEvent("i", "Speed", "Error while calculating speed.", 4);
|
||||
else
|
||||
{
|
||||
if (oneRule.applies(this.getParentService()))
|
||||
oneRule.activate(getParentService(), false);
|
||||
Miscellaneous.logEvent("i", "Speed", "Current speed: " + String.valueOf(currentSpeed) + " km/h", 2);
|
||||
|
||||
setSpeed(currentSpeed);
|
||||
|
||||
// execute matching rules containing speed
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.speed);
|
||||
for (Rule oneRule : ruleCandidates)
|
||||
{
|
||||
if(oneRule.getsGreenLight(this.getParentService()))
|
||||
oneRule.activate(getParentService(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "Speed", "Last two locations are too far apart in terms of time. Cannot use them for speed calculation.", 4);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "Speed", "Last two locations are too far apart in terms of time. Cannot use them for speed calculation.", 4);
|
||||
|
||||
|
||||
while (locationList.size() > 2)
|
||||
{
|
||||
// Remove all entries except for the last 2
|
||||
Miscellaneous.logEvent("i", "Speed", "About to delete oldest position record until only 2 left. Currently have " + String.valueOf(locationList.size()) + " records.", 4);
|
||||
locationList.remove(0);
|
||||
Miscellaneous.logEvent("w", "Speed", "Don't have enough values for speed calculation, yet.", 3);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("w", "Speed", "Don't have enough values for speed calculation, yet.", 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Speed", "Error during speed calculation: " + Log.getStackTraceString(e), 3);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Speed", "Error during speed calculation: " + Log.getStackTraceString(e), 3);
|
||||
}
|
||||
|
||||
AutomationService.updateNotification();
|
||||
AutomationService.updateNotification();
|
||||
|
||||
if(AutomationService.isMainActivityRunning(parentService))
|
||||
ActivityMainScreen.updateMainScreen();
|
||||
if (AutomationService.isMainActivityRunning(parentService))
|
||||
ActivityMainScreen.updateMainScreen();
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("w", "Location", "New location given is null. Ignoring.", 5);
|
||||
}
|
||||
|
||||
public void startLocationService()
|
||||
@ -227,13 +246,37 @@ public class LocationProvider
|
||||
|
||||
if(Settings.positioningEngine == 0)
|
||||
{
|
||||
// startCellLocationChangedReceiver
|
||||
if (!ConnectivityReceiver.isAirplaneMode(this.parentService) && WifiBroadcastReceiver.mayCellLocationReceiverBeActivated() && (Rule.isAnyRuleUsing(Trigger_Enum.pointOfInterest) | Rule.isAnyRuleUsing(Trigger_Enum.speed)))
|
||||
CellLocationChangedReceiver.startCellLocationChangedReceiver();
|
||||
|
||||
// startPassiveLocationListener
|
||||
if(Rule.isAnyRuleUsing(Trigger_Enum.pointOfInterest) | Rule.isAnyRuleUsing(Trigger_Enum.speed))
|
||||
{
|
||||
// TelephonyManager telephonyManager = (TelephonyManager) AutomationService.getInstance().getSystemService(Context.TELEPHONY_SERVICE);
|
||||
|
||||
// startCellLocationChangedReceiver
|
||||
if (CellLocationChangedReceiver.isCellLocationChangedReceiverPossible())
|
||||
{
|
||||
if (WifiBroadcastReceiver.mayCellLocationReceiverBeActivated())
|
||||
CellLocationChangedReceiver.startCellLocationChangedReceiver();
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
Reasons why we may end up here:
|
||||
- Airplane mode is active
|
||||
- No phone module present (pure wifi device)
|
||||
- No SIM card is inserted or it's not unlocked
|
||||
|
||||
We'd have to try GPS now to get an initial position.
|
||||
For permanent use there is no way we could know when it
|
||||
would make sense to check the position again.
|
||||
*/
|
||||
|
||||
// Trigger a one-time-position-search
|
||||
Location loc = CellLocationChangedReceiver.getInstance().getLocation("fine");
|
||||
LocationProvider.getInstance().setCurrentLocation(loc, true);
|
||||
}
|
||||
|
||||
// startPassiveLocationListener
|
||||
startPassiveLocationListener();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -489,18 +532,10 @@ public class LocationProvider
|
||||
{
|
||||
// time is up, no cell location updates since x minutes, start accelerometer
|
||||
String text = "Timer triggered. Based on the last location and speed we may be at a POI. Forcing location update in case CellLocationChangedReceiver didn\'t fire.";
|
||||
// Miscellaneous.logEvent("i", "AccelerometerHandler", text, 5);
|
||||
// CellLocationChangedReceiver.stopCellLocationChangedReceiver();
|
||||
// startAccelerometerReceiver();
|
||||
|
||||
Location currentLocation = CellLocationChangedReceiver.getInstance().getLocation("coarse");
|
||||
AutomationService.getInstance().getLocationProvider().setCurrentLocation(currentLocation, false);
|
||||
}
|
||||
/*else if(msg.what == 0)
|
||||
{
|
||||
String text = "Abort command received, deactivating SpeedReceiver";
|
||||
Miscellaneous.logEvent("i", "SpeedHandler", text, 4);
|
||||
stopAccelerometerReceiver();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
@ -16,6 +16,7 @@ import com.jens.automation2.PointOfInterest;
|
||||
import com.jens.automation2.R;
|
||||
import com.jens.automation2.Rule;
|
||||
import com.jens.automation2.Settings;
|
||||
import com.jens.automation2.Trigger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -144,10 +145,10 @@ public class WifiBroadcastReceiver extends BroadcastReceiver
|
||||
|
||||
public static void findRules(AutomationService automationServiceInstance)
|
||||
{
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByWifiConnection();
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.wifiConnection);
|
||||
for(Rule oneRule : ruleCandidates)
|
||||
{
|
||||
if(oneRule.applies(automationServiceInstance))
|
||||
if(oneRule.getsGreenLight(automationServiceInstance))
|
||||
oneRule.activate(automationServiceInstance, false);
|
||||
}
|
||||
}
|
||||
|
@ -1,301 +0,0 @@
|
||||
package com.jens.automation2.receivers;
|
||||
|
||||
import android.app.AlarmManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.jens.automation2.AutomationService;
|
||||
import com.jens.automation2.Miscellaneous;
|
||||
import com.jens.automation2.Rule;
|
||||
import com.jens.automation2.Trigger;
|
||||
import com.jens.automation2.Trigger.Trigger_Enum;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
public class AlarmListener extends BroadcastReceiver implements AutomationListenerInterface
|
||||
{
|
||||
private static AutomationService automationServiceRef;
|
||||
private static AlarmManager centralAlarmManagerInstance;
|
||||
// private static Intent alarmIntent;
|
||||
// private static PendingIntent alarmPendingIntent;
|
||||
private static boolean alarmListenerActive=false;
|
||||
private static ArrayList<Long> alarmCandidates = new ArrayList<Long>();
|
||||
|
||||
private static ArrayList<Integer> requestCodeList = new ArrayList<Integer>();
|
||||
|
||||
public static void startAlarmListener(final AutomationService automationServiceRef)
|
||||
{
|
||||
AlarmListener.startAlarmListenerInternal(automationServiceRef);
|
||||
}
|
||||
public static void stopAlarmListener(Context context)
|
||||
{
|
||||
AlarmListener.stopAlarmListenerInternal();
|
||||
}
|
||||
|
||||
public static boolean isAlarmListenerActive()
|
||||
{
|
||||
return alarmListenerActive;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Alarm received", 2);
|
||||
Date now = new Date();
|
||||
String timeString = String.valueOf(now.getHours()) + ":" + String.valueOf(now.getMinutes()) + ":" + String.valueOf(now.getSeconds());
|
||||
Time passTime = Time.valueOf(timeString);
|
||||
|
||||
ArrayList<Rule> allRulesWithNowInTimeFrame = Rule.findRuleCandidatesByTime(passTime);
|
||||
for(int i=0; i<allRulesWithNowInTimeFrame.size(); i++)
|
||||
{
|
||||
if(allRulesWithNowInTimeFrame.get(i).applies(context))
|
||||
allRulesWithNowInTimeFrame.get(i).activate(automationServiceRef, false);
|
||||
}
|
||||
|
||||
setAlarms();
|
||||
}
|
||||
|
||||
public static void setAlarms()
|
||||
{
|
||||
alarmCandidates.clear();
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("E dd.MM.yyyy HH:mm");
|
||||
|
||||
clearAlarms();
|
||||
|
||||
int i=0;
|
||||
|
||||
// // get a Calendar object with current time
|
||||
// Calendar cal = Calendar.getInstance();
|
||||
// // add 5 minutes to the calendar object
|
||||
// cal.add(Calendar.SECOND, 10);
|
||||
// String calSetWorkingCopyString2 = null;
|
||||
// SimpleDateFormat sdf2 = new SimpleDateFormat("E dd.MM.yyyy HH:mm");
|
||||
// if (cal != null)
|
||||
// {
|
||||
// calSetWorkingCopyString2 = sdf2.format(cal.getTime());
|
||||
// }
|
||||
// Miscellaneous.logEvent("i", "AlarmManager", "Setting repeating alarm because of hardcoded test: beginning at " + calSetWorkingCopyString2);
|
||||
// Intent alarmIntent2 = new Intent(automationServiceRef, AlarmListener.class);
|
||||
// PendingIntent alarmPendingIntent2 = PendingIntent.getBroadcast(automationServiceRef, 0, alarmIntent2, 0);
|
||||
// centralAlarmManagerInstance.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 5000, alarmPendingIntent2);
|
||||
// requestCodeList.add(0);
|
||||
|
||||
ArrayList<Rule> allRulesWithTimeFrames = new ArrayList<Rule>();
|
||||
allRulesWithTimeFrames = Rule.findRuleCandidatesByTimeFrame();
|
||||
for(Rule oneRule : allRulesWithTimeFrames)
|
||||
{
|
||||
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||
{
|
||||
if(oneTrigger.getTriggerType() == Trigger_Enum.timeFrame)
|
||||
{
|
||||
Calendar calNow, calSet;
|
||||
Time setTime;
|
||||
|
||||
if(oneTrigger.getTriggerParameter())
|
||||
setTime = oneTrigger.getTimeFrame().getTriggerTimeStart();
|
||||
else
|
||||
setTime = oneTrigger.getTimeFrame().getTriggerTimeStop();
|
||||
|
||||
calNow = Calendar.getInstance();
|
||||
calSet = (Calendar) calNow.clone();
|
||||
calSet.set(Calendar.HOUR_OF_DAY, setTime.getHours());
|
||||
calSet.set(Calendar.MINUTE, setTime.getMinutes());
|
||||
calSet.set(Calendar.SECOND, 0);
|
||||
calSet.set(Calendar.MILLISECOND, 0);
|
||||
// At this point calSet would be a scheduling candidate. It's just the day the might not be right, yet.
|
||||
|
||||
long milliSecondsInAWeek = 1000 * 60 * 60 * 24 * 7;
|
||||
|
||||
for(int dayOfWeek : oneTrigger.getTimeFrame().getDayList())
|
||||
{
|
||||
Calendar calSetWorkingCopy = (Calendar) calSet.clone();
|
||||
|
||||
// calSetWorkingCopy.set(Calendar.HOUR_OF_DAY, setTime.getHours());
|
||||
// calSetWorkingCopy.set(Calendar.MINUTE, setTime.getMinutes());
|
||||
// calSetWorkingCopy.set(Calendar.SECOND, 0);
|
||||
// calSetWorkingCopy.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
int diff = dayOfWeek - calNow.get(Calendar.DAY_OF_WEEK);
|
||||
// Log.i("AlarmManager", "Today: " + String.valueOf(calNow.get(Calendar.DAY_OF_WEEK)) + " / Sched.Day: " + String.valueOf(dayOfWeek) + " Difference to target day is: " + String.valueOf(diff));
|
||||
if(diff == 0) //if we're talking about the current day, is the time still in the future?
|
||||
{
|
||||
if(calSetWorkingCopy.getTime().getHours() < calNow.getTime().getHours())
|
||||
{
|
||||
// Log.i("AlarmManager", "calSetWorkingCopy.getTime().getHours(" + String.valueOf(calSetWorkingCopy.getTime().getHours()) + ") < calNow.getTime().getHours(" + String.valueOf(calNow.getTime().getHours()) + ")");
|
||||
calSetWorkingCopy.add(Calendar.DAY_OF_MONTH, 7); //add a week
|
||||
}
|
||||
else if(calSetWorkingCopy.getTime().getHours() == calNow.getTime().getHours())
|
||||
{
|
||||
// Log.i("AlarmManager", "calSetWorkingCopy.getTime().getHours() == calNow.getTime().getHours()");
|
||||
if(calSetWorkingCopy.getTime().getMinutes() <= calNow.getTime().getMinutes())
|
||||
{
|
||||
// Log.i("AlarmManager", "calSetWorkingCopy.getTime().getMinutes() < calNow.getTime().getMinutes()");
|
||||
calSetWorkingCopy.add(Calendar.DAY_OF_MONTH, 7); //add a week
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(diff < 0)
|
||||
{
|
||||
// Miscellaneous.logEvent("i", "AlarmManager", "Adding " + String.valueOf(diff+7) + " on top of " + String.valueOf(calSetWorkingCopy.get(Calendar.DAY_OF_WEEK)));
|
||||
calSetWorkingCopy.add(Calendar.DAY_OF_WEEK, diff+7); // it's a past weekday, schedule for next week
|
||||
}
|
||||
else
|
||||
{
|
||||
// Miscellaneous.logEvent("i", "AlarmManager", "Adding " + String.valueOf(diff) + " on top of " + String.valueOf(calSetWorkingCopy.get(Calendar.DAY_OF_WEEK)));
|
||||
calSetWorkingCopy.add(Calendar.DAY_OF_WEEK, diff); // it's a future weekday, schedule for that day
|
||||
}
|
||||
|
||||
i++;
|
||||
i=(int)System.currentTimeMillis();
|
||||
String calSetWorkingCopyString = sdf.format(calSetWorkingCopy.getTime()) + " RequestCode: " + String.valueOf(i);
|
||||
// Miscellaneous.logEvent("i", "AlarmManager", "Setting repeating alarm because of rule: " + oneRule.getName() + " beginning at " + calSetWorkingCopyString);
|
||||
|
||||
alarmCandidates.add(calSetWorkingCopy.getTimeInMillis());
|
||||
// Intent alarmIntent = new Intent(automationServiceRef, AlarmListener.class);
|
||||
// alarmIntent.setData(Uri.parse("myalarms://" + i));
|
||||
// PendingIntent alarmPendingIntent = PendingIntent.getBroadcast(automationServiceRef, i, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
// centralAlarmManagerInstance.setInexactRepeating(AlarmManager.RTC_WAKEUP, calSetWorkingCopy.getTimeInMillis(), milliSecondsInAWeek, alarmPendingIntent);
|
||||
// requestCodeList.add(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// // get a Calendar object with current time
|
||||
// Calendar cal = Calendar.getInstance();
|
||||
// cal.add(Calendar.SECOND, 10);
|
||||
// String calSetWorkingCopyString2 = sdf.format(cal.getTime());
|
||||
// Miscellaneous.logEvent("i", "AlarmManager", "Setting repeating alarm because of hardcoded test: beginning at " + calSetWorkingCopyString2);
|
||||
// Intent alarmIntent2 = new Intent(automationServiceRef, AlarmListener.class);
|
||||
// PendingIntent alarmPendingIntent2 = PendingIntent.getBroadcast(automationServiceRef, 0, alarmIntent2, 0);
|
||||
// centralAlarmManagerInstance.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 5000, alarmPendingIntent2);
|
||||
// requestCodeList.add(0);
|
||||
|
||||
scheduleNextAlarm();
|
||||
}
|
||||
|
||||
private static void scheduleNextAlarm()
|
||||
{
|
||||
Long currentTime = System.currentTimeMillis();
|
||||
Long scheduleCandidate = null;
|
||||
|
||||
if(alarmCandidates.size() == 0)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmManager", "No alarms to be scheduled.", 3);
|
||||
return;
|
||||
}
|
||||
else if(alarmCandidates.size() == 1)
|
||||
{
|
||||
// only one alarm, schedule that
|
||||
scheduleCandidate = alarmCandidates.get(0);
|
||||
}
|
||||
else if(alarmCandidates.size() > 1)
|
||||
{
|
||||
scheduleCandidate = alarmCandidates.get(0);
|
||||
|
||||
for(long alarmCandidate : alarmCandidates)
|
||||
{
|
||||
if(Math.abs(currentTime - alarmCandidate) < Math.abs(currentTime - scheduleCandidate))
|
||||
scheduleCandidate = alarmCandidate;
|
||||
}
|
||||
}
|
||||
|
||||
Intent alarmIntent = new Intent(automationServiceRef, AlarmListener.class);
|
||||
PendingIntent alarmPendingIntent = PendingIntent.getBroadcast(automationServiceRef, 0, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
centralAlarmManagerInstance.set(AlarmManager.RTC_WAKEUP, scheduleCandidate, alarmPendingIntent);
|
||||
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("E dd.MM.yyyy HH:mm");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(scheduleCandidate);
|
||||
Miscellaneous.logEvent("i", "AlarmManager", "Chose " + sdf.format(calendar.getTime()) + " as next scheduled alarm.", 4);
|
||||
|
||||
}
|
||||
|
||||
public static void clearAlarms()
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmManager", "Clearing possibly standing alarms.", 4);
|
||||
for(int requestCode : requestCodeList)
|
||||
{
|
||||
Intent alarmIntent = new Intent(automationServiceRef, AlarmListener.class);
|
||||
PendingIntent alarmPendingIntent = PendingIntent.getBroadcast(automationServiceRef, requestCode, alarmIntent, 0);
|
||||
// Miscellaneous.logEvent("i", "AlarmManager", "Clearing alarm with request code: " + String.valueOf(requestCode));
|
||||
centralAlarmManagerInstance.cancel(alarmPendingIntent);
|
||||
}
|
||||
requestCodeList.clear();
|
||||
}
|
||||
|
||||
private static void startAlarmListenerInternal(AutomationService givenAutomationServiceRef)
|
||||
{
|
||||
if(!alarmListenerActive)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Starting alarm listener.", 4);
|
||||
AlarmListener.automationServiceRef = givenAutomationServiceRef;
|
||||
centralAlarmManagerInstance = (AlarmManager)automationServiceRef.getSystemService(automationServiceRef.ALARM_SERVICE);
|
||||
// alarmIntent = new Intent(automationServiceRef, AlarmListener.class);
|
||||
// alarmPendingIntent = PendingIntent.getBroadcast(automationServiceRef, 0, alarmIntent, 0);
|
||||
alarmListenerActive = true;
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Alarm listener started.", 4);
|
||||
AlarmListener.setAlarms();
|
||||
|
||||
// // get a Calendar object with current time
|
||||
// Calendar cal = Calendar.getInstance();
|
||||
// // add 5 minutes to the calendar object
|
||||
// cal.add(Calendar.SECOND, 10);
|
||||
// centralAlarmManagerInstance.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 5000, alarmPendingIntent);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Request to start AlarmListener. But it's already active.", 5);
|
||||
}
|
||||
|
||||
private static void stopAlarmListenerInternal()
|
||||
{
|
||||
if(alarmListenerActive)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Stopping alarm listener.", 4);
|
||||
clearAlarms();
|
||||
// centralAlarmManagerInstance.cancel(alarmPendingIntent);
|
||||
alarmListenerActive = false;
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Request to stop AlarmListener. But it's not running.", 5);
|
||||
}
|
||||
public static void reloadAlarms()
|
||||
{
|
||||
AlarmListener.setAlarms();
|
||||
}
|
||||
@Override
|
||||
public void startListener(AutomationService automationService)
|
||||
{
|
||||
AlarmListener.startAlarmListener(automationService);
|
||||
}
|
||||
@Override
|
||||
public void stopListener(AutomationService automationService)
|
||||
{
|
||||
AlarmListener.stopAlarmListener(automationService);
|
||||
}
|
||||
|
||||
public static boolean haveAllPermission()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isListenerRunning()
|
||||
{
|
||||
return isAlarmListenerActive();
|
||||
}
|
||||
@Override
|
||||
public Trigger_Enum[] getMonitoredTrigger()
|
||||
{
|
||||
return new Trigger_Enum[] { Trigger_Enum.timeFrame };
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.jens.automation2.receivers;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -18,7 +19,7 @@ import java.util.ArrayList;
|
||||
|
||||
public class BatteryReceiver extends BroadcastReceiver implements AutomationListenerInterface
|
||||
{
|
||||
private static int batteryLevel=-1; // initialize with a better value than this
|
||||
private static int batteryLevel = -1; // initialize with a better value than this
|
||||
public static AutomationService automationServiceRef = null;
|
||||
private static boolean usbHostConnected = false;
|
||||
|
||||
@ -26,6 +27,7 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
||||
private static IntentFilter batteryIntentFilter = null;
|
||||
private static Intent batteryStatus = null;
|
||||
private static BroadcastReceiver batteryInfoReceiverInstance = null;
|
||||
|
||||
public static void startBatteryReceiver(final AutomationService automationServiceRef)
|
||||
{
|
||||
if(!batteryReceiverActive)
|
||||
@ -78,11 +80,11 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
||||
return batteryLevel;
|
||||
}
|
||||
|
||||
private static int deviceIsCharging = 0; //0=unknown, 1=no, 2=yes
|
||||
private static int currentChargingState = 0; //0=unknown, 1=no, 2=yes
|
||||
|
||||
public static int getDeviceIsCharging()
|
||||
public static int getCurrentChargingState()
|
||||
{
|
||||
return deviceIsCharging;
|
||||
return currentChargingState;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -145,31 +147,6 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
||||
this.actionDischarging(context);
|
||||
break;
|
||||
}
|
||||
// }
|
||||
// else if(intent.getAction().equals(Intent.ACTION_POWER_CONNECTED))
|
||||
// {
|
||||
//// Miscellaneous.logEvent("i", "BatteryReceiver", "Battery is charging or full.");
|
||||
// deviceIsCharging = 2;
|
||||
// //activate rule(s)
|
||||
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByCharging(true);
|
||||
// for(int i=0; i<ruleCandidates.size(); i++)
|
||||
// {
|
||||
// if(ruleCandidates.get(i).applies(context))
|
||||
// ruleCandidates.get(i).activate(locationProviderRef.getParentService());
|
||||
// }
|
||||
// }
|
||||
// else if(intent.getAction().equals(Intent.ACTION_POWER_DISCONNECTED))
|
||||
// {
|
||||
//// Miscellaneous.logEvent("i", "BatteryReceiver", "Battery is discharging.");
|
||||
// deviceIsCharging = 1;
|
||||
// //activate rule(s)
|
||||
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByCharging(false);
|
||||
// for(int i=0; i<ruleCandidates.size(); i++)
|
||||
// {
|
||||
// if(ruleCandidates.get(i).applies(context))
|
||||
// ruleCandidates.get(i).activate(locationProviderRef.getParentService());
|
||||
// }
|
||||
// }
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
@ -180,7 +157,7 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
||||
|
||||
public static int isDeviceCharging(Context context)
|
||||
{
|
||||
switch(deviceIsCharging)
|
||||
switch(currentChargingState)
|
||||
{
|
||||
case 0:
|
||||
Miscellaneous.logEvent("w", "ChargingInfo", "Status of device charging was requested. Information isn't available, yet.", 4);
|
||||
@ -188,25 +165,26 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
||||
case 1:
|
||||
Miscellaneous.logEvent("i", "ChargingInfo", "Status of device charging was requested. Device is discharging.", 3);
|
||||
break;
|
||||
case 2:
|
||||
case BatteryManager.BATTERY_STATUS_CHARGING:
|
||||
Miscellaneous.logEvent("i", "ChargingInfo", "Status of device charging was requested. Device is charging.", 3);
|
||||
break;
|
||||
}
|
||||
|
||||
return deviceIsCharging;
|
||||
return currentChargingState;
|
||||
}
|
||||
|
||||
private void actionCharging(Context context)
|
||||
{
|
||||
if(deviceIsCharging != 2) // Avoid flooding the log. This event will occur on a regular basis even though charging state wasn't changed.
|
||||
if(currentChargingState != BatteryManager.BATTERY_STATUS_CHARGING) // Avoid flooding the log. This event will occur on a regular basis even though charging state wasn't changed.
|
||||
{
|
||||
Miscellaneous.logEvent("i", "BatteryReceiver", "Battery is charging or full.", 3);
|
||||
deviceIsCharging = 2;
|
||||
currentChargingState = BatteryManager.BATTERY_STATUS_CHARGING;
|
||||
//activate rule(s)
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByCharging(true);
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.charging);
|
||||
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByCharging(true);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).applies(context))
|
||||
if(ruleCandidates.get(i).getsGreenLight(context))
|
||||
ruleCandidates.get(i).activate(automationServiceRef, false);
|
||||
}
|
||||
}
|
||||
@ -216,25 +194,26 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
||||
{
|
||||
Miscellaneous.logEvent("i", "BatteryReceiver", "Battery level has changed.", 3);
|
||||
//activate rule(s)
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByBatteryLevel();
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.batteryLevel);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).applies(context))
|
||||
if(ruleCandidates.get(i).getsGreenLight(context))
|
||||
ruleCandidates.get(i).activate(automationServiceRef, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void actionDischarging(Context context)
|
||||
{
|
||||
if(deviceIsCharging != 1) // Avoid flooding the log. This event will occur on a regular basis even though charging state wasn't changed.
|
||||
if(currentChargingState != BatteryManager.BATTERY_STATUS_UNKNOWN) // Avoid flooding the log. This event will occur on a regular basis even though charging state wasn't changed.
|
||||
{
|
||||
Miscellaneous.logEvent("i", "BatteryReceiver", "Battery is discharging.", 3);
|
||||
deviceIsCharging = 1;
|
||||
currentChargingState = BatteryManager.BATTERY_STATUS_UNKNOWN;
|
||||
//activate rule(s)
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByCharging(false);
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.charging);
|
||||
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByCharging(false);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).applies(context))
|
||||
if(ruleCandidates.get(i).getsGreenLight(context))
|
||||
ruleCandidates.get(i).activate(automationServiceRef, false);
|
||||
}
|
||||
|
||||
@ -253,11 +232,12 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
||||
usbHostConnected = true;
|
||||
Miscellaneous.logEvent("i", "BatteryReceiver", "Connected to computer.", 3);
|
||||
Toast.makeText(context, "Connected to computer.", Toast.LENGTH_LONG).show();
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByUsbHost(true);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.usb_host_connection);
|
||||
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByUsbHost(true);
|
||||
for(Rule oneRule : ruleCandidates)
|
||||
{
|
||||
if(oneRule.applies(context))
|
||||
if(oneRule.getsGreenLight(context))
|
||||
oneRule.activate(automationServiceRef, false);
|
||||
}
|
||||
|
||||
@ -274,11 +254,12 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
||||
usbHostConnected = false;
|
||||
Miscellaneous.logEvent("i", "BatteryReceiver", "Disconnected from computer.", 3);
|
||||
Toast.makeText(context, "Disconnected from computer.", Toast.LENGTH_LONG).show();
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByUsbHost(false);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.usb_host_connection);
|
||||
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByUsbHost(false);
|
||||
for(Rule oneRule : ruleCandidates)
|
||||
{
|
||||
if(oneRule.applies(context))
|
||||
if(oneRule.getsGreenLight(context))
|
||||
oneRule.activate(automationServiceRef, false);
|
||||
}
|
||||
}
|
||||
@ -296,8 +277,8 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
||||
|
||||
public static boolean haveAllPermission()
|
||||
{
|
||||
return ActivityPermissions.havePermission("android.permission.READ_PHONE_STATE", Miscellaneous.getAnyContext()) &&
|
||||
ActivityPermissions.havePermission("android.permission.BATTERY_STATS", Miscellaneous.getAnyContext());
|
||||
return ActivityPermissions.havePermission(Manifest.permission.READ_PHONE_STATE, Miscellaneous.getAnyContext()) &&
|
||||
ActivityPermissions.havePermission(Manifest.permission.BATTERY_STATS, Miscellaneous.getAnyContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -124,10 +124,10 @@ public class BluetoothReceiver extends BroadcastReceiver implements AutomationLi
|
||||
Miscellaneous.logEvent("i", "BluetoothReceiver", String.format(context.getResources().getString(R.string.bluetoothDeviceInRange), bluetoothDevice.getName()), 3);
|
||||
}
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByBluetoothConnection();
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.bluetoothConnection);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).applies(AutomationService.getInstance()))
|
||||
if(ruleCandidates.get(i).getsGreenLight(AutomationService.getInstance()))
|
||||
ruleCandidates.get(i).activate(AutomationService.getInstance(), false);
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class ConnectivityReceiver extends BroadcastReceiver implements Automatio
|
||||
@SuppressLint("NewApi")
|
||||
public static boolean isAirplaneMode(Context context)
|
||||
{
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1)
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1)
|
||||
{
|
||||
int value = android.provider.Settings.System.getInt(context.getContentResolver(), android.provider.Settings.System.AIRPLANE_MODE_ON, 0);
|
||||
return value != 0;
|
||||
@ -138,10 +138,11 @@ public class ConnectivityReceiver extends BroadcastReceiver implements Automatio
|
||||
boolean isAirplaneMode = isAirplaneMode(context);
|
||||
automationServiceRef.getLocationProvider().handleAirplaneMode(isAirplaneMode);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByAirplaneMode(isAirplaneMode);
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.airplaneMode);
|
||||
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByAirplaneMode(isAirplaneMode);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).applies(automationServiceRef))
|
||||
if(ruleCandidates.get(i).getsGreenLight(automationServiceRef))
|
||||
ruleCandidates.get(i).activate(automationServiceRef, false);
|
||||
}
|
||||
}
|
||||
@ -170,11 +171,12 @@ public class ConnectivityReceiver extends BroadcastReceiver implements Automatio
|
||||
roamingLastState = isRoaming;
|
||||
|
||||
automationServiceRef.getLocationProvider().handleRoaming(isRoaming);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByRoaming(isRoaming);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.roaming);
|
||||
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByRoaming(isRoaming);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).applies(automationServiceRef))
|
||||
if(ruleCandidates.get(i).getsGreenLight(automationServiceRef))
|
||||
ruleCandidates.get(i).activate(automationServiceRef, false);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,433 @@
|
||||
package com.jens.automation2.receivers;
|
||||
|
||||
import android.app.AlarmManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.jens.automation2.AutomationService;
|
||||
import com.jens.automation2.Miscellaneous;
|
||||
import com.jens.automation2.Rule;
|
||||
import com.jens.automation2.TimeFrame;
|
||||
import com.jens.automation2.Trigger;
|
||||
import com.jens.automation2.Trigger.Trigger_Enum;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
public class DateTimeListener extends BroadcastReceiver implements AutomationListenerInterface
|
||||
{
|
||||
private static AutomationService automationServiceRef;
|
||||
private static AlarmManager centralAlarmManagerInstance;
|
||||
// private static Intent alarmIntent;
|
||||
// private static PendingIntent alarmPendingIntent;
|
||||
private static boolean alarmListenerActive=false;
|
||||
private static ArrayList<ScheduleElement> alarmCandidates = new ArrayList<>();
|
||||
|
||||
private static ArrayList<Integer> requestCodeList = new ArrayList<Integer>();
|
||||
|
||||
public static void startAlarmListener(final AutomationService automationServiceRef)
|
||||
{
|
||||
DateTimeListener.startAlarmListenerInternal(automationServiceRef);
|
||||
}
|
||||
public static void stopAlarmListener(Context context)
|
||||
{
|
||||
DateTimeListener.stopAlarmListenerInternal();
|
||||
}
|
||||
|
||||
public static boolean isAlarmListenerActive()
|
||||
{
|
||||
return alarmListenerActive;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Alarm received", 2);
|
||||
Date now = new Date();
|
||||
String timeString = String.valueOf(now.getHours()) + ":" + String.valueOf(now.getMinutes()) + ":" + String.valueOf(now.getSeconds());
|
||||
Time passTime = Time.valueOf(timeString);
|
||||
|
||||
ArrayList<Rule> allRulesWithNowInTimeFrame = Rule.findRuleCandidates(Trigger_Enum.timeFrame);
|
||||
// ArrayList<Rule> allRulesWithNowInTimeFrame = Rule.findRuleCandidatesByTime(passTime);
|
||||
for(int i=0; i<allRulesWithNowInTimeFrame.size(); i++)
|
||||
{
|
||||
if(allRulesWithNowInTimeFrame.get(i).getsGreenLight(context))
|
||||
allRulesWithNowInTimeFrame.get(i).activate(automationServiceRef, false);
|
||||
}
|
||||
|
||||
setAlarms();
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
||||
public static void setAlarms()
|
||||
{
|
||||
alarmCandidates.clear();
|
||||
|
||||
Calendar calNow = Calendar.getInstance();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("E dd.MM.yyyy HH:mm");
|
||||
|
||||
clearAlarms();
|
||||
|
||||
int i=0;
|
||||
|
||||
// // get a Calendar object with current time
|
||||
// Calendar cal = Calendar.getInstance();
|
||||
// // add 5 minutes to the calendar object
|
||||
// cal.add(Calendar.SECOND, 10);
|
||||
// String calSetWorkingCopyString2 = null;
|
||||
// SimpleDateFormat sdf2 = new SimpleDateFormat("E dd.MM.yyyy HH:mm");
|
||||
// if (cal != null)
|
||||
// {
|
||||
// calSetWorkingCopyString2 = sdf2.format(cal.getTime());
|
||||
// }
|
||||
// Miscellaneous.logEvent("i", "AlarmManager", "Setting repeating alarm because of hardcoded test: beginning at " + calSetWorkingCopyString2);
|
||||
// Intent alarmIntent2 = new Intent(automationServiceRef, AlarmListener.class);
|
||||
// PendingIntent alarmPendingIntent2 = PendingIntent.getBroadcast(automationServiceRef, 0, alarmIntent2, 0);
|
||||
// centralAlarmManagerInstance.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 5000, alarmPendingIntent2);
|
||||
// requestCodeList.add(0);
|
||||
|
||||
ArrayList<Rule> allRulesWithTimeFrames = new ArrayList<Rule>();
|
||||
allRulesWithTimeFrames = Rule.findRuleCandidates(Trigger_Enum.timeFrame);
|
||||
// allRulesWithTimeFrames = Rule.findRuleCandidatesByTimeFrame();
|
||||
/*
|
||||
* Take care of regular executions, no repetitions in between.
|
||||
*/
|
||||
Miscellaneous.logEvent("i", "DateTimeListener", "Checking rules for single run alarm candidates.", 5);
|
||||
for(Rule oneRule : allRulesWithTimeFrames)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "DateTimeListener","Checking rule " + oneRule.getName() + " for single run alarm candidates.", 5);
|
||||
if(oneRule.isRuleActive())
|
||||
{
|
||||
try
|
||||
{
|
||||
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||
{
|
||||
Miscellaneous.logEvent("i", "DateTimeListener","Checking trigger " + oneTrigger.toString() + " for single run alarm candidates.", 5);
|
||||
|
||||
if(oneTrigger.getTriggerType().equals(Trigger_Enum.timeFrame))
|
||||
{
|
||||
TimeFrame tf = new TimeFrame(oneTrigger.getTriggerParameter2());
|
||||
|
||||
Calendar calSet;
|
||||
Time setTime;
|
||||
|
||||
if(oneTrigger.getTriggerParameter())
|
||||
setTime = tf.getTriggerTimeStart();
|
||||
else
|
||||
setTime = tf.getTriggerTimeStop();
|
||||
|
||||
calSet = (Calendar) calNow.clone();
|
||||
calSet.set(Calendar.HOUR_OF_DAY, setTime.getHours());
|
||||
calSet.set(Calendar.MINUTE, setTime.getMinutes());
|
||||
calSet.set(Calendar.SECOND, 0);
|
||||
calSet.set(Calendar.MILLISECOND, 0);
|
||||
// At this point calSet would be a scheduling candidate. It's just the day that might not be right, yet.
|
||||
|
||||
for(int dayOfWeek : tf.getDayList())
|
||||
{
|
||||
Calendar calSetWorkingCopy = (Calendar) calSet.clone();
|
||||
|
||||
int diff = dayOfWeek - calNow.get(Calendar.DAY_OF_WEEK);
|
||||
if(diff == 0) // We're talking about the current weekday, but is the time still in the future?
|
||||
{
|
||||
if(calSetWorkingCopy.getTime().getHours() < calNow.getTime().getHours())
|
||||
{
|
||||
calSetWorkingCopy.add(Calendar.DAY_OF_MONTH, 7); //add a week
|
||||
}
|
||||
else if(calSetWorkingCopy.getTime().getHours() == calNow.getTime().getHours())
|
||||
{
|
||||
if(calSetWorkingCopy.getTime().getMinutes() <= calNow.getTime().getMinutes())
|
||||
{
|
||||
calSetWorkingCopy.add(Calendar.DAY_OF_MONTH, 7); //add a week
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(diff < 0)
|
||||
{
|
||||
calSetWorkingCopy.add(Calendar.DAY_OF_WEEK, diff+7); // it's a past weekday, schedule for next week
|
||||
}
|
||||
else
|
||||
{
|
||||
calSetWorkingCopy.add(Calendar.DAY_OF_WEEK, diff); // it's a future weekday, schedule for that day
|
||||
}
|
||||
|
||||
i++;
|
||||
i=(int)System.currentTimeMillis();
|
||||
sdf.format(calSetWorkingCopy.getTime());
|
||||
String.valueOf(i);
|
||||
|
||||
alarmCandidates.add(new ScheduleElement(calSetWorkingCopy, "Rule " + oneRule.getName() + ", trigger " + oneTrigger.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "DateTimeListener","Error checking anything for rule " + oneRule.toString() + " needs to be added to candicates list: " + Log.getStackTraceString(e), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Only take care of repeated executions.
|
||||
*/
|
||||
Miscellaneous.logEvent("i", "DateTimeListener","Checking rules for repeated run alarm candidates.", 5);
|
||||
for(Rule oneRule : allRulesWithTimeFrames)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "DateTimeListener","Checking rule " + oneRule.getName() + " for repeated run alarm candidates.", 5);
|
||||
if(oneRule.isRuleActive())
|
||||
{
|
||||
try
|
||||
{
|
||||
Miscellaneous.logEvent("i", "DateTimeListener","Checking rule " + oneRule.toString() , 5);
|
||||
|
||||
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||
{
|
||||
Miscellaneous.logEvent("i", "DateTimeListener","Checking trigger " + oneTrigger.toString() + " for repeated run alarm candidates.", 5);
|
||||
if(oneTrigger.getTriggerType().equals(Trigger_Enum.timeFrame))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "DateTimeListener","Checking rule trigger " + oneTrigger.toString() , 5);
|
||||
|
||||
/*
|
||||
* Check for next repeated execution:
|
||||
*
|
||||
* Check if the rule currently applies....
|
||||
*
|
||||
* If no -> do nothing
|
||||
* If yes -> Take starting time and calculate the next repeated execution
|
||||
* 1. Take starting time
|
||||
* 2. Take current time
|
||||
* 3. Calculate difference, but include check to see if we're after that time,
|
||||
* be it start or end of the timeframe.
|
||||
* 4. Take div result +1 and add this on top of starting time
|
||||
* 5. Is this next possible execution still inside timeframe? Also consider timeframes spanning over midnight
|
||||
*/
|
||||
Calendar calSet;
|
||||
Time setTime;
|
||||
TimeFrame tf = new TimeFrame(oneTrigger.getTriggerParameter2());
|
||||
|
||||
if(tf.getRepetition() > 0)
|
||||
{
|
||||
if(oneTrigger.applies(calNow, Miscellaneous.getAnyContext()))
|
||||
{
|
||||
Calendar calSchedule = getNextRepeatedExecutionAfter(oneTrigger, calNow);
|
||||
|
||||
alarmCandidates.add(new ScheduleElement(calSchedule, "Rule " + oneRule.getName() + ", trigger " + oneTrigger.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "DateTimeListener","Error checking anything for rule " + oneRule.toString() + " needs to be added to candicates list: " + Log.getStackTraceString(e), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scheduleNextAlarm();
|
||||
}
|
||||
|
||||
private static void scheduleNextAlarm()
|
||||
{
|
||||
Long currentTime = System.currentTimeMillis();
|
||||
ScheduleElement scheduleCandidate = null;
|
||||
|
||||
if(alarmCandidates.size() == 0)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmManager", "No alarms to be scheduled.", 3);
|
||||
return;
|
||||
}
|
||||
else if(alarmCandidates.size() == 1)
|
||||
{
|
||||
// only one alarm, schedule that
|
||||
scheduleCandidate = alarmCandidates.get(0);
|
||||
}
|
||||
else if(alarmCandidates.size() > 1)
|
||||
{
|
||||
scheduleCandidate = alarmCandidates.get(0);
|
||||
|
||||
for(ScheduleElement alarmCandidate : alarmCandidates)
|
||||
{
|
||||
if(Math.abs(currentTime - alarmCandidate.time.getTimeInMillis()) < Math.abs(currentTime - scheduleCandidate.time.getTimeInMillis()))
|
||||
scheduleCandidate = alarmCandidate;
|
||||
}
|
||||
}
|
||||
|
||||
Intent alarmIntent = new Intent(automationServiceRef, DateTimeListener.class);
|
||||
PendingIntent alarmPendingIntent = PendingIntent.getBroadcast(automationServiceRef, 0, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
centralAlarmManagerInstance.set(AlarmManager.RTC_WAKEUP, scheduleCandidate.time.getTimeInMillis(), alarmPendingIntent);
|
||||
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("E dd.MM.yyyy HH:mm");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(scheduleCandidate.time.getTimeInMillis());
|
||||
Miscellaneous.logEvent("i", "AlarmManager", "Chose " + sdf.format(calendar.getTime()) + " as next scheduled alarm.", 4);
|
||||
}
|
||||
|
||||
public static void clearAlarms()
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmManager", "Clearing possibly standing alarms.", 4);
|
||||
for(int requestCode : requestCodeList)
|
||||
{
|
||||
Intent alarmIntent = new Intent(automationServiceRef, DateTimeListener.class);
|
||||
PendingIntent alarmPendingIntent = PendingIntent.getBroadcast(automationServiceRef, requestCode, alarmIntent, 0);
|
||||
// Miscellaneous.logEvent("i", "AlarmManager", "Clearing alarm with request code: " + String.valueOf(requestCode));
|
||||
centralAlarmManagerInstance.cancel(alarmPendingIntent);
|
||||
}
|
||||
requestCodeList.clear();
|
||||
}
|
||||
|
||||
private static void startAlarmListenerInternal(AutomationService givenAutomationServiceRef)
|
||||
{
|
||||
if(!alarmListenerActive)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Starting alarm listener.", 4);
|
||||
DateTimeListener.automationServiceRef = givenAutomationServiceRef;
|
||||
centralAlarmManagerInstance = (AlarmManager)automationServiceRef.getSystemService(automationServiceRef.ALARM_SERVICE);
|
||||
// alarmIntent = new Intent(automationServiceRef, AlarmListener.class);
|
||||
// alarmPendingIntent = PendingIntent.getBroadcast(automationServiceRef, 0, alarmIntent, 0);
|
||||
alarmListenerActive = true;
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Alarm listener started.", 4);
|
||||
DateTimeListener.setAlarms();
|
||||
|
||||
// // get a Calendar object with current time
|
||||
// Calendar cal = Calendar.getInstance();
|
||||
// // add 5 minutes to the calendar object
|
||||
// cal.add(Calendar.SECOND, 10);
|
||||
// centralAlarmManagerInstance.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 5000, alarmPendingIntent);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Request to start AlarmListener. But it's already active.", 5);
|
||||
}
|
||||
|
||||
private static void stopAlarmListenerInternal()
|
||||
{
|
||||
if(alarmListenerActive)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Stopping alarm listener.", 4);
|
||||
clearAlarms();
|
||||
// centralAlarmManagerInstance.cancel(alarmPendingIntent);
|
||||
alarmListenerActive = false;
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Request to stop AlarmListener. But it's not running.", 5);
|
||||
}
|
||||
public static void reloadAlarms()
|
||||
{
|
||||
DateTimeListener.setAlarms();
|
||||
}
|
||||
@Override
|
||||
public void startListener(AutomationService automationService)
|
||||
{
|
||||
DateTimeListener.startAlarmListener(automationService);
|
||||
}
|
||||
@Override
|
||||
public void stopListener(AutomationService automationService)
|
||||
{
|
||||
DateTimeListener.stopAlarmListener(automationService);
|
||||
}
|
||||
|
||||
public static boolean haveAllPermission()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isListenerRunning()
|
||||
{
|
||||
return isAlarmListenerActive();
|
||||
}
|
||||
@Override
|
||||
public Trigger_Enum[] getMonitoredTrigger()
|
||||
{
|
||||
return new Trigger_Enum[] { Trigger_Enum.timeFrame };
|
||||
}
|
||||
|
||||
static class ScheduleElement implements Comparable<ScheduleElement>
|
||||
{
|
||||
Calendar time;
|
||||
String reason;
|
||||
|
||||
public ScheduleElement(Calendar timestamp, String reason)
|
||||
{
|
||||
super();
|
||||
this.time = timestamp;
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(ScheduleElement o)
|
||||
{
|
||||
if(time.getTimeInMillis() == o.time.getTimeInMillis())
|
||||
return 0;
|
||||
if(time.getTimeInMillis() < o.time.getTimeInMillis())
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return Miscellaneous.formatDate(time.getTime()) + ", reason : " + reason;
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
public static Calendar getNextRepeatedExecutionAfter(Trigger trigger, Calendar now)
|
||||
{
|
||||
Calendar calSet;
|
||||
Time setTime;
|
||||
TimeFrame tf = new TimeFrame(trigger.getTriggerParameter2());
|
||||
|
||||
if(tf.getRepetition() > 0)
|
||||
{
|
||||
if(trigger.getTriggerParameter())
|
||||
setTime = tf.getTriggerTimeStart();
|
||||
else
|
||||
setTime = tf.getTriggerTimeStop();
|
||||
|
||||
calSet = (Calendar) now.clone();
|
||||
calSet.set(Calendar.HOUR_OF_DAY, setTime.getHours());
|
||||
calSet.set(Calendar.MINUTE, setTime.getMinutes());
|
||||
calSet.set(Calendar.SECOND, 0);
|
||||
calSet.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
// if(this.applies(null))
|
||||
// {
|
||||
// If the starting time is a day ahead remove 1 day.
|
||||
if(calSet.getTimeInMillis() > now.getTimeInMillis())
|
||||
calSet.add(Calendar.DAY_OF_MONTH, -1);
|
||||
|
||||
long differenceInSeconds = Math.abs(now.getTimeInMillis() - calSet.getTimeInMillis()) / 1000;
|
||||
long nextExecutionMultiplier = Math.floorDiv(differenceInSeconds, tf.getRepetition()) + 1;
|
||||
long nextScheduleTimestamp = (calSet.getTimeInMillis() / 1000) + (nextExecutionMultiplier * tf.getRepetition());
|
||||
Calendar calSchedule = Calendar.getInstance();
|
||||
calSchedule.setTimeInMillis(nextScheduleTimestamp * 1000);
|
||||
|
||||
/*
|
||||
* Das war mal aktiviert. Allerdings: Die ganze Funktion liefert zurück, wenn die Regel NOCH nicht
|
||||
* zutrifft, aber wir z.B. gleich den zeitlichen Bereich betreten.
|
||||
*/
|
||||
// if(trigger.checkDateTime(calSchedule.getTime(), false))
|
||||
// {
|
||||
return calSchedule;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "DateTimeListener", "Trigger " + trigger.toString() + " is not executed repeatedly.", 5);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,251 @@
|
||||
package com.jens.automation2.receivers;
|
||||
|
||||
import static android.content.Context.SENSOR_SERVICE;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.Sensor;
|
||||
import android.hardware.SensorEvent;
|
||||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorManager;
|
||||
|
||||
import com.jens.automation2.ActivityManageTriggerDeviceOrientation;
|
||||
import com.jens.automation2.AutomationService;
|
||||
import com.jens.automation2.Miscellaneous;
|
||||
import com.jens.automation2.Rule;
|
||||
import com.jens.automation2.Settings;
|
||||
import com.jens.automation2.Trigger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
|
||||
public class DeviceOrientationListener implements SensorEventListener, AutomationListenerInterface
|
||||
{
|
||||
// https://developer.android.com/guide/topics/sensors/sensors_position#java
|
||||
|
||||
ActivityManageTriggerDeviceOrientation activityManageTriggerDeviceOrientationInstance = null;
|
||||
|
||||
//the Sensor Manager
|
||||
private SensorManager sManager;
|
||||
static DeviceOrientationListener instance = null;
|
||||
boolean isRunning = false;
|
||||
|
||||
Calendar now = null;
|
||||
static Calendar lastTimeSignalArrived = null;
|
||||
static int sensorValueCounter = 0;
|
||||
|
||||
// Gravity rotational data
|
||||
private float gravity[];
|
||||
// Magnetic rotational data
|
||||
private float magnetic[]; //for magnetic rotational data
|
||||
private float accels[] = new float[3];
|
||||
private float mags[] = new float[3];
|
||||
private float[] values = new float[3];
|
||||
|
||||
// azimuth, pitch and roll
|
||||
private float azimuth;
|
||||
private float pitch;
|
||||
private float roll;
|
||||
|
||||
boolean applies = false;
|
||||
boolean flipped = false;
|
||||
boolean toggable = false;
|
||||
|
||||
|
||||
public static DeviceOrientationListener getInstance()
|
||||
{
|
||||
if (instance == null)
|
||||
instance = new DeviceOrientationListener();
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
public float getAzimuth()
|
||||
{
|
||||
return azimuth;
|
||||
}
|
||||
|
||||
public float getPitch()
|
||||
{
|
||||
return pitch;
|
||||
}
|
||||
|
||||
public float getRoll()
|
||||
{
|
||||
return roll;
|
||||
}
|
||||
|
||||
public void startSensorFromConfigActivity(Context context, ActivityManageTriggerDeviceOrientation activityManageTriggerDeviceOrientationInstance)
|
||||
{
|
||||
this.activityManageTriggerDeviceOrientationInstance = activityManageTriggerDeviceOrientationInstance;
|
||||
|
||||
if(!isRunning)
|
||||
{
|
||||
sManager = (SensorManager) context.getSystemService(SENSOR_SERVICE);
|
||||
|
||||
/*
|
||||
register the sensor listener to listen to the gyroscope sensor, use the
|
||||
callbacks defined in this class, and gather the sensor information as quick
|
||||
as possible
|
||||
*/
|
||||
|
||||
isRunning = true;
|
||||
|
||||
sManager.registerListener(this, sManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL);
|
||||
sManager.registerListener(this, sManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), SensorManager.SENSOR_DELAY_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
public void stopSensorFromConfigActivity()
|
||||
{
|
||||
activityManageTriggerDeviceOrientationInstance = null;
|
||||
|
||||
if(isRunning)
|
||||
{
|
||||
if(!Rule.isAnyRuleUsing(Trigger.Trigger_Enum.deviceOrientation))
|
||||
{
|
||||
//unregister the sensor listener
|
||||
sManager.unregisterListener(this);
|
||||
isRunning = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAccuracyChanged(Sensor arg0, int arg1)
|
||||
{
|
||||
//Do nothing.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSensorChanged(SensorEvent event)
|
||||
{
|
||||
switch (event.sensor.getType())
|
||||
{
|
||||
case Sensor.TYPE_MAGNETIC_FIELD:
|
||||
mags = event.values.clone();
|
||||
break;
|
||||
case Sensor.TYPE_ACCELEROMETER:
|
||||
accels = event.values.clone();
|
||||
break;
|
||||
}
|
||||
|
||||
if (mags != null && accels != null)
|
||||
{
|
||||
gravity = new float[9];
|
||||
magnetic = new float[9];
|
||||
SensorManager.getRotationMatrix(gravity, magnetic, accels, mags);
|
||||
float[] outGravity = new float[9];
|
||||
SensorManager.remapCoordinateSystem(gravity, SensorManager.AXIS_X, SensorManager.AXIS_Z, outGravity);
|
||||
SensorManager.getOrientation(outGravity, values);
|
||||
|
||||
azimuth = values[0] * 57.2957795f;
|
||||
pitch = values[1] * 57.2957795f;
|
||||
roll = values[2] * 57.2957795f;
|
||||
mags = null;
|
||||
accels = null;
|
||||
}
|
||||
|
||||
//else it will output the Roll, Pitch and Yawn values
|
||||
if(activityManageTriggerDeviceOrientationInstance != null)
|
||||
activityManageTriggerDeviceOrientationInstance.updateFields(azimuth, pitch, roll);
|
||||
|
||||
/*
|
||||
For some reason the first 3 values after starting the listener
|
||||
are crap.
|
||||
*/
|
||||
if(sensorValueCounter > 3)
|
||||
{
|
||||
now = Calendar.getInstance();
|
||||
if (lastTimeSignalArrived == null || now.getTimeInMillis() >= lastTimeSignalArrived.getTimeInMillis() + Settings.acceptDeviceOrientationSignalEveryX_MilliSeconds)
|
||||
{
|
||||
lastTimeSignalArrived = now;
|
||||
|
||||
Miscellaneous.logEvent("i", "DeviceOrientation", "Got device orientation update: azimuth: " + String.valueOf(azimuth) + ", pitch: " + String.valueOf(pitch) + ", roll: " + String.valueOf(pitch), 4);
|
||||
|
||||
if (AutomationService.isMyServiceRunning(Miscellaneous.getAnyContext()))
|
||||
{
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.deviceOrientation);
|
||||
for (int i = 0; i < ruleCandidates.size(); i++)
|
||||
{
|
||||
if (ruleCandidates.get(i).getsGreenLight(Miscellaneous.getAnyContext()))
|
||||
ruleCandidates.get(i).activate(AutomationService.getInstance(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
sensorValueCounter++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startListener(AutomationService automationService)
|
||||
{
|
||||
if(!isRunning)
|
||||
{
|
||||
sManager = (SensorManager) Miscellaneous.getAnyContext().getSystemService(SENSOR_SERVICE);
|
||||
|
||||
/*
|
||||
register the sensor listener to listen to the gyroscope sensor, use the
|
||||
callbacks defined in this class, and gather the sensor information as quick
|
||||
as possible
|
||||
*/
|
||||
|
||||
isRunning = true;
|
||||
|
||||
sManager.registerListener(this, sManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL);
|
||||
sManager.registerListener(this, sManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), SensorManager.SENSOR_DELAY_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopListener(AutomationService automationService)
|
||||
{
|
||||
this.activityManageTriggerDeviceOrientationInstance = null;
|
||||
|
||||
if(isRunning)
|
||||
{
|
||||
//unregister the sensor listener
|
||||
sManager.unregisterListener(this);
|
||||
isRunning = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isListenerRunning()
|
||||
{
|
||||
return isRunning;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Trigger.Trigger_Enum[] getMonitoredTrigger()
|
||||
{
|
||||
return new Trigger.Trigger_Enum[] { Trigger.Trigger_Enum.deviceOrientation};
|
||||
}
|
||||
|
||||
/*
|
||||
Azimuth (degrees of rotation about the -z axis).
|
||||
This is the angle between the device's current compass direction and magnetic north. If the top edge of the
|
||||
device faces magnetic north, the azimuth is 0 degrees; if the top edge faces south, the azimuth is 180 degrees.
|
||||
Similarly, if the top edge faces east, the azimuth is 90 degrees, and if the top edge faces west, the azimuth is 270 degrees.
|
||||
|
||||
Pitch (degrees of rotation about the x axis).
|
||||
This is the angle between a plane parallel to the device's screen and a plane parallel to the ground. If you hold the device
|
||||
parallel to the ground with the bottom edge closest to you and tilt the top edge of the device toward the ground, the pitch
|
||||
angle becomes positive. Tilting in the opposite direction— moving the top edge of the device away from the ground—causes
|
||||
the pitch angle to become negative. The range of values is -180 degrees to 180 degrees.
|
||||
|
||||
Roll (degrees of rotation about the y axis).
|
||||
This is the angle between a plane perpendicular to the device's screen and a plane perpendicular to the ground.
|
||||
If you hold the device parallel to the ground with the bottom edge closest to you and tilt the left edge of the
|
||||
device toward the ground, the roll angle becomes positive. Tilting in the opposite direction—moving the right
|
||||
edge of the device toward the ground— causes the roll angle to become negative. The range of values is -90 degrees
|
||||
to 90 degrees.
|
||||
|
||||
Computes the device's orientation based on the rotation matrix.
|
||||
When it returns, the array values are as follows:
|
||||
values[0]: Azimuth, angle of rotation about the -z axis. This value represents the angle between the device's y axis and the magnetic north pole. When facing north, this angle is 0, when facing south, this angle is π. Likewise, when facing east, this angle is π/2, and when facing west, this angle is -π/2. The range of values is -π to π.
|
||||
values[1]: Pitch, angle of rotation about the x axis. This value represents the angle between a plane parallel to the device's screen and a plane parallel to the ground. Assuming that the bottom edge of the device faces the user and that the screen is face-up, tilting the top edge of the device toward the ground creates a positive pitch angle. The range of values is -π to π.
|
||||
values[2]: Roll, angle of rotation about the y axis. This value represents the angle between a plane perpendicular to the device's screen and a plane perpendicular to the ground. Assuming that the bottom edge of the device faces the user and that the screen is face-up, tilting the left edge of the device toward the ground creates a positive roll angle. The range of values is -π/2 to π/2.
|
||||
Applying these three rotations in the azimuth, pitch, roll order transforms an identity matrix to the rotation matrix passed into this method. Also, note that all three orientation angles are expressed in radians.
|
||||
*/
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.jens.automation2.receivers;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -73,11 +74,12 @@ public class HeadphoneJackListener extends BroadcastReceiver implements Automati
|
||||
headsetConnected = true;
|
||||
Miscellaneous.logEvent("i", "HeadphoneJackListener", "Headset " + name + " plugged in.", 4);
|
||||
}
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByHeadphoneJack(isHeadsetConnected());
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.headsetPlugged);
|
||||
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByHeadphoneJack(isHeadsetConnected());
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).applies(context))
|
||||
if(ruleCandidates.get(i).getsGreenLight(context))
|
||||
ruleCandidates.get(i).activate(AutomationService.getInstance(), false);
|
||||
}
|
||||
}
|
||||
@ -133,7 +135,7 @@ public class HeadphoneJackListener extends BroadcastReceiver implements Automati
|
||||
|
||||
public static boolean haveAllPermission()
|
||||
{
|
||||
return ActivityPermissions.havePermission("android.permission.READ_PHONE_STATE", Miscellaneous.getAnyContext());
|
||||
return ActivityPermissions.havePermission(Manifest.permission.READ_PHONE_STATE, Miscellaneous.getAnyContext());
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@ import com.jens.automation2.AutomationService;
|
||||
import com.jens.automation2.Miscellaneous;
|
||||
import com.jens.automation2.R;
|
||||
import com.jens.automation2.Rule;
|
||||
import com.jens.automation2.Trigger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
@ -171,10 +172,10 @@ public class NfcReceiver
|
||||
}
|
||||
else
|
||||
{
|
||||
ArrayList<Rule> allRulesWithNfcTags = Rule.findRuleCandidatesByNfc();
|
||||
ArrayList<Rule> allRulesWithNfcTags = Rule.findRuleCandidates(Trigger.Trigger_Enum.nfcTag);
|
||||
for(int i=0; i<allRulesWithNfcTags.size(); i++)
|
||||
{
|
||||
if(allRulesWithNfcTags.get(i).applies(asInstance))
|
||||
if(allRulesWithNfcTags.get(i).getsGreenLight(asInstance))
|
||||
allRulesWithNfcTags.get(i).activate(asInstance, false);
|
||||
}
|
||||
}
|
||||
|
@ -30,10 +30,10 @@ public class NoiseListener implements AutomationListenerInterface
|
||||
noiseLevelDb = msg.getData().getLong("noiseLevelDb");
|
||||
|
||||
// execute matching rules containing noise
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByNoiseLevel();
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.noiseLevel);
|
||||
for(Rule oneRule : ruleCandidates)
|
||||
{
|
||||
if(oneRule.applies(automationService))
|
||||
if(oneRule.getsGreenLight(automationService))
|
||||
oneRule.activate(automationService, false);
|
||||
}
|
||||
}
|
||||
|
@ -89,19 +89,12 @@ public class NotificationListener extends NotificationListenerService
|
||||
lastNotification.title = title;
|
||||
lastNotification.text = text;
|
||||
|
||||
// if(lastResponseToNotification == null || lastResponseToNotification.getTimeInMillis() < lastNotification.publishTime.getTimeInMillis())
|
||||
// {
|
||||
// lastResponseToNotification = Calendar.getInstance();
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.notification);
|
||||
for (int i = 0; i < ruleCandidates.size(); i++)
|
||||
{
|
||||
if (ruleCandidates.get(i).applies(NotificationListener.this))
|
||||
ruleCandidates.get(i).activate(AutomationService.getInstance(), false);
|
||||
}
|
||||
// }
|
||||
// else
|
||||
// Miscellaneous.logEvent("e", "NotificationCheck", "Ignoring notification as it is old.", 5);
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.notification);
|
||||
for (int i = 0; i < ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).getsGreenLight(NotificationListener.this))
|
||||
ruleCandidates.get(i).activate(AutomationService.getInstance(), false);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -14,29 +14,18 @@ public class PackageReplacedReceiver extends BroadcastReceiver
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent)
|
||||
{
|
||||
// Toast.makeText(context, "package replaced", Toast.LENGTH_LONG).show();
|
||||
// int intentUid = intent.getExtras().getInt("android.intent.extra.UID"); // userid of the application that has just been updated
|
||||
// int myUid = android.os.Process.myUid(); // userid of this application
|
||||
//
|
||||
// boolean replacing = intent.getBooleanExtra(Intent.EXTRA_REPLACING, false);
|
||||
|
||||
// if(intentUid == myUid)
|
||||
// {
|
||||
Settings.readFromPersistentStorage(context);
|
||||
Settings.readFromPersistentStorage(context);
|
||||
|
||||
Miscellaneous.logEvent("i", context.getResources().getString(R.string.applicationHasBeenUpdated), context.getResources().getString(R.string.applicationHasBeenUpdated), 2);
|
||||
if(hasServiceBeenRunning() && Settings.startServiceAfterAppUpdate)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Service", context.getResources().getString(R.string.logStartingServiceAfterAppUpdate), 1);
|
||||
AutomationService.startAutomationService(context, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Service", context.getResources().getString(R.string.logNotStartingServiceAfterAppUpdate), 2);
|
||||
}
|
||||
// }
|
||||
// else
|
||||
// Miscellaneous.logEvent("i", "Service", "Some other app has been updated.", 5);
|
||||
Miscellaneous.logEvent("i", context.getResources().getString(R.string.applicationHasBeenUpdated), context.getResources().getString(R.string.applicationHasBeenUpdated), 2);
|
||||
if(hasServiceBeenRunning() && Settings.startServiceAfterAppUpdate)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Service", context.getResources().getString(R.string.logStartingServiceAfterAppUpdate), 1);
|
||||
AutomationService.startAutomationService(context, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Service", context.getResources().getString(R.string.logNotStartingServiceAfterAppUpdate), 2);
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean hasServiceBeenRunning()
|
||||
|
@ -109,12 +109,12 @@ public class PhoneStatusListener implements AutomationListenerInterface
|
||||
break;
|
||||
}
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByPhoneCall(Trigger.triggerPhoneCallDirectionOutgoing);
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.phoneCall);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
AutomationService asInstance = AutomationService.getInstance();
|
||||
if(asInstance != null)
|
||||
if(ruleCandidates.get(i).applies(asInstance))
|
||||
if(ruleCandidates.get(i).getsGreenLight(asInstance))
|
||||
ruleCandidates.get(i).activate(asInstance, false);
|
||||
}
|
||||
}
|
||||
@ -141,12 +141,12 @@ public class PhoneStatusListener implements AutomationListenerInterface
|
||||
break;
|
||||
}
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByPhoneCall(Trigger.triggerPhoneCallDirectionIncoming);
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.phoneCall);
|
||||
for (int i = 0; i < ruleCandidates.size(); i++)
|
||||
{
|
||||
AutomationService asInstance = AutomationService.getInstance();
|
||||
if (asInstance != null)
|
||||
if (ruleCandidates.get(i).applies(asInstance))
|
||||
if (ruleCandidates.get(i).getsGreenLight(asInstance))
|
||||
ruleCandidates.get(i).activate(asInstance, false);
|
||||
}
|
||||
}
|
||||
@ -168,22 +168,18 @@ public class PhoneStatusListener implements AutomationListenerInterface
|
||||
*/
|
||||
setLastPhoneDirection(2);
|
||||
|
||||
// TelephonyManager tm = (TelephonyManager)context.getSystemService(Service.TELEPHONY_SERVICE);
|
||||
// int newState = tm.getCallState();
|
||||
// setCurrentState(newState);
|
||||
|
||||
setCurrentState(TelephonyManager.CALL_STATE_RINGING);
|
||||
|
||||
String phoneNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
|
||||
setLastPhoneNumber(phoneNumber);
|
||||
Miscellaneous.logEvent("i", "Call state", String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.outgoingCallTo), getLastPhoneNumber()), 4);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByPhoneCall(Trigger.triggerPhoneCallDirectionOutgoing);
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.phoneCall);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
AutomationService asInstance = AutomationService.getInstance();
|
||||
if(asInstance != null)
|
||||
if(ruleCandidates.get(i).applies(asInstance))
|
||||
if(ruleCandidates.get(i).getsGreenLight(asInstance))
|
||||
ruleCandidates.get(i).activate(asInstance, false);
|
||||
}
|
||||
}
|
||||
|
@ -43,34 +43,27 @@ public class ProcessListener implements AutomationListenerInterface
|
||||
@Override
|
||||
public void handleMessage(Message msg)
|
||||
{
|
||||
// try
|
||||
// {
|
||||
Miscellaneous.logEvent("i", automationService.getResources().getString(R.string.processMonitoring), automationService.getResources().getString(R.string.messageReceivedStatingProcessMonitoringIsComplete), 5);
|
||||
// This will take care of results delivered by the actual monitoring instance
|
||||
|
||||
for(String entry : getRunningApps())
|
||||
Miscellaneous.logEvent("i", automationService.getResources().getString(R.string.runningApp), entry, 5);
|
||||
|
||||
// execute matching rules containing processes
|
||||
if(getRecentlyStartedApps().size()>0 | getRecentlyStoppedApps().size()>0)
|
||||
Miscellaneous.logEvent("i", automationService.getResources().getString(R.string.processMonitoring), automationService.getResources().getString(R.string.messageReceivedStatingProcessMonitoringIsComplete), 5);
|
||||
// This will take care of results delivered by the actual monitoring instance
|
||||
|
||||
for(String entry : getRunningApps())
|
||||
Miscellaneous.logEvent("i", automationService.getResources().getString(R.string.runningApp), entry, 5);
|
||||
|
||||
// execute matching rules containing processes
|
||||
if(getRecentlyStartedApps().size()>0 | getRecentlyStoppedApps().size()>0)
|
||||
{
|
||||
for(String entry : getRecentlyStartedApps())
|
||||
Miscellaneous.logEvent("i", automationService.getResources().getString(R.string.appStarted), entry, 3);
|
||||
for(String entry : getRecentlyStoppedApps())
|
||||
Miscellaneous.logEvent("i", automationService.getResources().getString(R.string.appStopped), entry, 3);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.process_started_stopped);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
for(String entry : getRecentlyStartedApps())
|
||||
Miscellaneous.logEvent("i", automationService.getResources().getString(R.string.appStarted), entry, 3);
|
||||
for(String entry : getRecentlyStoppedApps())
|
||||
Miscellaneous.logEvent("i", automationService.getResources().getString(R.string.appStopped), entry, 3);
|
||||
|
||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByProcess();
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).applies(automationService))
|
||||
ruleCandidates.get(i).activate(automationService, false);
|
||||
}
|
||||
if(ruleCandidates.get(i).getsGreenLight(automationService))
|
||||
ruleCandidates.get(i).activate(automationService, false);
|
||||
}
|
||||
// }
|
||||
// catch(Exception e)
|
||||
// {
|
||||
// Miscellaneous.logEvent("e", "Noise level", "Error in workHandler->handleMessage(): " + e.getMessage());
|
||||
// }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -77,12 +77,12 @@ public class TimeZoneListener extends BroadcastReceiver implements AutomationLis
|
||||
if(action.equals(Intent.ACTION_TIMEZONE_CHANGED))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "TimeZoneListener", "Device timezone changed. Reloading alarms.", 3);
|
||||
AlarmListener.reloadAlarms();
|
||||
DateTimeListener.reloadAlarms();
|
||||
}
|
||||
else if(action.equals(Intent.ACTION_TIME_CHANGED))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "TimeZoneListener", "Device time changed. Reloading alarms.", 4);
|
||||
AlarmListener.reloadAlarms();
|
||||
DateTimeListener.reloadAlarms();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
BIN
app/src/main/res/drawable-hdpi/smartphone.png
Normal file
BIN
app/src/main/res/drawable-hdpi/smartphone.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-hdpi/vibrate.png
Normal file
BIN
app/src/main/res/drawable-hdpi/vibrate.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
app/src/main/res/drawable/arrow_azimuth.png
Normal file
BIN
app/src/main/res/drawable/arrow_azimuth.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable/arrow_pitch.png
Normal file
BIN
app/src/main/res/drawable/arrow_pitch.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
app/src/main/res/drawable/arrow_roll.png
Normal file
BIN
app/src/main/res/drawable/arrow_roll.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
@ -97,6 +97,15 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppVersion"
|
||||
android:layout_marginTop="@dimen/default_margin"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</ScrollView>
|
@ -27,7 +27,7 @@
|
||||
<EditText
|
||||
android:id="@+id/etSelectedSoundFile"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<Button
|
@ -2,13 +2,20 @@
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_margin="10dp" >
|
||||
android:layout_margin="@dimen/default_margin" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/smsDialogNotice"
|
||||
android:textColor="#ea131b"
|
||||
android:layout_marginBottom="@dimen/default_margin" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bImportNumberFromContacts"
|
||||
android:drawableLeft="@drawable/contacts"
|
||||
|
47
app/src/main/res/layout/activity_manage_action_vibrate.xml
Normal file
47
app/src/main/res/layout/activity_manage_action_vibrate.xml
Normal file
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/default_margin" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_span="2"
|
||||
android:textSize="25dp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="@dimen/default_margin"
|
||||
android:text="@string/vibrate" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/VibrateExplanation" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etVibratePattern"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="@dimen/default_margin"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bTestVibratePattern"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:text="@string/test" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bSaveVibratePattern"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/save" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
@ -4,6 +4,15 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/default_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_span="2"
|
||||
android:textSize="25dp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="@dimen/default_margin"
|
||||
android:text="@string/setScreenBrightness" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/chkAutoBrightness"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -57,7 +57,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal" />
|
||||
android:inputType="numberSigned" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
@ -72,14 +72,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/longitude"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etPoiLongitude"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal" />
|
||||
</TableRow>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etPoiLongitude"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="numberSigned" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
|
@ -45,6 +45,19 @@
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/general"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBoxChangeSoundMode"
|
||||
android:layout_width="wrap_content"
|
||||
@ -63,13 +76,54 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="40dp" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:text="@string/silentTriggersDnd" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/dnd"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBoxChangeDnd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/change" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerDndMode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="40dp" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:text="@string/dndRemarks" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/volumes"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_marginLeft="40dp" />
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBoxChangeVolumeMusicVideoGameMedia"
|
||||
@ -121,7 +175,20 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="40dp" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tones"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBoxChangeIncomingCallsRingtone"
|
||||
android:layout_width="wrap_content"
|
||||
@ -199,7 +266,20 @@
|
||||
android:text="@string/notificationRingtone"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/miscellaneous"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBoxChangeAudibleSelection"
|
||||
android:layout_width="wrap_content"
|
||||
@ -240,6 +320,7 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/bSaveProfile"
|
||||
android:layout_marginTop="@dimen/default_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/save" />
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/default_margin">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -9,7 +10,6 @@
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -92,7 +92,7 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/bSaveBluetoothTrigger"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="@dimen/default_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/save" />
|
||||
|
@ -0,0 +1,269 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="@dimen/default_margin" >
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/deviceOrientationExplanation"
|
||||
android:layout_marginBottom="@dimen/default_margin" />
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TableRow
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<ImageView
|
||||
android:layout_marginRight="@dimen/default_margin"
|
||||
android:src="@drawable/arrow_azimuth"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/orientationAzimuth"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentAzimuth"
|
||||
android:layout_marginLeft="@dimen/default_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<ImageView
|
||||
android:layout_marginRight="@dimen/default_margin"
|
||||
android:src="@drawable/arrow_pitch"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/orientationPitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentOrientationPitch"
|
||||
android:layout_marginLeft="@dimen/default_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<ImageView
|
||||
android:layout_marginRight="@dimen/default_margin"
|
||||
android:src="@drawable/arrow_roll"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/orientationRoll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentRoll"
|
||||
android:layout_marginLeft="@dimen/default_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bApplyPositionValues"
|
||||
android:text="@string/apply"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="@dimen/default_margin" />
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:shrinkColumns="0"
|
||||
android:stretchColumns="1">
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:text=""
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/orientation"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/tolerance"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/wouldCurrentlyApply"
|
||||
android:singleLine="false"
|
||||
android:maxLines="2"
|
||||
android:lines="2"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:text="@string/orientationAzimuth"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/default_margin" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etDesiredAzimuth"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="50dp"
|
||||
android:enabled="false"
|
||||
android:inputType="number" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etDesiredAzimuthTolerance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="50dp"
|
||||
android:inputType="number" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppliesAzimuth"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/unknown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:text="@string/orientationPitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/default_margin" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etDesiredPitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="50dp"
|
||||
android:enabled="false"
|
||||
android:inputType="number" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etDesiredPitchTolerance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="50dp"
|
||||
android:inputType="number" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppliesPitch"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/unknown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:text="@string/orientationRoll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/default_margin" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etDesiredRoll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="50dp"
|
||||
android:enabled="false"
|
||||
android:inputType="number" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etDesiredRollTolerance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="50dp"
|
||||
android:inputType="number" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppliesRoll"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/unknown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/chkDevicePositionApplies"
|
||||
android:checked="true"
|
||||
android:text="@string/mustApply"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/explanationDeviceOrientationDirection" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bSavePositionValues"
|
||||
android:text="@string/save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_margin" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</ScrollView>
|
@ -3,7 +3,8 @@
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="@dimen/default_margin" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -2,10 +2,9 @@
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp" >
|
||||
android:layout_margin="@dimen/default_margin" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_margin="@dimen/default_margin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
@ -25,7 +24,9 @@
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:shrinkColumns="1"
|
||||
android:stretchColumns="1">
|
||||
|
||||
<TableRow
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
||||
@ -44,6 +45,18 @@
|
||||
|
||||
</TableRow>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/automationNotificationsIgnored" />
|
||||
|
||||
<TableRow
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
||||
|
||||
@ -54,13 +67,13 @@
|
||||
android:text="@string/application" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginHorizontal="@dimen/default_margin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/etActivityOrActionPath"
|
||||
android:layout_marginHorizontal="@dimen/default_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/anyApp"
|
||||
@ -68,6 +81,7 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/bSelectApp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/selectApplication" />
|
||||
@ -76,6 +90,13 @@
|
||||
|
||||
</TableRow>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<TableRow
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
||||
|
||||
@ -104,6 +125,13 @@
|
||||
</LinearLayout>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<TableRow
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
||||
|
@ -172,6 +172,7 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/bTriggerPhoneCallImportFromContacts"
|
||||
android:drawableLeft="@drawable/contacts"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
100
app/src/main/res/layout/activity_manage_trigger_profile.xml
Normal file
100
app/src/main/res/layout/activity_manage_trigger_profile.xml
Normal file
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/default_margin"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:shrinkColumns="1"
|
||||
android:stretchColumns="1" >
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView
|
||||
android:text="@string/profile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerProfiles"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<View
|
||||
android:layout_span="2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@android:color/darker_gray" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView
|
||||
android:text="@string/needsToBeActive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/chkProfileActive"
|
||||
android:checked="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<View
|
||||
android:layout_span="2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@android:color/darker_gray" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView
|
||||
android:text="@string/checkSettings"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/chkProfileCheckSettings"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView
|
||||
android:layout_span="2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/profileTriggerCheckSettings" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bSaveTriggerProfile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_margin"
|
||||
android:text="@string/save" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
@ -3,7 +3,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="30"
|
||||
android:layout_margin="10dp" >
|
||||
android:layout_margin="@dimen/default_margin" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -34,18 +34,18 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:background="#aa000000" />
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/insideOrOutsideTimeFrames"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/insideOrOutsideTimeFrames"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
@ -65,18 +65,18 @@
|
||||
android:text="@string/leaving" />
|
||||
</RadioGroup>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:background="#aa000000" />
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentNfcIdValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/timeFrameWhichDays"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentNfcIdValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/timeFrameWhichDays"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkMonday"
|
||||
@ -119,9 +119,38 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sunday" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/chkRepeat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/repeatEveryXseconds" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etRepeatEvery"
|
||||
android:layout_marginLeft="@dimen/default_margin"
|
||||
android:minWidth="75dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:inputType="numberSigned" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bSaveTimeFrame"
|
||||
android:layout_marginTop="@dimen/default_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/save" />
|
||||
|
@ -52,10 +52,23 @@
|
||||
android:entries="@array/startScreenOptions"
|
||||
android:entryValues="@array/startScreenOptionsValues" />
|
||||
|
||||
<ListPreference
|
||||
android:key="tabsPlacement"
|
||||
android:title="@string/tabsPlacement"
|
||||
android:summary="@string/tabsPlacementSummary"
|
||||
android:entries="@array/tabsPlacementOptions"
|
||||
android:entryValues="@array/tabsPlacementOptionsValues" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="executeRulesAndProfilesWithSingleClick"
|
||||
android:title="@string/executeRulesAndProfilesWithSingleClickTitle" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="automaticUpdateCheck"
|
||||
android:enabled="false"
|
||||
android:title="@string/automaticUpdateCheck"
|
||||
android:summary="@string/automaticUpdateCheckSummary"/>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="displayNewsOnMainScreen"
|
||||
android:title="@string/displayNewsOnMainScreen"
|
||||
@ -249,6 +262,18 @@
|
||||
android:inputType="number"></EditTextPreference>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:summary="@string/deviceOrientationSettings"
|
||||
android:title="@string/deviceOrientationSettings">
|
||||
|
||||
<EditTextPreference
|
||||
android:key="acceptDevicePositionSignalEveryX_MilliSeconds"
|
||||
android:summary="@string/deviceOrientationTimeAcceptIntervalSummary"
|
||||
android:title="@string/deviceOrientationTimeAcceptIntervalTitle"
|
||||
android:inputType="number"></EditTextPreference>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:summary="@string/activityDetection"
|
@ -3,13 +3,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="10dp" >
|
||||
android:layout_margin="@dimen/default_margin" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvVolumeTestExplanation"
|
||||
android:id="@+id/tvVolumeCalibrationExplanation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/volumeTesterExplanation"
|
||||
android:text="@string/volumeCalibrationExplanation"
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
<TableLayout
|
||||
@ -26,6 +26,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentVolume"
|
||||
android:layout_marginLeft="@dimen/default_margin"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0dB"
|
||||
@ -45,6 +46,7 @@
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etReferenceValue"
|
||||
android:layout_marginLeft="@dimen/default_margin"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
@ -332,6 +332,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:text="@string/settings" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bDonate"
|
||||
android:visibility="gone"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:text="@string/donate" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -3,17 +3,25 @@
|
||||
android:id="@android:id/tabhost"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<TabWidget
|
||||
android:id="@android:id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@android:id/tabcontent"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TabWidget
|
||||
android:id="@android:id/tabs"
|
||||
android:layout_weight="0"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</TabHost>
|
27
app/src/main/res/layout/main_tab_layout_tabs_at_top.xml
Normal file
27
app/src/main/res/layout/main_tab_layout_tabs_at_top.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@android:id/tabhost"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TabWidget
|
||||
android:id="@android:id/tabs"
|
||||
android:layout_weight="0"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@android:id/tabcontent"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</TabHost>
|
@ -2,7 +2,7 @@
|
||||
<resources>
|
||||
<string name="ruleActivate">Aktiviere Regel %1$s</string>
|
||||
<string name="profileActivate">Aktiviere Profil %1$s</string>
|
||||
<string name="ruleActivateToggle">Aktiviere Regel %1$s im Umschaltmodus</string>
|
||||
<string name="ruleActivateToggle">Aktiviere Regel %1$s im Umkehrmodus</string>
|
||||
<string name="addPoi">Ort hinzufügen</string>
|
||||
<string name="addRule">Regel hinzufügen</string>
|
||||
<string name="poiList">Orts-Liste:</string>
|
||||
@ -14,8 +14,7 @@
|
||||
<string name="serviceStarted">Automations-Dienst gestarted.</string>
|
||||
<string name="version">Version %1$s.</string>
|
||||
<string name="distanceBetween">Der Abstand zwischen GPS- und Mobilfunk-Position beträgt %1$d m. Dies +1 sollte der minimale Radius sein.</string>
|
||||
<string name="comparing">Sowohl Netzwerk- als auch GPS Position sind bekannt. Vergleiche...</string>
|
||||
<string name="positioningWindowNotice">Falls Sie in einem Gebäude sind wird empfohlen das Gerät in die Nähe eines Fensters zu bringen bis eine Position ermittelt werden konnte. Andernfalls kann es sehr lange dauern oder es funktioniert gar nicht.</string>
|
||||
<string name="positioningWindowNotice">Falls Sie in einem Gebäude sind, wird empfohlen das Gerät in die Nähe eines Fensters zu bringen bis eine Position ermittelt werden konnte. Andernfalls kann es sehr lange dauern oder es funktioniert gar nicht.</string>
|
||||
<string name="gettingPosition">Position wird ermittelt. Bitte warten...</string>
|
||||
<string name="yes">Ja</string>
|
||||
<string name="no">Nein</string>
|
||||
@ -64,7 +63,7 @@
|
||||
<string name="deactivating">Deaktiviere</string>
|
||||
<string name="bluetoothFailed">Änderung des Bluetooth Status fehlgeschlagen. Verfügt dieses Gerät über Bluetooth?</string>
|
||||
<string name="urlTooShort">Die Adresse ist zu kurz. Sie muß aus mindestens 10 Buchstaben bestehen.</string>
|
||||
<string name="textTooShort">Der Text ist zu kurz. Er muß aus mindestens 10 Buchstaben bestehen.</string>
|
||||
<string name="enterPhoneNumberAndText">Geben Sie eine Telefonnummer und einen Text ein.</string>
|
||||
<string name="selectTypeOfTrigger">Welche Art von Auslöser</string>
|
||||
<string name="entering">betrete</string>
|
||||
<string name="leaving">verlasse</string>
|
||||
@ -117,8 +116,8 @@
|
||||
<string name="timeframes">Zeiträume</string>
|
||||
<string name="helpTextTimeFrame">Wenn Sie eine Regel mit einem Zeitraum erstellen, haben Sie zwei Möglichkeiten. Sie können wählen, ob der Auslöser besagt, daß der Zeitraum entweder verlassen ODER betreten wird. In jedem Fall wird die Regel nur einmal ausgelöst. Wenn eine Regel z.B. besagt \"betrete timeframe xyz\" und das Klingeltonprofil in Vibration ändert, bedeutet das NICHT, daß das Gerät hinterher automatisch wieder zum normalen Klingelprofil zurückschaltet. Wenn das erwünscht ist, muß eine weitere Regel mit einem Folgezeitraum erstellen werden.</string>
|
||||
<string name="helpTextSound">Auf dem Hauptbildschirm können Sie die Funktion Tonänderunugen sperren benutzen, um vorrübergehend regelbasierte Tonänderungen zu deaktivieren. Z.B. könnten Sie in einer Situation oder an einem Ort sein, wo Klingeltöne normalerweise in Ordnung sind, aber dieses eine Mal würde es stören. Die Funktion wird automatisch wieder deaktiviert nachdem die eingestellte Zeit abgelaufen ist. Klicken Sie den + Knopf, um die angezeigte Zeit zur Frist hinzuzufügen. Sobald es aktiv ist, können Sie es mit dem Schalter rechts wieder abschalten (und so regelbasierte Tonänderungen wieder ermöglichen).</string>
|
||||
<string name="toggableRules">Umkehrbare Regeln</string>
|
||||
<string name="helpTextToggable">Regeln haben eine Einstellung namens \"Umschaltbar\". Das bedeutet: Wurde eine Regel ausgeführt und anschließend treten dieselben Auslöser wieder ein, wird die Regel nochmal in umgekehrter Weise ausgeführt, wo es möglich ist. Gegenwärtig funktioniert das nur im Zusammenspiel mit NFC Tags. Wenn Sie einen Tag zwei Mal berühren und es eine umschaltbare Regel zu diesem Tag gibt, wird das Programm das Gegenteil von gegenwärtigen Zustand tun, z.B. WLAN ausschalten, wenn es gegenwärtig eingeschaltet ist.</string>
|
||||
<string name="toggableRules">Unschaltbare Regeln</string>
|
||||
<string name="helpTextToggable">Regeln haben eine Einstellung namens \"Umkehrbar\". Das bedeutet: Wurde eine Regel ausgeführt und anschließend treten dieselben Auslöser wieder ein, wird die Regel nochmal in umgekehrter Weise ausgeführt, wo es möglich ist. Gegenwärtig funktioniert das nur im Zusammenspiel mit NFC Tags. Wenn Sie einen Tag zwei Mal berühren und es eine umkehrbare Regel zu diesem Tag gibt, wird das Programm das Gegenteil von gegenwärtigen Zustand tun, z.B. WLAN ausschalten, wenn es gegenwärtig eingeschaltet ist.</string>
|
||||
<string name="helpTextProcessMonitoring">Wenn Sie eine Regel mit einer Prozess Überwachung erstellen, wird die Anwendung in regelmäßigen Abständen nach diesem Prozess schauen. Wie häufig können Sie in den Einstellungen festlegen. Das mag zwar in vielen Fällen langsam reagieren, aber eine permanente Überwachung würde zuviel Akkuleistung kosten. Und das Betriebssystem stellt dafür keinen Broadcast zur Verfügung.</string>
|
||||
<string name="helpTitleEnergySaving">Energiespareinstellungen</string>
|
||||
<string name="helpTextEnergySaving">Viele Gerätehersteller versuchen Energie zu sparen, indem die Hintergrundaktivitäten vieler Anwendungen eingeschränkt werden. Unglücklicherweise führt das häufig dazu, dass diese Anwendungen nicht mehr zufällig funktionieren; das gilt auch für Automation. Schauen Sie sich <a href="https://dontkillmyapp.com/">diese Seite</a> an, um herauszufinden, wie Sie Automation auf Ihrem Gerät von dieser Behandlung ausschließen können.</string>
|
||||
@ -175,21 +174,7 @@
|
||||
<string name="serviceNotRunning">Dienst läuft nicht.</string>
|
||||
<string name="general">Allgemein</string>
|
||||
<string name="generalText">Um dieses Programm zu benutzen, müssen Sie Regeln anlegen. Diese enthalten Auslöser (z.B. ob Sie ein bestimmtes Gebiet betreten oder eine bestimmte Zeitspanne beginnt). Nachdem Sie dies erledigt haben, klicken Sie auf den Ein/Aus Schalter auf dem Hauptbildschirm.</string>
|
||||
<string name="unknownActionSpecified">Unbekannte Aktion definiert.</string>
|
||||
<string name="errorChangingScreenRotation">Fehler beim Ändern der Bildschirmrotation</string>
|
||||
<string name="errorDeterminingWifiApState">Fehler bei der Statusprüfung des WLAN Routers</string>
|
||||
<string name="errorActivatingWifiAp">Fehler beim Aktivieren des WLAN Routers</string>
|
||||
<string name="failedToTriggerBluetooth">Fehler beim Ändern des Bluetooth Status. Hat dieses Gerät Bluetooth?</string>
|
||||
<string name="logAttemptingDownloadOf">Versuche Download von</string>
|
||||
<string name="logErrorGettingConnectionManagerService">Fehler beim Anbinden an den connectionManager Dienst. Ändere nichts am Usb-Router Status.</string>
|
||||
<string name="logErrorDeterminingCurrentUsbTetheringState">Fehler beim Aufrufen des gegenwärtigen USB-Router Status.</string>
|
||||
<string name="logDetectingTetherableUsbInterface">Überprüfe routingfähiges Interface.</string>
|
||||
<string name="logClearingBothLocationListeners">Stoppe beide LocationListener.</string>
|
||||
<string name="logStartingServiceAfterAppUpdate">Starte Dienst nach Programm Aktualisierung. Er lief vor der Aktualisierung schon.</string>
|
||||
<string name="logNotStartingServiceAfterAppUpdate">Starte Dienst nicht automatisch nach Programm Aktualisierung. Er lief davor nicht.</string>
|
||||
<string name="logStartingServiceAtPhoneBoot">Starte Dienst nach Neustart des Telefons.</string>
|
||||
<string name="logNotStartingServiceAtPhoneBoot">Starte Dienst nicht automatisch nach Neustart des Telefons.</string>
|
||||
<string name="applicationHasBeenUpdated">Die Anwendung wurde aktualisiert.</string>
|
||||
<string name="startServiceAfterAppUpdate">Dienst nach Anwendungsupdate automatisch wieder starten, wenn er vorher lief.</string>
|
||||
<string name="startServiceAfterAppUpdateShort">Starte Dienst nach Update</string>
|
||||
<string name="wifiConnection">WLAN Verbindung</string>
|
||||
@ -227,7 +212,7 @@
|
||||
<string name="anotherPoiByThatName">Es gibt bereits einen Ort mit diesem Namen.</string>
|
||||
<string name="anotherRuleByThatName">Es gibt bereits eine Regel mit diesem Namen.</string>
|
||||
<string name="startOtherActivity">Programm starten</string>
|
||||
<string name="selectApplication">Wählen Sie\neine Anwendung</string>
|
||||
<string name="selectApplication">Anwendung wählen</string>
|
||||
<string name="selectPackageOfApplication">Wählen Sie ein Paket der Anwendung</string>
|
||||
<string name="selectActivityToBeStarted">Wählen Sie die Activity des Pakets</string>
|
||||
<string name="errorStartingOtherActivity">Fehler beim Starten einer anderen Anwendung</string>
|
||||
@ -254,12 +239,10 @@
|
||||
<string name="moveDown">Herunterschieben</string>
|
||||
<string name="cantMoveUp">Das Objekt kann nicht weiter hochgeschoben werden.</string>
|
||||
<string name="cantMoveDown">Das Objekt kann nicht weiter heruntergeschoben werden.</string>
|
||||
<string name="ruleCheckOf">RuleCheck von %1$s</string>
|
||||
<string name="airplaneMode">Flugmodus</string>
|
||||
<string name="activate">Aktivieren</string>
|
||||
<string name="deactivate">Deaktivieren</string>
|
||||
<string name="airplaneModeSdk17Warning">Seit Android Version 4.2 funktioniert diese Funktion - wenn überhaupt - nur noch mit gerooteten Geräten.</string>
|
||||
<string name="triggerUrlReplacementPositionError">Laut Ihren Einstellungen sollte der aufzurufenden Adresse eine Position hinzugefügt werden. Leider ist der im Moment nicht möglich, daß noch keine Position bekannt ist.</string>
|
||||
<string name="addIntentValue">Parameter-Paar hinzufügen</string>
|
||||
<string name="parameterName">Parameter Name</string>
|
||||
<string name="parameterValue">Parameter Wert</string>
|
||||
@ -288,7 +271,7 @@
|
||||
<string name="with">mit</string>
|
||||
<string name="phoneNumber">Telefonnummer</string>
|
||||
<string name="enterPhoneNumber">Geben Sie eine Telefonnummer ein. Leer lassen für irgendeine Nummer.</string>
|
||||
<string name="phoneDirection">Wählen Sie die Gesprächsrichtung</string>
|
||||
<string name="phoneDirection">Wählen Sie die\nGesprächsrichtung</string>
|
||||
<string name="any">egal</string>
|
||||
<string name="incoming">eingehend</string>
|
||||
<string name="outgoing">ausgehend</string>
|
||||
@ -322,28 +305,24 @@
|
||||
<string name="currentId">Aktuelle Bezeichnung:</string>
|
||||
<string name="nfcTagDataNotUsable">Tag Daten nicht nutzbar, neu schreiben</string>
|
||||
<string name="nfcBringTagIntoRangeToRead">Bringen Sie einen Tag in Reichweite, um ihn zu lesen.</string>
|
||||
<string name="toggleRule">Umschaltregel</string>
|
||||
<string name="toggleRule">Umkehrregel</string>
|
||||
<string name="toggling">Schalte um</string>
|
||||
<string name="toggle">umzuschalten</string>
|
||||
<string name="overlapBetweenPois">Überschneidung mit Ort %1$s von %2$s Metern festgestellt. Reduzieren Sie den Radius um mindestens diesen Wert.</string>
|
||||
<string name="noOverLap">Keine Überschneidung mit anderen Orten festgestellt.</string>
|
||||
<string name="ruleToggable">Regel %1$s ist umkehrbar.</string>
|
||||
<string name="ruleNotToggable">Regel %1$s ist nicht umkehrbar.</string>
|
||||
<string name="none">keiner</string>
|
||||
<string name="anyLocation">irgendein Ort</string>
|
||||
<string name="invalidPoiName">Ungültiger Name für einen Ort.</string>
|
||||
<string name="eraseSettings">Einstellungen löschen</string>
|
||||
<string name="defaultSettings">Standard Einstellungen</string>
|
||||
<string name="areYouSure">Sind sie sicher?</string>
|
||||
<string name="poiCouldBeInRange">Mindestens Ort %1$s könnte im nahen Umkreis liegen, wenn nicht noch andere.</string>
|
||||
<string name="noPoiInRelevantRange">Kein Ort im näheren Umkreis.</string>
|
||||
<string name="activityDetection">Aktivitätserkennung</string>
|
||||
<string name="detectedActivity">Erkannte Tätigkeit:</string>
|
||||
<string name="detectedActivityInVehicle">In einem Fahrzeug (Auto/Bus)</string>
|
||||
<string name="detectedActivityOnBicycle">Auf dem Fahrrad</string>
|
||||
<string name="detectedActivityOnFoot">Zu Fuß</string>
|
||||
<string name="detectedActivityStill">Ruhe</string>
|
||||
<string name="detectedActivityUnknown">Unbekannt</string>
|
||||
<string name="detectedActivityUnknown">unbekannt</string>
|
||||
<string name="detectedActivityTilting">Kippen</string>
|
||||
<string name="detectedActivityWalking">Gehen</string>
|
||||
<string name="detectedActivityRunning">Laufen</string>
|
||||
@ -358,7 +337,7 @@
|
||||
<string name="outgoingCallTo">Ausgehender Telefonanruf von %1$s.</string>
|
||||
<string name="actionSpeakText">Text sprechen</string>
|
||||
<string name="textToSpeak">Zu sprechender Text</string>
|
||||
<string name="toggleNotAllowed">Die Umschaltfunktion ist momentan nur für Regeln erlaubt, die NFC Tags als Auslöser haben. Für weitere Informationen lesen Sie die Hilfe.</string>
|
||||
<string name="toggleNotAllowed">Die Umkehrfunktion ist momentan nur für Regeln erlaubt, die NFC Tags als Auslöser haben. Für weitere Informationen lesen Sie die Hilfe.</string>
|
||||
<string name="errorReadingPoisAndRulesFromFile">Fehler beim Lesen von Orten und Regeln aus Datei.</string>
|
||||
<string name="noDataChangedReadingAnyway">Es scheint als wären keine Datenänderungen gespeichert worden. Allerdings könnten Änderungen im Speicher sein, die zurückgenommen werden müssen. Daher wird die Einstellungsdatei neu geladen.</string>
|
||||
<string name="bluetoothConnection">Bluetooth Verbindung</string>
|
||||
@ -367,9 +346,7 @@
|
||||
<string name="bluetoothDeviceInRange">Bluetooth Gerät %1$s in Reichweite.</string>
|
||||
<string name="bluetoothDeviceOutOfRange">Bluetooth Gerät %1$s außer Reichweite.</string>
|
||||
<string name="anyDevice">irgendeinem Gerät</string>
|
||||
<string name="ruleDoesntApplyNotTheCorrectDeviceName">Regel trifft nicht zu. Nicht der korrekte Bluetooth-Geräte-Name.</string>
|
||||
<string name="ruleDoesntApplyNotTheCorrectDeviceAddress">Regel trifft nicht zu. Nicht die korrekte Bluetooth-Geräte-Adresse.</string>
|
||||
<string name="noDevice">kein Gerät</string>
|
||||
<string name="noDevice">kein Gerät</string>
|
||||
<string name="selectDeviceFromList">Gerät aus Liste</string>
|
||||
<string name="connectionToDevice">Gerät verbunden</string>
|
||||
<string name="disconnectionFromDevice">Gerät getrennt</string>
|
||||
@ -377,11 +354,9 @@
|
||||
<string name="deviceOutOfRange">Gerät außer Reichweite</string>
|
||||
<string name="selectDeviceOption">Wählen Sie eine Geräteoption.</string>
|
||||
<string name="selectConnectionOption">Wählen Sie eine Verbindungsoption.</string>
|
||||
<string name="ruleDoesntApplyDeviceInRangeButShouldNotBe">Regel trifft nicht zu. Gerät ist in Reichweite, aber sollte nicht sein.</string>
|
||||
<string name="ruleDoesntApplyStateNotCorrect">Regel trifft nicht zu. Falscher Status.</string>
|
||||
<string name="triggerHeadsetPlugged">Headset Verbindung</string>
|
||||
<string name="triggerHeadsetPlugged">Headset Verbindung</string>
|
||||
<string name="actionPlayMusic">Musikplayer öffnen</string>
|
||||
<string name="headsetConnected">Headset (type: %1$s) verbunden</string>
|
||||
<string name="headsetConnected">Headset (Art: %1$s) verbunden</string>
|
||||
<string name="headsetDisconnected">Headset (type: %1$s) getrennt</string>
|
||||
<string name="headphoneSimple">Kopfhörer</string>
|
||||
<string name="headphoneMicrophone">Mikrofon</string>
|
||||
@ -414,7 +389,7 @@
|
||||
<string name="soundModeNormal">Normal</string>
|
||||
<string name="soundModeVibrate">Vibration</string>
|
||||
<string name="soundModeSilent">Stumm</string>
|
||||
<string name="enterAname">Enter a name!</string>
|
||||
<string name="enterAname">Enter a name.</string>
|
||||
<string name="noChangeSelectedProfileDoesntMakeSense">Keine Veränderungen ausgewählt. Profil macht so keinen Sinn.</string>
|
||||
<string name="noProfilesCreateOneFirst">Es existieren keine Profile. Erstellen Sie erst eins.</string>
|
||||
<string name="errorActivatingProfile">Fehler beim Aktivieren des Profils:</string>
|
||||
@ -435,8 +410,8 @@
|
||||
<string name="noProfileChangeSoundLocked">Profil wird nicht aktiviert. Zuletzt aktiviertes Profil ist gesperrt worden.</string>
|
||||
<string name="currentVolume">Momentane Lautstärke</string>
|
||||
<string name="enterValidReferenceValue">Geben Sie einen gültigen Referenzwert ein.</string>
|
||||
<string name="volumeTest">Lautstärkentest</string>
|
||||
<string name="volumeTesterExplanation">Um einen dB Wert für die Lautstärkemessung zu berechnen müssen Sie einen sogenannten physikalischen Referenzwert angeben. Bitte lesen Sie bei Wikipedia nach, um mehr zu erfahren. Dieser Wert wird höchstwahrscheinlich für jedes Smartphone oder Tablet anders sein, deshalb diese Testanwendung. Verschieben Sie den Regler, um den gegenwärtig definierten Wert zu ändern. Je höher der Referenzwert desto niedriger wird der dB Wert. Es werden alle paar %1$s Sekunden neue Messungen vorgenommen und das Ergebnis unten angezeigt. Drücken Sie den zurück-Button, wenn Sie einen passenden Wert gefunden haben.</string>
|
||||
<string name="volumeTest">Lautstärkekalibrierung</string>
|
||||
<string name="volumeCalibrationExplanation">Um einen dB Wert für die Lautstärkemessung zu berechnen müssen Sie einen sogenannten physikalischen Referenzwert angeben. Bitte lesen Sie bei Wikipedia nach, um mehr zu erfahren. Dieser Wert wird höchstwahrscheinlich für jedes Smartphone oder Tablet anders sein, deshalb diese Testanwendung. Verschieben Sie den Regler, um den gegenwärtig definierten Wert zu ändern. Je höher der Referenzwert desto niedriger wird der dB Wert. Es werden alle paar %1$s Sekunden neue Messungen vorgenommen und das Ergebnis unten angezeigt. Drücken Sie den zurück-Button, wenn Sie einen passenden Wert gefunden haben.</string>
|
||||
<string name="settingsWillTakeTime">Manche Einstellungen können nicht übernommen werden bevor der Dienst neu gestartet wird.</string>
|
||||
<string name="rootExplanation">Sie müssen Ihr Telefon rooten, damit diese Funktion funktionieren kann. Danach müssen Sie "Regel manuell ausführen", um den SuperUser Berechtigungsdialog zu zeigen. Wenn dieser erscheint, müssen Sie den Haken setzen, der es immer erlaubt. Ansonsten kann die Regel nicht funktionieren, wenn Sie das Telefon gerade nicht benutzen und demnach den nächsten Dialog nicht genehmigen können.</string>
|
||||
<string name="errorWritingConfig">Fehler beim Schreiben der Konfiguration. Gibt es einen beschreibbaren Speicher, und wurde alle Berechtigungen gegeben?</string>
|
||||
@ -461,7 +436,6 @@
|
||||
<string name="appRequiresPermissiontoAccessExternalStorage">Automation benötigt Rechte, um auf den Speicher zuzugreifen, um seine Konfiguration und Regeln lesen zu können.</string>
|
||||
<string name="mainScreenPermissionNote">Automation benötigt mehr Rechte, um vollständig funktionsfähig zu sein. Klicken Sie auf diesen Text, um mehr zu erfahren und die fehlenden Rechte zu beantragen.</string>
|
||||
<string name="invalidDevice">Ungültiges Gerät</string>
|
||||
<string name="google_app_id">your app id</string>
|
||||
<string name="logFileMaxSizeSummary">Maximale Größe der Protokolldatei in Megabyte. Wenn sie größer wird, wird sie rotiert.</string>
|
||||
<string name="logFileMaxSizeTitle">Maximale Größe des Protokolls [Mb]</string>
|
||||
<string name="android.permission.READ_CALL_LOG">Telefonprotokoll lesen</string>
|
||||
@ -501,14 +475,14 @@
|
||||
<string name="textMessageAnnotations">Sie können direkt eine Telefonnummer eingeben. Alternativ können Sie eine aus Ihren Kontakten auswählen. Aber: Es wird immer die Nummer gespeichert, nicht der Kontakt referenziert. D.h., wenn Sie einmal die Nummer eines Kontaktes ändern, müssen Sie diese Regel aktualisieren.</string>
|
||||
<string name="importNumberFromContacts">Von Kontakten importieren</string>
|
||||
<string name="android9RecordAudioNotice">Falls Sie die Umgebungslautstärke als Auslöser benutzen: Leider hat sich Google entschlossen ab Android Version 9 (Pie) Hintergrundanwendungen den Zugriff auf das Mikrofon zu verweigern. Das bedeutet, dass dieser Auslöser keinen Effekt mehr hat und keine Regeln auslösen wird.</string>
|
||||
<string name="android10WifiToggleNotice">Leider hat Google in Android 10 die Möglichkeit entfernt, daß normale Anwendungen WLAN an- oder ausschalten können. Diese Aktion wird also keinen Effekt auf Ihrem Gerät haben.</string>
|
||||
<string name="android10WifiToggleNotice">Leider hat Google in Android 10 die Möglichkeit entfernt, daß normale Anwendungen WLAN an- oder ausschalten können. Nur, wenn Ihr Gerät gerootet ist, sollte es weiterhin funktionieren. Wenn nicht, wird diese Aktion leider keinen Effekt mehr auf Ihrem Gerät haben.</string>
|
||||
<string name="messageNotShownAgain">Diese Nachricht wird nicht wieder angezeigt.</string>
|
||||
<string name="chooseActivityHint">In diesem letzten Auswahlfeld müssen Sie eine bestimmte \"Activity\" auswählen. Vereinfacht ist das ein bestimmtes Fenster der ausgewählten Anwendung. Wenn Sie nicht wissen, welche Sie auswählen sollen, ist es normalerweise eine gute Idee zunächst welche auszuprobieren, die \"main\" oder \"launcher\" im Namen haben.</string>
|
||||
<string name="edit">Bearbeiten</string>
|
||||
<string name="clickAndHoldForOptions">Klicken und halten Sie ein Objekt für Optionen.</string>
|
||||
<string name="startAutomationAsService">Automation als Dienst starten</string>
|
||||
<string name="setScreenBrightness">Set screen brightness</string>
|
||||
<string name="setScreenBrightnessEnterValue">Enter the desired brightness (from 0 to 100).</string>
|
||||
<string name="setScreenBrightness">Bildschirmhelligkeit einstellen</string>
|
||||
<string name="setScreenBrightnessEnterValue">Geben Sie den gewünschten Helligkeitswert ein (von 0 bis 100).</string>
|
||||
<string name="autoBrightness">Automatische Helligkeitseinstellung verwenden</string>
|
||||
<string name="apply">übernehmen</string>
|
||||
<string name="brightnessAuto">automatische Helligkeit</string>
|
||||
@ -563,7 +537,7 @@
|
||||
<string name="notificationTriggerExplanation">Dieser Auslöser reagiert auf Benachrichtigungen anderer Anwendung im Benachrichtigungsbereich von Android (oder wenn diese geschlossen werden). Sie können eine bestimmte Anwendung festlegen, von die Nachricht stammen muß. Wenn nicht, zählt jede Benachrichtigung. Sie können auch Zeichenketten für Titel oder Nachrichteninhalt festlegen, die enthalten sein müssen. Die Groß-/Kleinschreibung wird hierbei nicht berücksichtigt.</string>
|
||||
<string name="addParameters">Parameter hinzufügen</string>
|
||||
<string name="errorRunningRule">Fehler beim Ausführen einer Regel.</string>
|
||||
<string name="startAppChoiceNote">Hier haben Sie 2 grundsätzliche Optionen:\n\n1. Sie können ein Programm starten, indem Sie eine Activity auswählen.\nStellen Sie sich das so vor, daß Sie ein bestimmtes Fenster einer Anwendung vorauswählen, in das man direkt springt. Behalten Sie im Kopf, daß das nicht immer funktionieren wird. Das liegt daran, daß die Fenster einer Anwendung miteinander interagieren können, sich u.U. Parameter übergeben. Wenn man jetzt ganz kalt in ein bestimmtes Fenster springt, könnte dieses zum Start z.B. bestimmte Parameter erwarten - die fehlen. So könnte es passieren, daß das Fenster zwar versucht zu öffnen, das aber nicht klappt und es somit nie wirlich sichtbar wird. Versuchen Sie\'s trotzdem!\nSie können den Pfad manuell eingeben, sollten aber den Auswählen-Knopf benutzen. Wenn Sie es dennoch manuell eingeben, geben Sie den PackageName ins obere Feld ein und den vollen Pfad der Activity ins untere.\n\n2. Auswahl per Action\nIm Gegensatz zur Auswahl eines bestimmten Fensters, können Sie ein Programm auch über eine Action starten lassen. Stellen Sie sich das so vor als würden Sie in den Wald rufen \"Ich hätte gerne XYZ\" und falls eine Anwendung installiert ist, die das liefern kann, wird sie gestartet. Ein gutes Beispiel wäre zum Beispiel "Browser starten" - es könnten sogar mehrere installiert sein, die das können (aber normalerweise gibts eine, die als Standard eingestellt ist).\nDiese Action müssen Sie manuell eingeben. Der PackageName ist hier optional. Behalten Sie dabei im Auge, daß mögliche Variablen nicht aufgelöst werden. Beispielsweise werden Sie häufig im Internet finden, daß man die Kamera über die Action \"MediaStore.ACTION_IMAGE_CAPTURE\" starten kann. Das ist grundsätzlich nicht richtig, wird aber nicht direkt funktionieren, denn das ist nur eine Variable. Sie müssen dann einen Blick in die Android Dokumentation werfen, wo Sie sehen werden, daß sich hinter dieser Variable eigentlich der Wert \"android.media.action.IMAGE_CAPTURE\" verbirgt. Gibt man diesen in das Feld ein, wird\'s funktionieren.</string>
|
||||
<string name="startAppChoiceNote">Hier haben Sie 2 grundsätzliche Optionen:\n\n1. Sie können ein Programm starten, indem Sie eine Activity auswählen.\nStellen Sie sich das so vor, daß Sie ein bestimmtes Fenster einer Anwendung vorauswählen, in das man direkt springt. Behalten Sie im Kopf, daß das nicht immer funktionieren wird. Das liegt daran, daß die Fenster einer Anwendung miteinander interagieren können, sich u.U. Parameter übergeben. Wenn man jetzt ganz kalt in ein bestimmtes Fenster springt, könnte dieses zum Start z.B. bestimmte Parameter erwarten - die fehlen. So könnte es passieren, daß das Fenster zwar versucht zu öffnen, das aber nicht klappt und es somit nie wirlich sichtbar wird. Versuchen Sie\'s trotzdem!\nSie können den Pfad manuell eingeben, sollten aber den Auswählen-Knopf benutzen. Wenn Sie es dennoch manuell eingeben, geben Sie den PackageName ins obere Feld ein und den vollen Pfad der Activity ins untere.\n\n2. Auswahl per Action\nIm Gegensatz zur Auswahl eines bestimmten Fensters, können Sie ein Programm auch über eine Action starten lassen. Stellen Sie sich das so vor als würden Sie in den Wald rufen \"Ich hätte gerne XYZ\" und falls eine Anwendung installiert ist, die das liefern kann, wird sie gestartet. Ein gutes Beispiel wäre zum Beispiel "Browser starten" - es könnten sogar mehrere installiert sein, die das können (aber normalerweise gibts eine, die als Standard eingestellt ist).\nDiese Action müssen Sie manuell eingeben. Der PackageName ist hier optional. Behalten Sie dabei im Auge, daß mögliche Variablen nicht aufgelöst werden. Beispielsweise werden Sie häufig im Internet finden, daß man die Kamera über die Action \"MediaStore.ACTION_IMAGE_CAPTURE\" starten kann. Das ist grundsätzlich richtig, wird aber nicht direkt funktionieren, denn das ist nur eine Variable. Sie müssen dann einen Blick in die Android Dokumentation werfen, wo Sie sehen werden, daß sich hinter dieser Variable eigentlich der Wert \"android.media.action.IMAGE_CAPTURE\" verbirgt. Gibt man diesen in das Feld ein, wird\'s funktionieren.</string>
|
||||
<string name="cantFindSoundFile">Kann die Audiodatei %1$s nicht finden und daher auch nicht abspielen.</string>
|
||||
<string name="startAppByActivity">per Activity</string>
|
||||
<string name="startAppByAction">per Action</string>
|
||||
@ -604,4 +578,85 @@
|
||||
<string name="noKnownWifis">Es gibt keine bekannten WLANs auf Ihrem Gerät.</string>
|
||||
<string name="needLocationPermForWifiList">Die Liste von WLANs auf Ihrem Gerät könnte verwendet werden, um zu ermitteln, an welchen Orten Sie waren. Deshalb ist die Positions-Berechtigung nötig, um die Liste dieser WLANs zu laden. Wenn Sie eines aus der Liste auswählen möchten, müssen Sie diese Berechtigung gewähren. Wenn nicht, können Sie immer noch eines manuell eingeben.</string>
|
||||
<string name="urlToTriggerExplanation">Diese Funktion öffnet NICHT den Browser, sondern löst die HTTP Anfrage im Hintergrund aus. Sie können das z.B. benutzen, um Befehle an Ihre Heimautomatisierung zu schicken.</string>
|
||||
<string name="clone">Klonen</string>
|
||||
<string name="updateAvailable">Es gibt eine neue Version der Anwendung. Möchten Sie den Browser öffnen, um sie herunterzuladen?</string>
|
||||
<string name="automaticUpdateCheckSummary">Nur bei der APK Version.</string>
|
||||
<string name="automaticUpdateCheck">Nach Updates suchen</string>
|
||||
<string name="locationFound">Position gefunden. Der vorgeschlagene Mindestradius für Orte beträgt %1$d m.</string>
|
||||
<string name="locationFoundInaccurate">Es konnte nur eine ungenaue Position gefunden werden. Das funktioniert u.U. nicht zuverlässig. Der vorgeschlagene Mindestradius für Orte beträgt %1$d m.</string>
|
||||
<string name="pleaseGiveBgLocation">Gehen Sie auf dem nächsten Bildschirm bitte auf Berechtigungen, dann Position. Wählen Sie dort Immer erlauben aus, um Automation zu ermöglichen, die Position im Hintergrund zu ermitteln.</string>
|
||||
<string name="noLocationCouldBeFound">Leider konnte nach einem Limit von %1$s Sekunden keine Position gefunden werden.</string>
|
||||
<string name="vibrate">Vibrieren</string>
|
||||
<string name="test">Ausprobieren</string>
|
||||
<string name="VibrateExplanation">Geben Sie eine Vibrationsdauer, gefolgt von einem Komma ein, dann eine Pausendauer. Sie können so viele Vibrationen eingeben, wie sie möchten. Trennen Sie sie wieder mit Kommata.\nZ.B. wird das Muster 100,500,500,1000,100 100ms vibrieren, 500ms warten, 500ms vibrieren, 1000ms warten, 100ms vibrieren.\nWenn Sie denken, daß eine Vibration verschluckt wird, verlängern Sie die Pause vor ihr.</string>
|
||||
<string name="pleaseEnterValidVibrationPattern">Bitte geben Sie ein gültiges Vibrationsmuster ein.</string>
|
||||
<string name="tabsPlacement">Position der Tableiste</string>
|
||||
<string name="top">Oben</string>
|
||||
<string name="bottom">Unten</string>
|
||||
<string name="tabsPlacementSummary">Wol soll die Taskleiste angezeigt werden?</string>
|
||||
<string name="tones">Klingeltöne</string>
|
||||
<string name="miscellaneous">Verschiedenes</string>
|
||||
<string name="dnd">Nicht stören</string>
|
||||
<string name="dndOff">Nicht stören aus</string>
|
||||
<string name="dndAlarms">Alarme durchlassen</string>
|
||||
<string name="dndPriority">Prioritätsbenachrichtigungen durchlassen</string>
|
||||
<string name="dndNothing">Nichts durchlassen</string>
|
||||
<string name="repeatEveryXseconds">Alle x Sekunden wiederholen</string>
|
||||
<string name="repeatEveryXsecondsWithVariable">alle %1$s Sekunden wiederholen</string>
|
||||
<string name="donate">Spenden</string>
|
||||
<string name="notice">Hinweis</string>
|
||||
<string name="automationNotificationsIgnored">Wenn Sie keine bestimmte Anwendung auswählen, werden Benachrichtigungen von Automation selbst ignoriert, um Schleifen zu verhindern.</string>
|
||||
<string name="elementSkipped">Ein Element der Konfigurationsdatei konnte nicht gelesen werden. Die Datei könnte von einer neueren Programmversion erstellt worden sein.</string>
|
||||
<string name="permissionsRequiredNotAvailable">Ihre Regeln benötigen Berechtigungen, die die installierte Variante von Automation nicht unterstützt.</string>
|
||||
<string name="dndRemarks">Feineinstellungen (wie Telefonanrufe erlauben, Auswählen bestimmter Telefonnummern, etc.) können nur in den Systemeinstellungen gesetzt werden.</string>
|
||||
<string name="wifiApi30">Weil Google wieder einen weiteren Teil von Android kaputt gemacht hat, können ab API 30 nur noch jede WLANs angezeigt werden, die sich gegenwärtig in Reichweite befinden, nicht mehr alle, zu denen das Gerät einmal verbunden war.</string>
|
||||
<string name="smsDialogNotice">Wenn Sie in diesem Programm noch keine SMS-senden Aktion benutzt haben, zeigt Android wahrscheinlich beim ersten Ausführen einen Bestätigungsdialog an. Sie müssen das Häkchen bei \"Immer erlauben\" setzen und bestätigen, wenn Sie möchten, daß diese Aktion im Hintergrund ausgeführt werden kann. Es wird daher empfohlen, diese Regel einmalig manuell auszuführen, um diesen Dialog zu provozieren.</string>
|
||||
<string name="silentTriggersDnd">Hinweis: Der Stumm-Modus löst auf neuren Geräten häufig die Funktion \"Nicht stören\" aus. Wenn das auf Ihrem Gerät passiert, wird empfohlen stattdessen den Normalen Modus zu verwenden und alle Lautstärken auf 0 zu reduzieren.</string>
|
||||
<string name="deviceOrientation">Geräteausrichtung</string>
|
||||
<string name="tolerance">Toleranz (0-180)</string>
|
||||
<string name="orientationAzimuth">Azimut:</string>
|
||||
<string name="orientationPitch">Neigung:</string>
|
||||
<string name="enterValidNumbersIntoAllFields">Geben Sie gültige Nummern in allen Feldern ein.</string>
|
||||
<string name="orientationRoll">Rollen:</string>
|
||||
<string name="wouldCurrentlyApply">Würde gerade zutreffen?</string>
|
||||
<string name="deviceIsInCertainOrientation">Das Gerät hat eine bestimmte Ausrichtung</string>
|
||||
<string name="toleranceOf180OnlyAllowedIn2Fields">Eine Toleranz von 180 ist nur für zwei Toleranz-Felder erlaubt, nicht alle drei. Andernfalls würde der Auslöser immer zutreffen.</string>
|
||||
<string name="unknown">unbekannt</string>
|
||||
<string name="orientation">Ausrichtung</string>
|
||||
<string name="turnScreenOnOrOff">Bildschirm ein- oder ausschalten</string>
|
||||
<string name="turnScreenOn">Bildschirm einschalten</string>
|
||||
<string name="turnScreenOff">Bildschirm ausschalten</string>
|
||||
<string name="mustApply">Muß zutreffen</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalTitle">Signal Häufigkeit</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalSummary">Neue Signale nur alle x Millisekunden akzeptieren</string>
|
||||
<string name="deviceOrientationSettings">Geräteausrichtungseinstellungen</string>
|
||||
<string name="explanationDeviceOrientationDirection">Wenn das Häkchen gesetzt ist, bedeutet das, daß das Gerät in der angegebenen Ausrichtung sein muß. Wenn es nicht gesetzt ist, führt jede andere Ausrichtung zu einem positiven Ergebnis.</string>
|
||||
<string name="deviceOrientationExplanation">Wenn Sie Ihr Gerät bewegen, werden die Zahlen unten aktualisiert. Was Sie hier sehen können, ist die momentane Ausrichtung Ihres Geräts, gemessen in Grad. Wenn das Gerät in der gewünschten Ausrichtung ist, klicken Sie den \"übernehmen\" Knopf, um die Werte in die \"gewünscht\" Felder zu übertragen.\nWeil es sehr unwahrscheinlich ist, daß Sie diese exakte Ausrichtung jemals wieder erreichen, müssen Sie Toleranzen eingeben. Dies ist der Winkel in Grad, der in jede Richtung noch akzeptiert wird. 15° entsprechen somit einem Gesamtwinkel von 30°, 15 in jede Richtung.\nWenn Ihnen nur eine bestimmte Achse wichtig ist, können Sie eine Toleranz von 180° für die anderen beiden Richtungen angeben.</string>
|
||||
<string name="actionSetBluetoothTethering">Bluetooth Tethering</string>
|
||||
<string name="actionTurnBluetoothTetheringOn">Bluetooth Tethering einschalten</string>
|
||||
<string name="actionTurnBluetoothTetheringOff">Bluetooth Tethering ausschalten</string>
|
||||
<string name="enterRepetitionTime">Sie müssen eine positive Ganzzahl als Wiederholungszeit eingeben.</string>
|
||||
<string name="btTetheringNotice">Diese Funktion funktioniert bestätigt bis einschließlich Android 8.0. Ab einer höheren Version funktioniert sie nicht mehr, aber ich ich kann mangels physischer Geräte nicht sagen, aber welcher genau. Unter Android 11 funktioniert es definitiv nicht mehr. Wenn Sie eine Version dazwischen haben, lassen Sie mich bitte wissen, ob es funktioniert oder nicht.</string>
|
||||
<string name="triggerWrong">Mit diesem Auslöser stimmt etwas nicht. Er konnte nicht korrekt geladen werden.</string>
|
||||
<string name="android.permission.BIND_DEVICE_ADMIN">Geräte Administrator</string>
|
||||
<string name="deviceAdminNote">Geräte Administrator Rechte werden für mindestens 1 Regel benötigt, die Sie angelegt haben.</string>
|
||||
<string name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS">Von der Akku-Optimierung ausschließen</string>
|
||||
<string name="recommendedForBetterReliability">Empfohlen für bessere Zuverlässigkeit</string>
|
||||
<string name="needsToBeActive">Muß aktiv sein</string>
|
||||
<string name="checkSettings">Einstellungen überprüfen</string>
|
||||
<string name="profileActive">Profil %1$s ist aktiv</string>
|
||||
<string name="profileNotActive">Profil %1$s ist nicht aktiv</string>
|
||||
<string name="profileTriggerCheckSettings">Wenn dieses Häkchen nicht gesetzt ist, wird nur geprüft, ob das ausgewählte Profil zuletzt aktiviert wurde. Es ist egal, ob Audio-Einstellungen von außerhalb verändert wurden.\nWenn das Häkchen aber gesetzt ist, müssen die aktuellen Audio-Einstellungen auch wirklich genau so gesetzt sein, wie im Profil definiert. ACHTUNG: Der Klingelton selbst kann derzeit noch nicht überprüft werden.</string>
|
||||
<string name="profileCouldNotBeDeleted">Profil konnte nicht gelöscht werden.</string>
|
||||
<string name="ruleXIsUsingProfileY">Dieses Profil kann nicht gelöscht werden. Regel %s$1 verwendet noch Profil %s$2.</string>
|
||||
<string name="noRepetition">keine Wiederholung</string>
|
||||
<string name="usingAuthentication">mit Authentifizierung</string>
|
||||
<string name="toNumber">zu Nummer</string>
|
||||
<string name="message">Nachricht</string>
|
||||
<string name="onDays">an Tagen</string>
|
||||
<string name="notSet">nicht gesetzt</string>
|
||||
<string name="takeLauncherActivity">Automatisch auswählen</string>
|
||||
<string name="pickActivityManually">Manuell auswählen</string>
|
||||
<string name="launcherOrManualExplanation">Einfacher Modus: Automation kann versuchen, die Start-Activity des Zielprogramms automatisch zu finden.\nAlternativ können Sie die gewünschte Activity auch manuell auswählen.\nWelche Variante möchten Sie?</string>
|
||||
<string name="launcherNotFound">Eine Start-Activity dieser Anwendung konnte nicht gefunden werden. Sie müssen manuell eine auswählen.</string>
|
||||
</resources>
|
@ -1,20 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="ruleActivate">Estoy activando norma %1$s</string>
|
||||
<string name="ruleActivate">Estoy activando regla %1$s</string>
|
||||
<string name="profileActivate">Estoy activando perfil %1$s</string>
|
||||
<string name="ruleActivateToggle">Estoy activando norma %1$s en el modo del invertir</string>
|
||||
<string name="ruleActivateToggle">Estoy activando regla %1$s en el modo de invertir</string>
|
||||
<string name="addPoi">Crear sitio</string>
|
||||
<string name="addRule">Crear norma</string>
|
||||
<string name="addRule">Crear regla</string>
|
||||
<string name="poiList">Lista de sitios:</string>
|
||||
<string name="ruleList">Lista de normas:</string>
|
||||
<string name="ruleList">Lista de reglas:</string>
|
||||
<string name="pleaseEnterValidName">Inserte un nombre válido, por favor.</string>
|
||||
<string name="pleaseSpecifiyTrigger">Inserta al menos una condición, por favor.</string>
|
||||
<string name="pleaseSpecifiyAction">Inserta al menos una acción, por favor.</string>
|
||||
<string name="serviceWontStart">No hay normas definidas. Servicio no enciende.</string>
|
||||
<string name="pleaseSpecifiyTrigger">Inserte al menos una condición, por favor.</string>
|
||||
<string name="pleaseSpecifiyAction">Inserte al menos una acción, por favor.</string>
|
||||
<string name="serviceWontStart">No hay reglas definidas. Servicio no enciende.</string>
|
||||
<string name="serviceStarted">Automation servicio ha iniciado.</string>
|
||||
<string name="version">Versión %1$s.</string>
|
||||
<string name="distanceBetween">Distancia entre el sitio GPS y el sitio red está %1$d metros. Este +1m debe ser el minimo.</string>
|
||||
<string name="comparing">Tengo tanto sitio red como sitio gps. Estoy comparando...</string>
|
||||
<string name="distanceBetween">Distancia entre el sitio GPS y el sitio red está %1$d metros. Este +1m debe ser el mínimo.</string>
|
||||
<string name="positioningWindowNotice">Si está en una edificación vaya cerca de una ventana hasta que una posición haya sido encontrada. Sino podria durar mucho tiempo o no seria posible.</string>
|
||||
<string name="gettingPosition">Buscando posición. Espere, por favor...</string>
|
||||
<string name="yes">Si</string>
|
||||
@ -25,15 +24,15 @@
|
||||
<string name="thursday">Jueves</string>
|
||||
<string name="friday">Viernes</string>
|
||||
<string name="saturday">Sábado</string>
|
||||
<string name="headphoneMicrophone">Microfóno</string>
|
||||
<string name="whatsThis">Que es eso?</string>
|
||||
<string name="headphoneMicrophone">Micrófono</string>
|
||||
<string name="whatsThis">Qué es esto?</string>
|
||||
<string name="privacyLocationingTitle">Solo usar localización privada</string>
|
||||
<string name="volumeAlarms">Alarmas</string>
|
||||
<string name="change">modificar</string>
|
||||
<string name="soundModeNormal">Normal</string>
|
||||
<string name="soundModeVibrate">Vibración</string>
|
||||
<string name="soundModeSilent">Silencio</string>
|
||||
<string name="enterAname">Enter a name!</string>
|
||||
<string name="enterAname">Inserte un nombre.</string>
|
||||
<string name="username">Nombre de usuario</string>
|
||||
<string name="ok">Ok</string>
|
||||
<string name="continueText">continuar</string>
|
||||
@ -44,16 +43,16 @@
|
||||
<string name="sendTextMessage">Enviar mensaje SMS</string>
|
||||
<string name="importNumberFromContacts">Importar número del directorio</string>
|
||||
<string name="edit">Editar</string>
|
||||
<string name="textToSend">Texto de enviar</string>
|
||||
<string name="textToSend">Texto para enviar</string>
|
||||
<string name="password">Contraseña</string>
|
||||
<string name="showOnMap">Monstrar en una mapa</string>
|
||||
<string name="headphoneAny">Igual</string>
|
||||
<string name="showOnMap">Mostrar en un mapa</string>
|
||||
<string name="headphoneAny">Cualquier</string>
|
||||
<string name="sunday">Domingo</string>
|
||||
<string name="pleaseEnterValidLatitude">Por favor inserte un grado de latitud válido.</string>
|
||||
<string name="pleaseEnterValidLongitude">Por favor inserte un grado de longitud válido.</string>
|
||||
<string name="pleaseEnterValidRadius">Por favor inserte un radio válido.</string>
|
||||
<string name="selectOneDay">Por favor seleccione al menos un dia.</string>
|
||||
<string name="whatToDoWithRule">Hacer que con la norma?</string>
|
||||
<string name="selectOneDay">Por favor seleccione al menos un día.</string>
|
||||
<string name="whatToDoWithRule">Hacer que con la regla?</string>
|
||||
<string name="whatToDoWithPoi">Hacer que con el sitio?</string>
|
||||
<string name="whatToDoWithProfile">Hacer que con el perfil?</string>
|
||||
<string name="delete">eliminar</string>
|
||||
@ -61,7 +60,7 @@
|
||||
<string name="serviceStopped">Servicio automation terminado.</string>
|
||||
<string name="logServiceStopping">Terminando servicio.</string>
|
||||
<string name="stillGettingPosition">Todavia buscando posición</string>
|
||||
<string name="lastRule">Última norma:</string>
|
||||
<string name="lastRule">Última regla:</string>
|
||||
<string name="at">el</string>
|
||||
<string name="service">Servicio:</string>
|
||||
<string name="getCurrentPosition">Buscar posición actual</string>
|
||||
@ -69,14 +68,14 @@
|
||||
<string name="deletePoi">Eliminar posición</string>
|
||||
<string name="latitude">Latitud</string>
|
||||
<string name="longitude">Longitud</string>
|
||||
<string name="ruleName">Nombre de la norma</string>
|
||||
<string name="ruleName">Nombre de la regla</string>
|
||||
<string name="triggers">Condición(es)</string>
|
||||
<string name="triggersComment">y-conectado (todo tiene que aplicar al mismo tiempo)</string>
|
||||
<string name="addTrigger">Añadir condición</string>
|
||||
<string name="actions">Acción(es)</string>
|
||||
<string name="actionsComment">(ejecutado en esta orden)</string>
|
||||
<string name="addAction">Añadir acción</string>
|
||||
<string name="saveRule">Guardar norma</string>
|
||||
<string name="saveRule">Guardar regla</string>
|
||||
<string name="start">Inicio</string>
|
||||
<string name="end">Final</string>
|
||||
<string name="save">Guardar</string>
|
||||
@ -89,7 +88,7 @@
|
||||
<string name="noPoisSpecified">Primero tiene que crear sitios.</string>
|
||||
<string name="selectPoi">Seleccionar sitio</string>
|
||||
<string name="selectTypeOfAction">Seleccione tipo de la acción</string>
|
||||
<string name="connected">connectado</string>
|
||||
<string name="connected">conectado</string>
|
||||
<string name="stopped">terminado</string>
|
||||
<string name="started">Comenzado</string>
|
||||
<string name="disconnected">desconectado</string>
|
||||
@ -97,13 +96,13 @@
|
||||
<string name="whatToDoWithTrigger">Hacer que con la condición?</string>
|
||||
<string name="whatToDoWithAction">Hacer que con la acción?</string>
|
||||
<string name="radiusHasToBePositive">Radio tiene que ser un número positivo.</string>
|
||||
<string name="poiStillReferenced">Todavia hay normas que usan este sitio (%1$s). No puedo eliminarlo.</string>
|
||||
<string name="poiStillReferenced">Todavia hay reglas que usan este sitio (%1$s). No puedo eliminarlo.</string>
|
||||
<string name="generalSettings">Configuración general.</string>
|
||||
<string name="startAtSystemBoot">Iniciar al boot.</string>
|
||||
<string name="writeLogFile">Escribir un archivo protocolo</string>
|
||||
<string name="wifiState">Estado wifi</string>
|
||||
<string name="showHelp">Descripción</string>
|
||||
<string name="rules">Normas</string>
|
||||
<string name="rules">Reglas</string>
|
||||
<string name="timeframes">Intervalo</string>
|
||||
<string name="helpTitleEnergySaving">Configuración de ahorro de energia</string>
|
||||
<string name="speedMaximumTime">Tiempo en minutos</string>
|
||||
@ -132,17 +131,17 @@
|
||||
<string name="closestPoi">sitio mas cerca</string>
|
||||
<string name="poi">Posición</string>
|
||||
<string name="pois">posiciónes</string>
|
||||
<string name="serviceNotRunning">Servicio not esta activo</string>
|
||||
<string name="serviceNotRunning">Servicio no está activo</string>
|
||||
<string name="general">General</string>
|
||||
<string name="startServiceAfterAppUpdate">Encender servicio después un update si estuve activado</string>
|
||||
<string name="startServiceAfterAppUpdateShort">Encender servicio después un update</string>
|
||||
<string name="startServiceAfterAppUpdate">Encender servicio después de un update si estuvo activado.</string>
|
||||
<string name="startServiceAfterAppUpdateShort">Encender servicio después de un update</string>
|
||||
<string name="cancel">Cancelar</string>
|
||||
<string name="wifiName">Nombre de wifi</string>
|
||||
<string name="wifiConnection">Coneción a un wifi</string>
|
||||
<string name="exceeding">exedendo</string>
|
||||
<string name="droppingBelow">estendo menos que</string>
|
||||
<string name="anyWifi">algun wifi</string>
|
||||
<string name="selectApplication">Elija la app</string>
|
||||
<string name="wifiConnection">Conexión a un wifi</string>
|
||||
<string name="exceeding">excediendo</string>
|
||||
<string name="droppingBelow">estando menos que</string>
|
||||
<string name="anyWifi">algún wifi</string>
|
||||
<string name="selectApplication">Elija app</string>
|
||||
<string name="selectPackageOfApplication">Elija el paquete de la app</string>
|
||||
<string name="selectActivityToBeStarted">Elija la actividad de la app</string>
|
||||
<string name="errorStartingOtherActivity">Error encendiendo otra app</string>
|
||||
@ -151,34 +150,34 @@
|
||||
<string name="stringNotAllowed">String %1$s not esta permitido.</string>
|
||||
<string name="noFilesImported">No pudo importar archivos.</string>
|
||||
<string name="noApplicableFilesFoundInDirectory">No pudo encontrar archivos.</string>
|
||||
<string name="prefsImportError">Hubo un error en importar la configuracion.</string>
|
||||
<string name="configurationImportedSuccessfully">Importe la configuracion con éxito.</string>
|
||||
<string name="prefsImportError">Hubo un error durante la importación de la configuración.</string>
|
||||
<string name="configurationImportedSuccessfully">La configuracion está importada con éxito.</string>
|
||||
<string name="importConfiguration">Importar configuracion</string>
|
||||
<string name="exportConfiguration">Exportar configuracion</string>
|
||||
<string name="startAppSelectionType">Método de elegir applicación</string>
|
||||
<string name="startAppSelectionType">Método de elegir aplicación</string>
|
||||
<string name="addParameters">Añade parametrós</string>
|
||||
<string name="fileDoesNotExist">Archivo no exista.</string>
|
||||
<string name="selectSoundFile">Elija archivo sonido</string>
|
||||
<string name="alwaysPlay">siempre tocar</string>
|
||||
<string name="playSound">Tocar sonido</string>
|
||||
<string name="fileDoesNotExist">Archivo no existe.</string>
|
||||
<string name="selectSoundFile">Elegir archivo sonido</string>
|
||||
<string name="alwaysPlay">reproducir siempre</string>
|
||||
<string name="playSound">Reproducir sonido</string>
|
||||
<string name="direction">dirección</string>
|
||||
<string name="anyApp">cualquier app</string>
|
||||
<string name="directionStringNotEquals">no es igual a</string>
|
||||
<string name="directionStringStartsWith">comenza con</string>
|
||||
<string name="directionStringStartsWith">comienza con</string>
|
||||
<string name="directionStringEndsWith">termina con</string>
|
||||
<string name="directionStringContains">incluye</string>
|
||||
<string name="directionStringEquals">es igual a</string>
|
||||
<string name="text">Texto</string>
|
||||
<string name="title">Titulo</string>
|
||||
<string name="notification">Notificaión</string>
|
||||
<string name="locationDisabled">Localización desactivado</string>
|
||||
<string name="title">Título</string>
|
||||
<string name="notification">Notificación</string>
|
||||
<string name="locationDisabled">Localización desactivada</string>
|
||||
<string name="error">Error</string>
|
||||
<string name="android.permission.ACCESS_BACKGROUND_LOCATION">Determinar su posición en el contexto</string>
|
||||
<string name="manageLocations">Crear p editar sitios</string>
|
||||
<string name="startScreen">Ventana incial</string>
|
||||
<string name="android.permission.ACCESS_BACKGROUND_LOCATION">Determinar su posición en el fondo.</string>
|
||||
<string name="manageLocations">Crear o editar sitios</string>
|
||||
<string name="startScreen">Ventana de inicio</string>
|
||||
<string name="positioningEngine">Metodo de localización</string>
|
||||
<string name="deviceDoesNotHaveBluetooth">Este dispositivo no tiene Bluetooth. Puede continuar pero probablemente no va a funciónar.</string>
|
||||
<string name="android.permission.READ_CALL_LOG">Leer protocolo de teléfono</string>
|
||||
<string name="android.permission.READ_CALL_LOG">Leer protocolo de llamadas</string>
|
||||
<string name="android.permission.READ_CALENDAR">Leer calendario</string>
|
||||
<string name="android.permission.ACCESS_FINE_LOCATION">Determinar la posición exacta</string>
|
||||
<string name="android.permission.ACCESS_COARSE_LOCATION">Determinar la posición aproximada</string>
|
||||
@ -188,91 +187,91 @@
|
||||
<string name="android.permission.VIBRATE">Vibrar</string>
|
||||
<string name="android.permission.MODIFY_AUDIO_SETTINGS">Modificar la configuración sonida</string>
|
||||
<string name="android.permission.RECORD_AUDIO">Grabar audio</string>
|
||||
<string name="android.permission.PROCESS_OUTGOING_CALLS">Detecar llamados saliendos</string>
|
||||
<string name="android.permission.READ_PHONE_STATE">Detecar el estado del dispositivo</string>
|
||||
<string name="android.permission.READ_EXTERNAL_STORAGE">Leer la memoria</string>
|
||||
<string name="android.permission.WRITE_EXTERNAL_STORAGE">Escribir a la memoria</string>
|
||||
<string name="android.permission.PROCESS_OUTGOING_CALLS">Detectar llamadas salientes</string>
|
||||
<string name="android.permission.READ_PHONE_STATE">Detectar el estado del dispositivo</string>
|
||||
<string name="android.permission.READ_EXTERNAL_STORAGE">Leer la almacenamiento</string>
|
||||
<string name="android.permission.WRITE_EXTERNAL_STORAGE">Escribir en el almacenamiento</string>
|
||||
<string name="android.permission.WRITE_SETTINGS">Modificar la configuración del dispositivo</string>
|
||||
<string name="android.permission.BATTERY_STATS">Determinar el estado de la batteria</string>
|
||||
<string name="android.permission.BATTERY_STATS">Determinar el estado de la bateria</string>
|
||||
<string name="android.permission.CHANGE_BACKGROUND_DATA_SETTING">Modificar la conexión internet</string>
|
||||
<string name="android.permission.ACCESS_NOTIFICATION_POLICY">Exeder configuración no molestar</string>
|
||||
<string name="android.permission.WRITE_SECURE_SETTINGS">Escribir a la memoria</string>
|
||||
<string name="apply">acplicar</string>
|
||||
<string name="publishedOn">publicitado el</string>
|
||||
<string name="android.permission.WRITE_SECURE_SETTINGS">Escribir en el almacenamiento</string>
|
||||
<string name="apply">aplicar</string>
|
||||
<string name="publishedOn">publicado el</string>
|
||||
<string name="postsNotification">%1$s crea notificación</string>
|
||||
<string name="removedNotification">notificación de %1$s removido</string>
|
||||
<string name="notificationAppears">Notificación aparece</string>
|
||||
<string name="notificationDisappears">Notificación deaparece</string>
|
||||
<string name="notificationDisappears">Notificación desaparece</string>
|
||||
<string name="startAppByActivity">a través de activity</string>
|
||||
<string name="startAppByAction">a través de action</string>
|
||||
<string name="enterValidAction">Inserte una action válida</string>
|
||||
<string name="enterPackageName">Inserte un package válido</string>
|
||||
<string name="configurationExportedSuccessfully">Exportación completada con éxito</string>
|
||||
<string name="noFileManageInstalled">No mánager archivo esta instalada</string>
|
||||
<string name="cantFindSoundFile">No puedo buscar el archivo sonido %1$s, por eso no puedo tocar lo.</string>
|
||||
<string name="ruleActive">Norma activa</string>
|
||||
<string name="triggerCharging">Batteria esta cargando</string>
|
||||
<string name="noFileManageInstalled">Administrador de archivos no esta instalada</string>
|
||||
<string name="cantFindSoundFile">No puedo buscar el archivo sonido %1$s, por eso no puedo reproducirlo.</string>
|
||||
<string name="ruleActive">Regla activa</string>
|
||||
<string name="triggerCharging">Bateria esta cargando</string>
|
||||
<string name="triggerUsb_host_connection">USB conexión a un computador</string>
|
||||
<string name="actionSetDisplayRotation">Girar monitor</string>
|
||||
<string name="actionEnableScreenRotation">activar girar monitor</string>
|
||||
<string name="actionDisableScreenRotation">desactivar girar monitor</string>
|
||||
<string name="overview">Sinopsis</string>
|
||||
<string name="enterWifiName">Inserta el nombre del wifi. Deje vacio para applicar a todos wifis.</string>
|
||||
<string name="overview">Panoramica</string>
|
||||
<string name="enterWifiName">Inserta el nombre del wifi. Deje vacio para aplicar a todos wifis.</string>
|
||||
<string name="startOtherActivity">Iniciar otra app</string>
|
||||
<string name="settings">Ajustes</string>
|
||||
<string name="bluetoothConnection">Bluetooth conexión</string>
|
||||
<string name="bluetoothConnectionTo">Bluetooth conexión to %1$s</string>
|
||||
<string name="bluetoothConnection">Conexión Bluetooth</string>
|
||||
<string name="bluetoothConnectionTo">Conexión Bluetooth con %1$s</string>
|
||||
<string name="anyDevice">cualquier dispositivo</string>
|
||||
<string name="noDevice">no dispositivo</string>
|
||||
<string name="actionPlayMusic">Abrir jugador musica</string>
|
||||
<string name="noDevice">ningun dispositivo</string>
|
||||
<string name="actionPlayMusic">Abrir reproductor de música</string>
|
||||
<string name="profiles">Perfiles</string>
|
||||
<string name="ruleHistory">Historia de normas (más ultimas al primero)</string>
|
||||
<string name="lockSoundChanges">Bloquerar modificaciónes sonidas</string>
|
||||
<string name="ruleHistory">Historia de reglas (más ultimas al primero)</string>
|
||||
<string name="lockSoundChanges">Bloquear modificaciónes de sonido</string>
|
||||
<string name="status">Estado</string>
|
||||
<string name="android.permission.ACCESS_NETWORK_STATE">Determinar el estado de la red</string>
|
||||
<string name="clickAndHoldForOptions">Clice ý ase un elemento para opciónes</string>
|
||||
<string name="clickAndHoldForOptions">Cliquee y mantenga un elemento para opciónes.</string>
|
||||
<string name="ruleLegend">Verde = activado, roja = desactivado, amarillo = no sufienctes permisos</string>
|
||||
<string name="addProfile">Añadir perfil</string>
|
||||
<string name="profile">Perfil</string>
|
||||
<string name="invalidProfileName">Nombre invalido</string>
|
||||
<string name="anotherProfileByThatName">Hay otro perfil con lo mismo nombre.</string>
|
||||
<string name="anotherProfileByThatName">Hay otro perfil con el mismo nombre.</string>
|
||||
<string name="errorActivatingProfile">Error activando perfil:</string>
|
||||
<string name="executeRulesAndProfilesWithSingleClickTitle">Activar normas/perfiles con 1 clic</string>
|
||||
<string name="executeRulesAndProfilesWithSingleClickTitle">Activar reglas/perfiles con 1 clic.</string>
|
||||
<string name="name">Nombre</string>
|
||||
<string name="useAuthentication">Usar verificación de la autenticidad</string>
|
||||
<string name="radiusWithUnit">Radio [m]</string>
|
||||
<string name="volumes">Niveles sonidos</string>
|
||||
<string name="volumes">Volumenes</string>
|
||||
<string name="volumeRingtoneNotifications">Sonido polifónico ý notificaciónes</string>
|
||||
<string name="notificationRingtone">Sonido polifónico para notificaciónes</string>
|
||||
<string name="incomingCallsRingtone">Sonido polifónico para llamadas</string>
|
||||
<string name="batteryLevel">NIvel de la bateria</string>
|
||||
<string name="incomingCallsRingtone">Sonido de llamadas</string>
|
||||
<string name="batteryLevel">Nivel de la bateria</string>
|
||||
<string name="selectBattery">Elija nivel de la bateria</string>
|
||||
<string name="triggerNoiseLevel">Nivel del rudio fondo</string>
|
||||
<string name="anotherAppIsRunning">Otra app esta encienda/terminada</string>
|
||||
<string name="triggerNoiseLevel">Nivel del ruido fondo</string>
|
||||
<string name="anotherAppIsRunning">Otra app esta encendida/terminada</string>
|
||||
<string name="airplaneMode">Modo avión</string>
|
||||
<string name="triggerHeadsetPlugged">Auriculares conectados</string>
|
||||
<string name="headsetConnected">Auriculares (tipo: %1$s) conectados</string>
|
||||
<string name="headsetDisconnected">Auriculares (tipo: %1$s) desconectados</string>
|
||||
<string name="phoneCall">Llamada</string>
|
||||
<string name="phoneNumber">Número de teléfono</string>
|
||||
<string name="enterPhoneNumber">Inserte numero de teléfono. Vacio para algun número.</string>
|
||||
<string name="phoneDirection">Elija llamada entrante o saliente</string>
|
||||
<string name="enterPhoneNumber">Inserte numero de teléfono. Vacio para algún número.</string>
|
||||
<string name="phoneDirection">Elija llamada\nentrante o saliente</string>
|
||||
<string name="headphoneSimple">Auriculares</string>
|
||||
<string name="headphoneSelectType">Elegir tipo de los auriculares</string>
|
||||
<string name="accelerometer">" Acelerómetro"</string>
|
||||
<string name="headphoneSelectType">Elija tipo de auriculares</string>
|
||||
<string name="accelerometer">Acelerómetro</string>
|
||||
<string name="gpsAccuracy">GPS exactitud [m]</string>
|
||||
<string name="soundSettings">Configuración de sonido</string>
|
||||
<string name="settingsCategoryNoiseLevelMeasurements">Medición de ruido fondo</string>
|
||||
<string name="waitBeforeNextAction">Esperar antes de la acción próxima</string>
|
||||
<string name="wakeupDevice">Despertar dispositivo</string>
|
||||
<string name="textToSpeak">Text para hablar</string>
|
||||
<string name="textToSpeak">Texto para hablar</string>
|
||||
<string name="state">Estado</string>
|
||||
<string name="setScreenBrightness">Poner luminosidad del monitor</string>
|
||||
<string name="brightnessManual">luminosidad manual del monitor</string>
|
||||
<string name="brightnessAuto">luminosidad automatico</string>
|
||||
<string name="autoBrightness">Activar luminosidad automatico</string>
|
||||
<string name="setScreenBrightnessEnterValue">Inserte luminosidad deseada (de 0 a 100).</string>
|
||||
<string name="autoBrightnessNotice">Si usa luminosidad automatica el valor probablemente no va a durar mucho tiempo.</string>
|
||||
<string name="setScreenBrightness">Poner nivel de brillo</string>
|
||||
<string name="brightnessManual">nivel de brillo manual</string>
|
||||
<string name="brightnessAuto">brillo automatico</string>
|
||||
<string name="autoBrightness">Activar brillo automatico</string>
|
||||
<string name="setScreenBrightnessEnterValue">Inserte nivel de brillo deseado (de 0 a 100).</string>
|
||||
<string name="autoBrightnessNotice">Si usa nivel de brillo automatico el valor probablemente no va a durar mucho tiempo.</string>
|
||||
<string name="actionDataConnection">Datos móviles</string>
|
||||
<string name="actionSpeakText">Hablar texto</string>
|
||||
<string name="selectToggleDirection">Activar o desactivar?</string>
|
||||
@ -280,26 +279,26 @@
|
||||
<string name="activate">Activar</string>
|
||||
<string name="deactivate">Desactivar</string>
|
||||
<string name="deactivated">desactivado</string>
|
||||
<string name="selectNoiseLevel">Elija nivel del ruido fondo</string>
|
||||
<string name="selectNoiseLevel">Elija nivel del ruido de fondo</string>
|
||||
<string name="selectSpeed">Elija velocidad</string>
|
||||
<string name="selectTypeOfActivity">Elija tipo de actividad</string>
|
||||
<string name="selectTypeOfTrigger">Elija tipo de condición</string>
|
||||
<string name="startAppStartType">Elija tipo de comienzo</string>
|
||||
<string name="android.permission.BLUETOOTH">Cambiar ajusted Bluetooth</string>
|
||||
<string name="android.permission.BLUETOOTH_ADMIN">Cambiar ajusted Bluetooth</string>
|
||||
<string name="android.permission.BLUETOOTH">Cambiar ajustes Bluetooth</string>
|
||||
<string name="android.permission.BLUETOOTH_ADMIN">Cambiar ajustes Bluetooth</string>
|
||||
<string name="moreSettings">Mas ajustes</string>
|
||||
<string name="openExamplesPage">Abrir pagina con ejemplos</string>
|
||||
<string name="openExamplesPage">Abrir página con ejemplos</string>
|
||||
<string name="activityOrActionName">Nombre del la\nactivitdad or la action</string>
|
||||
<string name="packageName">Nombre del paquete</string>
|
||||
<string name="parameterName">Nombre del parámetro</string>
|
||||
<string name="parameterValue">Valor del parámetro</string>
|
||||
<string name="addIntentValue">Añadir pareja intento</string>
|
||||
<string name="parameterType">Tipo del parámetro</string>
|
||||
<string name="phoneNumberExplanation">Puedes entrar un número, pero es opciónal. Si quieres usar un puedes elegir un de su directorio o entrar un manualmente. Adiciónalmente puedes usar expresiónes regulares. Para testar esos me gusta la pagina:</string>
|
||||
<string name="phoneNumberExplanation">Puedes introducir un número, pero es opciónal. Si quieres usar uno puedes elegir uno de su directorio o introducir uno manualmente. Adiciónalmente puedes usar expresiónes regulares. Para probar esos me gusta la pagina:</string>
|
||||
<string name="screenRotationEnabled">Rotación del monitor activado.</string>
|
||||
<string name="screenRotationDisabled">Rotación del monitor desactivado.</string>
|
||||
<string name="noPoisDefinedShort">No hay sitios.</string>
|
||||
<string name="starting">inciendo</string>
|
||||
<string name="starting">iniciando</string>
|
||||
<string name="stopping">terminando</string>
|
||||
<string name="connecting">conectando</string>
|
||||
<string name="disconnecting">desconectando</string>
|
||||
@ -307,34 +306,34 @@
|
||||
<string name="disconnectedFromWifi">desconectado a wifi \"%1$s\"</string>
|
||||
<string name="cantStopIt">No puedo terminarlo.</string>
|
||||
<string name="httpAcceptAllCertificatesTitle">Aceptar todo los certificados</string>
|
||||
<string name="httpAcceptAllCertificatesSummary">Omitir comprobar el validez de certificados (no es una bien idea)</string>
|
||||
<string name="httpAcceptAllCertificatesSummary">Omitir comprobar la validez de certificados (no es una buena idea)</string>
|
||||
<string name="httpAttemptsTimeoutTitle">Timeout [sec]</string>
|
||||
<string name="httpAttemptsTitle">Número de pruebas HTTP</string>
|
||||
<string name="httpAttemptsTimeoutSummary">Timeout de HTTP requests [segundos]</string>
|
||||
<string name="httpAttemptGapTitle">Pausa [sec]</string>
|
||||
<string name="runManually">Encender manualmente</string>
|
||||
<string name="serviceHasToRunForThat">Para este ación el servicio tiene que estar activo</string>
|
||||
<string name="serviceHasToRunForThat">Para esta acción el servicio tiene que estar activo</string>
|
||||
<string name="gpsComparison">Comparación GPS</string>
|
||||
<string name="timeoutForGpsComparisonsTitle">GPS timeout [sec]</string>
|
||||
<string name="muteTextToSpeechDuringCallsTitle">Silencio durante llamadas</string>
|
||||
<string name="anotherRuleByThatName">Ya existe otra norma con el mismo nombre.</string>
|
||||
<string name="anotherRuleByThatName">Ya existe otra regla con el mismo nombre.</string>
|
||||
<string name="settingsCategoryProcessMonitoring">Monitoreo de procesos</string>
|
||||
<string name="timeBetweenProcessMonitoringsTitle">Segundos inter monitoreos de procesos</string>
|
||||
<string name="timeBetweenProcessMonitoringsTitle">Segundos entre monitoreos de procesos</string>
|
||||
<string name="processes">Procesos</string>
|
||||
<string name="processMonitoring">Monitoreo de procesos</string>
|
||||
<string name="privacy">Política de privacidad</string>
|
||||
<string name="moveUp">Desplazar a arriba</string>
|
||||
<string name="moveDown">Desplazar a abajo</string>
|
||||
<string name="warning">Alerta</string>
|
||||
<string name="ringing">soniendo</string>
|
||||
<string name="ringing">sonando</string>
|
||||
<string name="from">de</string>
|
||||
<string name="to">a</string>
|
||||
<string name="matching">concordiando</string>
|
||||
<string name="loadWifiList">Cargar listo de wifis</string>
|
||||
<string name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">Leer notificaciónes del systema</string>
|
||||
<string name="matching">cordinando</string>
|
||||
<string name="loadWifiList">Cargar lista de wifis</string>
|
||||
<string name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">Leer notificaciónes del sistema</string>
|
||||
<string name="bluetoothFailed">No pude activar o desactivar Bluetooth. Tiene el dispositvo Bluetooth?</string>
|
||||
<string name="urlTooShort">El url tiene que tener mínimo 10 caracteres.</string>
|
||||
<string name="textTooShort">El texto tiene que tener mínimo 10 caracteres.</string>
|
||||
<string name="enterPhoneNumberAndText">Introduce un número de teléfono y un mensaje de texto.</string>
|
||||
<string name="onOff">On/Off</string>
|
||||
<string name="useTextToSpeechOnNormalSummary">Usar TextToSpeech en un perfil normal</string>
|
||||
<string name="useTextToSpeechOnVibrateSummary">Usar TextToSpeech en un perfil vibración</string>
|
||||
@ -345,55 +344,52 @@
|
||||
<string name="positioningSettings">Configuración de buscar posición</string>
|
||||
<string name="listenToWifiState">Observar estado de wifi cuando es posible</string>
|
||||
<string name="listenToAccelerometerState">Observar movimiento del dispositivo cuando wifi no está disponible</string>
|
||||
<string name="accelerometerTimer">Usar acelerómetro despues x minutos sin cambio de torre telefónica</string>
|
||||
<string name="accelerometerTimer">Usar acelerómetro después x minutos sin cambio de torre telefónica</string>
|
||||
<string name="cellMastIdleTime">Tiempo inactivo de las torres telefónicas</string>
|
||||
<string name="accelerometerThresholdDescription">Valor limite para movimientos acelerómetro</string>
|
||||
<string name="accelerometerThreshold">Valor acelerómetro</string>
|
||||
<string name="positioningThresholds">Posicionando valores</string>
|
||||
<string name="minimumDistanceChangeForGpsLocationUpdates">Minima distancia para cambio de GPS</string>
|
||||
<string name="distanceForGpsUpdate">Minimo cambio GPS [m]</string>
|
||||
<string name="minimumDistanceChangeForNetworkLocationUpdates">Minima distancia para cambio de red telefonica</string>
|
||||
<string name="distanceForNetworkUpdate">Minimo cambio red [m]</string>
|
||||
<string name="minimumDistanceChangeForGpsLocationUpdates">Mínima distancia para cambio de GPS</string>
|
||||
<string name="distanceForGpsUpdate">Mínimo cambio GPS [m]</string>
|
||||
<string name="minimumDistanceChangeForNetworkLocationUpdates">Mínima distancia para cambio de red telefonica</string>
|
||||
<string name="distanceForNetworkUpdate">Mínimo cambio red [m]</string>
|
||||
<string name="satisfactoryAccuracyGps">Exactitud necesaria para GPS en metros.</string>
|
||||
<string name="satisfactoryAccuracyNetwork">Exactitud necesaria para red en metros.</string>
|
||||
<string name="networkAccuracy">Red exactitud [m]</string>
|
||||
<string name="minimumTimeForLocationUpdates">Tiempo minimo para cambio en milisegundos para actualizar posición</string>
|
||||
<string name="timeForUpdate">Tiempo de actualizar [milisegundos]</string>
|
||||
<string name="urlLegend">Variables: Puede usar esas variables. Mientras ejecuta van a sustituir con los valores correspondientes en su dispositivo.
|
||||
Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dispositivo\n[serialnr] - el número de serie de su dispositivo\n[latitude] - su latitud\n[longitude] - su longitud\n[phonenr] - Ùltimo número de llamada realizada tanto de salida como entrante\n[d] - Dia del mes, 2 digitos con cero al comienzo\n[m] - número del mes, 2 digitos con cero al comienzo\n[Y] - Número del año, 4 digitos\n[h] - Hora, formato 12 horas con cero al comienzo\n[H] - Hora, formato 24 horas con cero al comienzo\n[i] - Minutos con cero al comienzo\n[s] - Segundos con cero al comienzo\n[ms] - milisegundos\n[notificationTitle] - Título de la última notificación\n[notificationText] - Texto de la última notificación</string>
|
||||
<string name="minimumTimeForLocationUpdates">Tiempo mínimo para cambio en milisegundos para actualizar posición</string>
|
||||
<string name="timeForUpdate">Tiempo para actualizar [milisegundos]</string>
|
||||
<string name="urlLegend">Variables: Puede usar esas variables. Mientras ejecuta van a sustituir con los valores correspondientes en su dispositivo. Incluya las paréntecis en su texto. [uniqueid] - el número único de su dispositivo [serialnr] - el número de serie de su dispositivo [latitude] - su latitud [longitude] - su longitud [phonenr] - Ùltimo número de llamada realizada tanto de salida como entrante [d] - Dia del mes, 2 digitos con cero al comienzo [m] - número del mes, 2 digitos con cero al comienzo [Y] - Número del año, 4 digitos [h] - Hora, formato 12 horas con cero al comienzo [H] - Hora, formato 24 horas con cero al comienzo [i] - Minutos con cero al comienzo [s] - Segundos con cero al comienzo [ms] - milisegundos [notificationTitle] - Título de la última notificación [notificationText] - Texto de la última notificación</string>
|
||||
<string name="screenRotationAlreadyEnabled">Rotación del monitor todavia esta activado.</string>
|
||||
<string name="screenRotationAlreadyDisabled">Rotación del monitor todavia esta desactivado.</string>
|
||||
<string name="needLocationPermForWifiList">Se puede usar la lista de wifis conocidos para determinar los sitios a cuales estuve. Por eso el permiso locación esta necesaria para cargar la lista de wifis. Si quiere elegir un de la lista tiene que conceder el permiso. En caso contrario todavia puede entrar un nombre wifi manualmente.</string>
|
||||
<string name="com.wireguard.android.permission.CONTROL_TUNNELS">Controlar conexiones de la app wireguard</string>
|
||||
<string name="shareConfigAndLogFilesWithDev">Enviar configuración y procotolo al developer (via email).</string>
|
||||
<string name="rootExplanation">Necesita permiso root para este functión. Después encenda la función \"ejecutar norma manualmente\" para presentar el permiso superuser dialogo. Es necesita elegir \"siempre permitir root para esta app\". En caso contrario la norma no puede funcionar al fondo.</string>
|
||||
<string name="helpTextRules">Todos las condiciones estan y-conectado. La norma solo va a aplicarse cuando todos las condiciones sus aplican. Si quiere O cree otra norma.</string>
|
||||
<string name="timeBetweenNoiseLevelMeasurementsSummary">Segundos inter dos ensayos de nivel de ruido</string>
|
||||
<string name="timeBetweenNoiseLevelMeasurementsTitle">Segundos inter dos ensayos de nivel de ruido</string>
|
||||
<string name="lengthOfNoiseLevelMeasurementsSummary">Duración en segundos para un ensayos de nivel de ruido</string>
|
||||
<string name="lengthOfNoiseLevelMeasurementsTitle">Duración en segundos para un ensayos de nivel de ruido</string>
|
||||
<string name="referenceValueForNoiseLevelMeasurementsSummary">Referencia fisicalo para ensayo de nivel ruido</string>
|
||||
<string name="referenceValueForNoiseLevelMeasurementsTitle">Referencia fisicalo para ensayo de nivel ruido</string>
|
||||
<string name="logLevelSummary">Nivel del registro (1=minimo, 5=maximo)</string>
|
||||
<string name="needLocationPermForWifiList">Se puede usar la lista de wifis conocidos para determinar los sitios en los cuales estuvo. Por eso el permiso de localización es necesario para cargar la lista de wifis. Si quiere elegir uno de la lista tiene que conceder el permiso. En caso contrario todavia puede introducir un nombre wifi manualmente.</string>
|
||||
<string name="com.wireguard.android.permission.CONTROL_TUNNELS">Controlar conexiones de la app Wireguard</string>
|
||||
<string name="shareConfigAndLogFilesWithDev">Enviar configuración y procotolo al desarollador (vía email).</string>
|
||||
<string name="rootExplanation">Necesita permiso root para esta función. Después encienda la función \"ejecutar regla manualmente\" para presentar el permiso superuser dialogo. Es necesario elegir \"siempre permitir root para esta app\". En caso contrario la regla no puede funcionar en segundo plano.</string>
|
||||
<string name="helpTextRules">Todas las condiciones están \"Y\"-conectadas. La regla solo va a aplicarse cuando todas las condiciones se aplican. Si quiere \"O\", cree otra regla.</string>
|
||||
<string name="timeBetweenNoiseLevelMeasurementsSummary">Segundos entre dos ensayos de nivel de ruido</string>
|
||||
<string name="timeBetweenNoiseLevelMeasurementsTitle">Segundos entre dos ensayos de nivel de ruido</string>
|
||||
<string name="lengthOfNoiseLevelMeasurementsSummary">Duración en segundos para una prueba de nivel de ruido</string>
|
||||
<string name="lengthOfNoiseLevelMeasurementsTitle">Duración en segundos para una prueba de nivel de ruido</string>
|
||||
<string name="referenceValueForNoiseLevelMeasurementsSummary">Referencia fisicalo para prueba de nivel ruido</string>
|
||||
<string name="referenceValueForNoiseLevelMeasurementsTitle">Referencia fisicalo para prueba de nivel ruido</string>
|
||||
<string name="logLevelSummary">Nivel del registro (1=mínimo, 5=máximo)</string>
|
||||
<string name="logLevelTitle">Nivel del registro</string>
|
||||
<string name="unknownActionSpecified">Ación inconocido especicado</string>
|
||||
<string name="errorChangingScreenRotation">Error cambiando rotación del monitor</string>
|
||||
<string name="failedToTriggerBluetooth">Error cambiando Bluetooth. El dispositivo tiene Bluetooth?</string>
|
||||
<string name="failedToTriggerBluetooth">Error cambiando Bluetooth. Tiene el dispositivo Bluetooth?</string>
|
||||
<string name="settingsCategoryHttp">Pedido HTTP</string>
|
||||
<string name="httpAttemptsSummary">Cantidad de los pruebos en caso pedidos HTTP fallan por razones de conexißon</string>
|
||||
<string name="httpAttemptsSummary">Cantidad de las pruebas en caso pedidos HTTP fallan por razones de conexión</string>
|
||||
<string name="httpAttemptGapSummary">Pausa antes de otra prueba [segundos]</string>
|
||||
<string name="timeoutForGpsComparisonsSummary">Tiempo maximo en segundos</string>
|
||||
<string name="rememberLastActivePoiSummary">Se esta en un sitio reinicie su dispositivo o la aplicaión y salga el sitio la aplicaión va a procesar normas que incluyan saliendo este sitio.</string>
|
||||
<string name="rememberLastActivePoiTitle">Memorar ultimom sitio activo.</string>
|
||||
<string name="settingsErased">Configuración borrado.</string>
|
||||
<string name="settingsSetToDefault">Configuración reajustado al predeterminado.</string>
|
||||
<string name="privacyConfirmationText">Voy a abrir un browser y cargar la politica de privacidad de la pagina del desarrolador.</string>
|
||||
<string name="timeoutForGpsComparisonsSummary">Tiempo máximo en segundos</string>
|
||||
<string name="rememberLastActivePoiSummary">Si está en un sitio, reinicie su dispositivo o la aplicaión y salga del sitio, la aplicaión va a procesar reglas que incluyan saliendo este sitio.</string>
|
||||
<string name="rememberLastActivePoiTitle">Memorizar último sitio activo.</string>
|
||||
<string name="settingsErased">Configuración borrada.</string>
|
||||
<string name="settingsSetToDefault">Configuración reajustada al predeterminado.</string>
|
||||
<string name="privacyConfirmationText">Voy a abrir un browser y cargar la política de privacidad de la página del desarrolador.</string>
|
||||
<string name="waitBeforeNextActionEnterValue">Inserte un valor en milisegundos por cuánto tiempo esperar antes de la proxima acción.</string>
|
||||
<string name="wakeupDeviceValue">Inserte un valor en milisegundos por cuánto tiempo el dispositivo se tiene que quedar activo. 0 para usar el valor predeterminado.</string>
|
||||
<string name="enterAPositiveValidNonDecimalNumber">Inserte un numero positivo no-decimal.</string>
|
||||
<string name="cantMoveUp">No puedo mover objeto arriba. Ya está en el maximo.</string>
|
||||
<string name="cantMoveDown">No puedo mover objeto abajo. Todavia está en el minimo.</string>
|
||||
<string name="timeFrameWhichDays">En cuales dias?</string>
|
||||
<string name="cantMoveUp">No puedo mover objeto arriba. Ya está en el máximo.</string>
|
||||
<string name="cantMoveDown">No puedo mover objeto abajo. Todavia está en el mínimo.</string>
|
||||
<string name="timeFrameWhichDays">En cuales días?</string>
|
||||
<string name="insideOrOutsideTimeFrames">Dentro o fuera de esos periodos?</string>
|
||||
<string name="roaming">Roaming</string>
|
||||
<string name="until">hasta</string>
|
||||
@ -403,19 +399,19 @@ Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dis
|
||||
<string name="any">cualquier</string>
|
||||
<string name="incoming">recibiendo</string>
|
||||
<string name="outgoing">saliendo</string>
|
||||
<string name="noKnownWifis">No hay wifis conociendos en su disparador.</string>
|
||||
<string name="helpTextTimeFrame">Si crea una norma con un periodo tiene dos opciones. Puede elegir entre entrar o salir de un periodo. En todo caso la norma será ejecutada solo una vez. Si crea una norma con una condición \"entrar periodo xyz\" y por ejemplo la acción \"poner el dispositivo en vibración\", el dispositivo NO va a cambiar a sonido de llamada automaticamente despues del periodo. Si desea esto tiene que crear otra norma con otro periodo.</string>
|
||||
<string name="toggableRules">Normas reversibles</string>
|
||||
<string name="helpTextPoi">Un sitio consiste de coordinadas GPS y un radio. Porque la localización via red móvil terrestre es relativamente imprecisa (pero rápido y barato) no especifiqué el radio demasiado corto. La applicación va a sugerir un radio minimo cuando cree nuevo sitio.</string>
|
||||
<string name="generalText">Para usar este programa tiene que crear normas. Ellos tienen condiciones, por ejemplo \"está en un sitio\" o \"está en un periodo\". Despues cliquee el on/off boton en la pantalla principal.</string>
|
||||
<string name="noKnownWifis">No hay wifis conocidos en su dispositivo.</string>
|
||||
<string name="helpTextTimeFrame">Si crea una regla con un periodo tiene dos opciones. Puede elegir entre entrar o salir de un periodo. En todo caso la regla será ejecutada solo una vez. Si crea una regla con una condición \"entrar periodo xyz\" y por ejemplo la acción \"poner el dispositivo en vibración\", el dispositivo NO va a cambiar a sonido de llamada automaticamente despues del periodo. Si desea esto tiene que crear otra regla con otro periodo.</string>
|
||||
<string name="toggableRules">Reglas reversibles</string>
|
||||
<string name="helpTextPoi">Un sitio consiste de coordinadas GPS y un radio. Porque la localización vía red móvil terrestre es relativamente imprecisa (pero rápida y barata) no especifiqué el radio demasiado corto. La aplicación va a sugerir un radio minimo cuando cree un nuevo sitio.</string>
|
||||
<string name="generalText">Para usar este programa tiene que crear reglas. Ellos tienen condiciones, por ejemplo \"está en un sitio\" o \"está en un periodo\". Despues cliquee el on/off boton en la pantalla principal.</string>
|
||||
<string name="muteTextToSpeechDuringCallsSummary">Poner TextToSpeech en muto mientras dura las llamadas</string>
|
||||
<string name="anotherPoiByThatName">Ya existe otro sitio con el mismo nombre.</string>
|
||||
<string name="timeBetweenProcessMonitoringsSummary">Cuanto mas bajo tanto mas se utiliza la bateria</string>
|
||||
<string name="timeBetweenProcessMonitoringsSummary">Cuanto mas bajo, mas se utiliza la bateria</string>
|
||||
<string name="airplaneModeSdk17Warning">A partir de Android version 4.2 esta función solo functiona si su dispositivo esta rooted.</string>
|
||||
<string name="selectTypeOfIntentPair">"Elija un tipo pareja intent. "</string>
|
||||
<string name="enterNameForIntentPair">Inserte nombre para pareja intent.</string>
|
||||
<string name="enterValueForIntentPair">Inserte valor para pareja intent.</string>
|
||||
<string name="whatToDoWithIntentPair">Hacer que con pareja?</string>
|
||||
<string name="selectTypeOfIntentPair">"Elija un tipo par intent. "</string>
|
||||
<string name="enterNameForIntentPair">Inserte nombre para par intent.</string>
|
||||
<string name="enterValueForIntentPair">Inserte valor para par intent.</string>
|
||||
<string name="whatToDoWithIntentPair">Hacer que con par?</string>
|
||||
<string name="gettingListOfInstalledApplications">Determinando lista de aplicaciones instaladas...</string>
|
||||
<string name="actionSetDataConnectionOn">activar datos móviles</string>
|
||||
<string name="actionSetDataConnectionOff">desactivar datos móviles</string>
|
||||
@ -430,63 +426,236 @@ Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dis
|
||||
<string name="nfcReadTag">Leer ID de tag.</string>
|
||||
<string name="nfcWriteTag">Escribir tag</string>
|
||||
<string name="nfcEnterValidIdentifier">Inserte una etiqueta valida para el tag (como \"Puerta de casa\").</string>
|
||||
<string name="nfcTagWrittenSuccessfully">Tag escrita con exito.</string>
|
||||
<string name="nfcTagWriteError">Error escribiendo tag. Esta el tag cerca?</string>
|
||||
<string name="nfcTagWrittenSuccessfully">Tag escrita con éxito.</string>
|
||||
<string name="nfcTagWriteError">Error escribiendo tag. Está el tag cerca?</string>
|
||||
<string name="nfcTagDiscovered">Tag encontrado.</string>
|
||||
<string name="nfcBringTagIntoRange">Traiga un tag cerca.</string>
|
||||
<string name="nfcTagFoundWithText">Tag encontrado con etiqueta:</string>
|
||||
<string name="nfcUnsupportedEncoding">No hay soporte para este codigo:</string>
|
||||
<string name="nfcNoNdefIntentBut">No NFC NDEF intent, pero</string>
|
||||
<string name="nfcNotSupportedInThisAndroidVersionYet">NFC sin soporto en esta version Android, todavia no.</string>
|
||||
<string name="cantRunRule">No puedo ejecutar normas.</string>
|
||||
<string name="nfcApplyTagToRule">Aplicar este tag a norma</string>
|
||||
<string name="nfcTagReadSuccessfully">Tag escritoso con exito.</string>
|
||||
<string name="cantRunRule">No puedo ejecutar reglas.</string>
|
||||
<string name="nfcApplyTagToRule">Aplicar este tag a regla</string>
|
||||
<string name="nfcTagReadSuccessfully">Tag escritoso con éxito.</string>
|
||||
<string name="nfcValueNotSuitable">Valor guardado no valido.</string>
|
||||
<string name="nfcNoTag">No tag presente.</string>
|
||||
<string name="newNfcId">Escrbir nueve ID NFC</string>
|
||||
<string name="newId">Nueve ID:</string>
|
||||
<string name="newNfcId">Escrba nuevo ID NFC</string>
|
||||
<string name="newId">Nuevo ID:</string>
|
||||
<string name="currentId">Actual ID:</string>
|
||||
<string name="nfcTagDataNotUsable">Tag no esta utilizable, escribir de nueve.</string>
|
||||
<string name="nfcTagDataNotUsable">Tag no esta utilizable, escriba de nuevo.</string>
|
||||
<string name="none">ningún</string>
|
||||
<string name="anyLocation">cualquier sitio</string>
|
||||
<string name="eraseSettings">Borrar configuración</string>
|
||||
<string name="defaultSettings">Configuración standard</string>
|
||||
<string name="areYouSure">Está seguro?</string>
|
||||
<string name="detectedActivityOnBicycle">En bicicleta</string>
|
||||
<string name="detectedActivityOnFoot">En pie</string>
|
||||
<string name="detectedActivityOnFoot">A pie</string>
|
||||
<string name="detectedActivityInVehicle">En vehiculo (auto/autobus)</string>
|
||||
<string name="detectedActivityWalking">Andante</string>
|
||||
<string name="detectedActivityRunning">jogging</string>
|
||||
<string name="detectedActivityInvalidStatus">Acción no válida</string>
|
||||
<string name="detectedActivityWalking">Caminando</string>
|
||||
<string name="detectedActivityRunning">corriendo</string>
|
||||
<string name="detectedActivityInvalidStatus">Actividad no válida</string>
|
||||
<string name="detectedActivityTilting">Inclinando</string>
|
||||
<string name="detectedActivityStill">No movimiento</string>
|
||||
<string name="detectedActivityUnknown">desconocido</string>
|
||||
<string name="triggerOnlyAvailableIfPlayServicesInstalled">Esta condición solo esta disponsible si Google Play Services estan instalado.</string>
|
||||
<string name="activityDetectionFrequencyTitle">Frequencia de reconocimiento de actividad [seg]</string>
|
||||
<string name="activityDetectionFrequencySummary">Segundos entre pruebas de reconocimientos de actividad.</string>
|
||||
<string name="activityDetectionRequiredProbabilityTitle">Probabilidad de reconocimiento de actividad.</string>
|
||||
<string name="activityDetectionRequiredProbabilitySummary">Certeza necesario con cuelas resultatods de reconocimiento de actividad seran aceptandos.</string>
|
||||
<string name="selectDeviceFromList">un de la lista</string>
|
||||
<string name="detectedActivityStill">Sin movimiento</string>
|
||||
<string name="detectedActivityUnknown">desconocida</string>
|
||||
<string name="triggerOnlyAvailableIfPlayServicesInstalled">Esta condición solo esta disponsible si Google Play Services están instalados.</string>
|
||||
<string name="activityDetectionFrequencyTitle">Frecuencia de detección de actividad [seg]</string>
|
||||
<string name="activityDetectionFrequencySummary">Segundos entre pruebas de detección de actividad.</string>
|
||||
<string name="activityDetectionRequiredProbabilityTitle">Probabilidad de detección de actividad.</string>
|
||||
<string name="activityDetectionRequiredProbabilitySummary">Certeza necesaria con cuales resultados (de detección de actividad) serán aceptados.</string>
|
||||
<string name="selectDeviceFromList">uno de la lista</string>
|
||||
<string name="connectionToDevice">conexión a dispositivo</string>
|
||||
<string name="disconnectionFromDevice">desconexión de dispositivo</string>
|
||||
<string name="privacyLocationingSummary">Evitar usar methodos de localización cueles envian su posición a un provedor, por ejemplo Google. Eso so va a usar GPS solo. Por eso puede trajabar lento o poco fiable.</string>
|
||||
<string name="locationEngineNotActive">Ingenio de localización no esta activo.</string>
|
||||
<string name="noMapsApplicationFound">Parece no hay una aplicaión de mapa en su dispositivo.</string>
|
||||
<string name="privacyLocationingSummary">Evitar usar metodos de localización cuales envian su posición a un proveedor, por ejemplo Google. Esto solo va a usar GPS. Por eso puede trajabar lento o/y poco fiable.</string>
|
||||
<string name="locationEngineNotActive">Localización no esta activo.</string>
|
||||
<string name="noMapsApplicationFound">Parece que no hay una aplicación de mapa en su dispositivo.</string>
|
||||
<string name="soundMode">Modo de sonido de llamada.</string>
|
||||
<string name="showIcon">Monstrar icono</string>
|
||||
<string name="showIconWhenServiceIsRunning">Monstrar icono cuando el servicio esta activo (ocultando solo funciona antes Android 7)</string>
|
||||
<string name="currentVolume">Volumen actual</string>
|
||||
<string name="volumeTest">Prueba de volumen</string>
|
||||
<string name="volumeTest">Calibrado de volumen</string>
|
||||
<string name="permissionsTitle">Permisos necesarios</string>
|
||||
<string name="disabledFeatures">Funcionas desactivadas</string>
|
||||
<string name="disabledFeatures">Funciones desactivadas</string>
|
||||
<string name="invalidDevice">Dispositivo no valido.</string>
|
||||
<string name="android.permission.ACCESS_WIFI_STATE">Determinar estado de wifi</string>
|
||||
<string name="android.permission.WAKE_LOCK">Tener dispositivo despierto</string>
|
||||
<string name="android.permission.WAKE_LOCK">Mantener dispositivo activado</string>
|
||||
<string name="android.permission.MODIFY_PHONE_STATE">Cambiar ajustes del dispositivo</string>
|
||||
<string name="android.permission.GET_TASKS">Determinar procesos activados</string>
|
||||
<string name="android.permission.GET_TASKS">Determinar procesos activos</string>
|
||||
<string name="android.permission.RECEIVE_BOOT_COMPLETED">Detectar reinicio del dispositivo</string>
|
||||
<string name="helpTextActivityDetection">Esta función puede detecar su estado de movimiento (en pie, en bicicleta, en vehiculo). La función no es un parte de Automation, pero de Google Play Services. Técnicamente no da un si/no resultado, pero una certeza con que el estado es probable. Puede configurar el percentaje del cual Automation va a aceptar un resultado. Dos comentarios: 1) Mas de un estado se puede aplicar al mismo tiempo. Por ejemplo puede esta en pie en un autobus. 2) Esta sensor es relativamente caro (bateria). Si posible considere alternativas, por ejemplo bluetooth conexción a tu coche en vez de \"en vehiculo\".</string>
|
||||
<string name="textMessageAnnotations">Puede insertar un numero de llamada. Alternativamente puede importar un numero de su directorio. Pero tenga en cuenta: El numero va a serar guardado, no el contacto. Si cambias el numero en su directoria tiene que cambiar la normal tambien.</string>
|
||||
<string name="helpTextActivityDetection">Esta función puede detectar su estado de movimiento (a pie, en bicicleta, en vehiculo). La función no es parte de Automation, pero de Google Play Services. Técnicamente no da un \"si\" o \"no\" resultado, pero una probabilidad. Puede configurar este porcentaje del cual Automation va a aceptar un resultado. Dos comentarios: 1) Mas de un estado se puede aplicar al mismo tiempo. Por ejemplo puede estar a pie en un autobus. 2) Este sensor es relativamente caro (bateria). Si es posible considere alternativas, por ejemplo bluetooth conexión a su coche en vez de \"en vehiculo\".</string>
|
||||
<string name="textMessageAnnotations">Puede insertar un numero de llamada. Alternativamente puede importar un numero de su directorio. Pero tenga en cuenta: El número será guardado, no el contacto. Si cambias el número en su directorio tiene que cambiar la regla también.</string>
|
||||
<string name="startAutomationAsService">Encender automation como un servicio</string>
|
||||
<string name="startScreenSummary">Elija la pantalla con que automation enciende.</string>
|
||||
<string name="startScreenSummary">Elija la pantalla con que Automation enciende.</string>
|
||||
<string name="useExistingTag">Use existente tag NFC</string>
|
||||
<string name="nfcBringTagIntoRangeToRead">Traiga un tag dentro del alcance.</string>
|
||||
<string name="toggleRule">Regla reversible</string>
|
||||
<string name="toggling">revirtiendo</string>
|
||||
<string name="toggle">revertir</string>
|
||||
<string name="overlapBetweenPois">Detecte sobreposición con sitio %1$s de %2$s metros. Reduzca el radio de este al minimo.</string>
|
||||
<string name="invalidPoiName">Nombre invalido para sitio.</string>
|
||||
<string name="activityDetection">Detección de actividad</string>
|
||||
<string name="android.permission.ACTIVITY_RECOGNITION">Detección de actividad</string>
|
||||
<string name="detectedActivity">Actividad detectada:</string>
|
||||
<string name="incomingCallFrom">Llamada entrante de %1$s.</string>
|
||||
<string name="outgoingCallTo">Llamando a %1$s.</string>
|
||||
<string name="toggleNotAllowed">Reversibilidad solo esta permitida para reglas que tienen tags NFC por condición. Consulte la ayuda para mas información.</string>
|
||||
<string name="errorReadingPoisAndRulesFromFile">Error en la lectura sitios y reglas del archivo.</string>
|
||||
<string name="noDataChangedReadingAnyway">Aparece no hay cambios. Pero puede haber cambios en la memoria que pueden ser recogidos. Leyendo archivo de nuevo.</string>
|
||||
<string name="bluetoothDisconnectFrom">Conexión Bluetooth de %1$s desconectada</string>
|
||||
<string name="bluetoothDeviceInRange">Dispositivo Bluetooth %1$s en alcance.</string>
|
||||
<string name="bluetoothDeviceOutOfRange">Dispositivo Bluetooth %1$s fuera de alcance.</string>
|
||||
<string name="deviceInRange">dispositivo en alcance</string>
|
||||
<string name="deviceOutOfRange">dispositivo fuera de alcance</string>
|
||||
<string name="selectDeviceOption">Elija una opción de dispositivo.</string>
|
||||
<string name="selectConnectionOption">Elija una opción de conexión.</string>
|
||||
<string name="noiseDetectionHint">Si piensa que la detección del volumen no funciona correctamente (dependiendo del valor que configuró), tenga en cuenta todos los dispositivos son diferentes. Por eso puede cambiar la \"referencia del detección del volumen\" en la configuración. Para mas informaciones vease https://es.wikipedia.org/wiki/Nivel_de_presi%C3%B3n_sonora. Puede usar el probador del volumen en pantalla principal para calibrar su dispositivo.</string>
|
||||
<string name="hint">Pista</string>
|
||||
<string name="hapticFeedback">Sensación tactil (vibracion cuando toca la pantalla)</string>
|
||||
<string name="helpTextSound">En la pantalla principal puede usar \"bloquear cambios de sonido\" para temporalmente evitar, basado en la norma, cambios de sonido. Por ejemplo podría estar en una situación o en un sitio donde un tono de llamada está bien, pero esta vez no es oportuno. La función se desactiva automaticamente despues del tiempo configurado. Cliquee el \"+\" boton para adicionar mas tiempo. Se puede desactivar la función antes tambien usando el boton interruptor (en consecuencia reactivar cambios de sonido, basados en normas).</string>
|
||||
<string name="helpTextToggable">Las normas tienen una configuracion que se llama \\\"reversible\\\". Significa si una norma es ejecutada y despues las mismas condiciones aplican, la norma es ejecutada de forma reversible donde sea posible. Actualmente solo funciona con la condición NFC. Si toca el tag dos veces, y hay una norma reversible con este tag, la aplicación va a hacer lo contrario de la situación actual, por ejemplo desactivar wifi cuando está activo.</string>
|
||||
<string name="helpTextProcessMonitoring">Si crea una norma con vigilancia del proceso, la aplicación va a revisar periodicamente si el proceso está activo. Puede ajustar la frecuencia en la configuración. Puede relentizar la reacción, pero la vigilancia permanente gasta mucha bateria. No hay un broadcast del sistema operativo para este evento.</string>
|
||||
<string name="helpTextEnergySaving">Muchos fabricantes intentan conservar energia limitando las actividades de segundo plano de otras apps. Desafortunadamente el resultado es que esas aplicaciones no funcionan por completo. Automation está entre ellas. Vease <a href="https://dontkillmyapp.com/">esta pagina</a> para determinar como excluir Automation de tales medidas.</string>
|
||||
<string name="speedMaximumTimeBetweenLocations">Tiempo maximo entre 2 sitios para determinar la velocidad.</string>
|
||||
<string name="clone">Clonar</string>
|
||||
<string name="updateAvailable">Hay nueva versión de la app. Quiere abrir un browser y descargarla?</string>
|
||||
<string name="automaticUpdateCheck">Buscar updates</string>
|
||||
<string name="urlToTriggerExplanation">Esta función NO abre el browser, pero enciende un URL en el fondo. Puede usar lo por ejemplo para enviar comandos a su automatización de la casa.</string>
|
||||
<string name="automaticUpdateCheckSummary">Solo en la versión APK.</string>
|
||||
<string name="locationFound">Determine una posición. El radio minimo sugerido es %1$d m.</string>
|
||||
<string name="locationFoundInaccurate">Solo pude determinar una posición imprecisa. Puede ser, que funcione poco fiable. El radio minimo sugerido es %1$d m.</string>
|
||||
<string name="volumeMusicVideoGameMedia">Multimedia (música, video …)</string>
|
||||
<string name="audibleSelection">Audio habilitado cuando selectión</string>
|
||||
<string name="screenLockUnlockSound">Sonido del (des-)bloqueo de pantalla</string>
|
||||
<string name="vibrateWhenRinging">Vibrar timbrando</string>
|
||||
<string name="noChangeSelectedProfileDoesntMakeSense">No hay cambios seleccionados. Perfil no tiene sentido.</string>
|
||||
<string name="noProfilesCreateOneFirst">No hay perfilies en su configuración. Cree uno primero.</string>
|
||||
<string name="errorWritingFile">Error escribiendo el archivo.</string>
|
||||
<string name="unknownError">Error desconocido.</string>
|
||||
<string name="noWritableFolderFound">No pude encontrar una carpeta para guardar el archivo de la configuración.</string>
|
||||
<string name="usbTetheringFailForAboveGingerbread">Probablemente no funcionará porque esta mas actual que Android 2.3. Podría usar el enrutador wifi en lugar de eso.</string>
|
||||
<string name="usingNewThreadForRuleExecution">Usar nuevo thread para ejecutar regla.</string>
|
||||
<string name="startNewThreadForRuleExecution">Usar nuevo thread para ejecutar regla.</string>
|
||||
<string name="newThreadRules">Nuevo thread</string>
|
||||
<string name="someOptionsNotAvailableYet">Algunas opcciones estan desactivadas y todavia no pueden ser usadas. Estas seran introducidas en una versión futura.</string>
|
||||
<string name="noProfileChangeSoundLocked">Perfil no será activado. Último perfil activado estuvo/esta bloqueado.</string>
|
||||
<string name="enterValidReferenceValue">Inserte un valor valido de referencia.</string>
|
||||
<string name="settingsWillTakeTime">Algunos ajustes no seran aplicados antes de reiniciar el servicio.</string>
|
||||
<string name="errorWritingConfig">Error escribiendo config. Tiene una memoria descrita?</string>
|
||||
<string name="phoneNrReplacementError">No pude insertar el numero de la ultima llamada in en la variable. No lo tengo.</string>
|
||||
<string name="permissionsExplanation">Explicación de permisos necesarios</string>
|
||||
<string name="theFollowingPermissionsHaveBeenDenied">Los siguientes permisos serán negados:</string>
|
||||
<string name="permissionsExplanationGeneric">Por el momento la app está en un modo limitado, pocas funciones están desactivadas. Para funcionar completamente necesita permisos. Si quiere toda la funcionalidad tiene que otorgar en los siguientes diálogos permisos. Si no ciertas reglas no serán ejecutadas. Por consiguiente hay explicaciones para los permisos requeridos. Cliquee continuar cuando esta preparado para proceder.</string>
|
||||
<string name="permissionsExplanationSmall">Para activar la función que será usada, mas permisos son necesarios. Cliquee continuar para los requisitos.</string>
|
||||
<string name="storeSettings">Leer y guardar configuración.</string>
|
||||
<string name="featuresDisabled">CUIDADO: Funciones estan desactivadas, Automation esta en modo limitado. Cliquee aqui para mas informacion.</string>
|
||||
<string name="volumeCalibrationExplanation">Para calcular un valor dB para determinar el nivel del ruido de fondo tiene que especificar un valor de referencia fisico. Por favor lea el articulo en Wikipedia para mas información. Este valor será probablemente diferente para todos los dispositivos. Mueva el regulador para cambiar el valor. Cuanto mas alto el valor de referencia menos será el valor dB. Las mediciónes se harán cada %1$s segundos y el resultado aparecerá abajo. Presione atrás cuando encuentre un valor indicado.</string>
|
||||
<string name="systemSettingsNote1">El permiso para cambiar ajustes del OS es necesario (incluso cosas simples como activar bluetooth o wifi). Despues de cliquear continuar una ventana aparecerá en la cual tiene que activar eso para Automation. Entonces cliquee el boton atrás.</string>
|
||||
<string name="systemSettingsNote2">Mas permisos serán requeridos en un segundo dialogo luego.</string>
|
||||
<string name="appRequiresPermissiontoAccessExternalStorage">Automation necesita acceso al almacenamiento externo para leer su configuración y reglas.</string>
|
||||
<string name="mainScreenPermissionNote">" Automation necesita mas permisos para funcionar en su totalidad. Cliquee en este texto para encontrar mas y requerirlos."</string>
|
||||
<string name="logFileMaxSizeSummary">Maximo tamaño del archivo log. Será alternado si es mas alto.</string>
|
||||
<string name="logFileMaxSizeTitle">Maximo tamaño del archivo log [Mb]</string>
|
||||
<string name="theseAreThePermissionsRequired">Esos son los permisos necesarios.</string>
|
||||
<string name="android9RecordAudioNotice">Si usa la condición nivel del ruido fondo: Desafortunadamente iniciando con Android 9 (Pie) Google decidió prohibir aplicaciones de fondo usando el micrófono. Por eso esta condición no tendrá un efecto y no iniciará algo.</string>
|
||||
<string name="android10WifiToggleNotice">Desafortunadamente Google dedició remover esta función en Android 10. Applicaciones regulares ya no pueden activar o desactivar wifi. Solo si su dispositivo esta rooted debe funcionar adelante. Si no este ación no va a continuar de funcionar.</string>
|
||||
<string name="messageNotShownAgain">Esta nota no aparecerá otra vez.</string>
|
||||
<string name="noLocationCouldBeFound">No pude encontrar una posición despues de un limite de %1$s segundos..</string>
|
||||
<string name="pleaseGiveBgLocation">En la proxima pantalla por favor vaya a permisos, luego a posición. Ahi elija \"Siempre permitir\" para permitir Automation determinar la posición en el fondo.</string>
|
||||
<string name="ConfigurationExportError">Hubo un error durante la exportación de la configuración.</string>
|
||||
<string name="rulesImportedSuccessfully">Reglas y sitios están exportados con exito.</string>
|
||||
<string name="rulesImportError">Hubo un error durante la importación de las reglas y sitios.</string>
|
||||
<string name="notAllFilesImported">No pudo importar todos los archivos aplicables.</string>
|
||||
<string name="importExportExplanation">Despues de cliquear importar o exportar elija el directorio de que archivos serán importados o a que serán exportados. Si exporta archivos que ya existen serán sobreescritos.</string>
|
||||
<string name="errorRunningRule">Hubo un error al iniciar una regla.</string>
|
||||
<string name="locationEngineDisabledShort">La posición no sera determinada mas en el fondo. Cliquee aqui para averiguar más.</string>
|
||||
<string name="displayNewsOnMainScreen">Mostrar noticias de la app en la pantalla principal.</string>
|
||||
<string name="displayNewsOnMainScreenDescription">Noticias solo de esta app. Hablamos de 1-2 veces por año, no mas.</string>
|
||||
<string name="featureNotInFdroidVersion">Esta caracteristica esta basada en software libre. Por eso no esta disponsible en la versión F-Droid.</string>
|
||||
<string name="chooseActivityHint">En esta selección final tiene que elegir una \"Activity\" especifica. Simplificado: es una ventana especifica de la aplicación elegida. Si no sabe cual tiene que elegir, normalmente es una buena idea probar los que tienen \"main\" o \"launcher\" en el nombre.</string>
|
||||
<string name="googleSarcasm">Gracias a la sabiduria infinita de Google y su esfuerzo constante de proteger la privacidad de todo el mundo. Por eso de todas las reglas que pueden enviar SMS o determinar el estado del movil las condiciones y acciones, que Google considera de riesgo, fueron eliminadas.</string>
|
||||
<string name="screenLockSoundNotice">Sonidos de bloqueo de pantalla no seran mas cambiados en dispositivos que usan Android 6 o mas nuevos. Cualquier ajuste aqui no va a funcionar en cualquier dirección.</string>
|
||||
<string name="googleLocationChicanery">Este app almacena datos de posición para activar reglas que necesitan la posición o la velocidad - incluso cuando la app esta cerrada o no en uso.</string>
|
||||
<string name="googleLocationChicaneryOld">Este app almacena datos de posición para determinar si actualmente esta en uno de los sitios que creó. Además estan usados para determinar su actual velocidad (si usa esta condición en reglas). Incluso cuando la app esta cerrada o no en uso (pero solo cuando el servicio esta iniciado).</string>
|
||||
<string name="settingsReferringToRestrictedFeatures">Su configuración y/o reglas actualmente referencian caracteristicas no-libres no seran proveidas en la versión F-Droid. Esto incluye determinar su actual actividad fisica.</string>
|
||||
<string name="filesHaveBeenMovedTo">Automation ahora usa otra ruta para guardar sus archivos. Todos sus archivos de Automation fueron desplazados aqui: \"%s\". El permiso del almacenamiento externo todavia no es necesario; puede revocarlo. Sera eliminado en una futura versión.</string>
|
||||
<string name="newsOptIn">Quiere recibir noticias (solo importantes) en la pantalla principal? Estas serán descargadas de la pagina del desarollador. No habrán notificaciones inoportunas, solo un texto en la pantalla principal cuando abra la app.</string>
|
||||
<string name="filesStoredAt">Config y archivos de log seran guardados en el directorio %1$s. Cliquee en este texto para abrir un administrador de archivos. Desafortunadamente solo funciona en un dispositivo rooted.\n\nPARA OTROS DISP.: Simplemente use el boton para crear un backup.</string>
|
||||
<string name="notificationTriggerExplanation">Esta condición responde a todas las aplicaciones que abren o cierran notificaciones en el areal notificaciones. Puedes especificar otra aplicación de que la notificación tiene que venir. Si no la notificación puede originarse de cualquier app. Tambien puedes especificar strings que (/no) tienen que estar en en titulo o el texto de la notificación. La comparación es insensible a minúsculas y mayúsculas.</string>
|
||||
<string name="alwaysPlayExplanation">Si este ajuste esta activo el sonido será reproducido siempre. Si esta inactivo el sonido solo será reproducido si su dispositivo ni esta en mute ni en vibración. Pero si esta activo cambiará el volumen. Tambien si su dispositivo esta en el modo timbre el volumen multimedia no será cambiado por ejemplo. En resumen si el volumen multimedia esta en mute no escuchará nada.</string>
|
||||
<string name="shareConfigAndLogExplanation">Esto comenzará un nuevo email con su config y los archivos de log adjunto como archivo zip. No será enviado automaticamente. Todavia tiene que cliquear \"enviar\". Tambien puede cambiar el receptor a si mismo por ejemplo.</string>
|
||||
<string name="tabsPlacement">Posición de la barra de tabs</string>
|
||||
<string name="top">Arriba</string>
|
||||
<string name="bottom">Abajo</string>
|
||||
<string name="vibrate">Vibrar</string>
|
||||
<string name="test">Probar</string>
|
||||
<string name="VibrateExplanation">Elija la duración de la vibración, seguido de un coma y una duración de una pausa. Puedes concatenar tantos como quiere. Separelos con comas tambien. Por ejemplo el patrón 100,500,500,1000,100 va a vibrar 100, esperar 500, vibrar 500, esperar 1000, vibrar 100 ms. Si cree que una vibración está perdida, pruebe incrementar la pausa antes de esta vibración.</string>
|
||||
<string name="pleaseEnterValidVibrationPattern">Por favor introduzca un patrón de vibración válido.</string>
|
||||
<string name="tabsPlacementSummary">Elija done la barra de tabs está puesto.</string>
|
||||
<string name="intentDataComment">Si su parametro es de tipo Uri y especifica \"IntentData\" como nombre (minúscula/mayáscula no es importante), el parametro no está añadido como un parametro normal con puExtra(), pero estará añadido al intent con setData().</string>
|
||||
<string name="locationEngineDisabledLong">Desafortunadamente su posición todavia no puede ser determinada. Gratitud va para Google por su sabiduria y amabilidad infinita.\n\nDejenme explicarselo mas. Comenzando con Android 10 un nuevo permiso se introdujo que es necesario para determinar la posición en el fondo (que es necesario para una app como esta). Aunque lo considero una buena idea, conlleva a una chicana para desarolladores.\n\nCuando se esta desarrollando una app se puede intentar calificar para este permiso mientras se sigue un catalogo de condiciones. Desafortunadamente nuevas versiones de mi app fueron rechazadas por un periodo de trés meses. Cumplé todas las condiciones, pero Google\'s mierda servicio para desarolladores afirmó que no. Despues de presentar pruebas, que cumplí con todo, recibí una respuesta de \"No puedo ayudarte mas.\". En algun momento me rendí.\n\nComo consecuencia la version Google Play todavia no sabe usar la locación como una condición. Mi única alternativa fue remover la applicación de Google Play.\n\nLo siento mucho, pero hicé todo lo posible para discutir con un support que no sabe aprobar la prueba de Turing repetidamente.\n\nLa noticia positiva: Usted todavia puede tener todo!\n\nAutomation ahora es open source y se puede encontrar en F-Droid. Es un app store que se preocupa por su privacidad - en vez de solo simular eso. Simplemente guarde su configuración, desinstale la app, instale la de F-Droid, restaure su configuración - terminado.\n\nCliquee aqui para averiguar más:</string>
|
||||
<string name="startAppChoiceNote">Aqui tiene 2 opciones generales:\\n\\n1. Puede encender un programa seleccionando un activity. Imagine eso como preseleccionar una pantalla/ventana especifica de una aplicación. Tenga en cuenta que no siempre funcionará. Eso es porque las ventanas de una app pueden interactuar entre ellas, por ejemplo dar parametros. Si se abre una ventana especifica directamente esta interacción todavia no ha ocurrido y la ventana se podría cerrar al instante (por lo tanto nunca será presentada). Pruebe esto sin embargo! Puede introducir una trayectoria de una activity manualmente, pero es recomendable usar el boton \"Elegir\". Si decide introducir la trayectoria de la app manualmente en la casilla de arriba y la trayectoria completa de una activity en la de abajo.\\n\\n2.Elección con action\\nContrariamente a elegir una ventana especifica, tambien puede encender una app con un action. Es similar a llamar \"Queria xyz\" y si hay una app que le puede ayudar a usted sera encendida. Un ejemplo bueno seria \"abrir browser\" - podria tener multiples (una normalemente es el valor predeterminado). Usted necesita introducirlo manualmente, PackageName es opcional aqui. Tenga en cuenta las variables no seran resueltas. Si por ejemplo quiere encender la camara usando \"MediaStore.ACTION_IMAGE_CAPTURE\" no va a funcionar. Tiene que mirar en la documentación de Android y usar el valor real de esta variable que - en este ejemplo - seria \"android.media.action.IMAGE_CAPTURE\".</string>
|
||||
<string name="tones">Sonidos</string>
|
||||
<string name="dnd">No interrumpir</string>
|
||||
<string name="donate">Donar</string>
|
||||
<string name="notice">Nota</string>
|
||||
<string name="deviceOrientation">Orientación</string>
|
||||
<string name="tolerance">Tolerancia</string>
|
||||
<string name="orientationAzimuth">" Acimut:"</string>
|
||||
<string name="turnScreenOff">apagar pantalla</string>
|
||||
<string name="turnScreenOn">encender pantalla</string>
|
||||
<string name="actionSetBluetoothTethering">Enrutador Bluetooth</string>
|
||||
<string name="actionTurnBluetoothTetheringOn">activar enrutador Bluetooth</string>
|
||||
<string name="actionTurnBluetoothTetheringOff">desactivar enrutador Bluetooth</string>
|
||||
<string name="miscellaneous">Misceláneo</string>
|
||||
<string name="dndOff">No interrumpir apagado</string>
|
||||
<string name="dndPriority">Permitir notificaciones prioritarias</string>
|
||||
<string name="dndAlarms">Permitir alarmas</string>
|
||||
<string name="dndNothing">Permitir nada</string>
|
||||
<string name="unknown">desconocido</string>
|
||||
<string name="orientation">Orientación</string>
|
||||
<string name="turnScreenOnOrOff">Activar o desactivar pantalla</string>
|
||||
<string name="mustApply">Debe aplicar</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalTitle">Frecuencia de señal</string>
|
||||
<string name="deviceOrientationSettings">Configuración del orientación del dispositivo</string>
|
||||
<string name="android.permission.BIND_DEVICE_ADMIN">Administrador del dispositivo</string>
|
||||
<string name="orientationRoll">Rotación:</string>
|
||||
<string name="orientationPitch">Inclinación:</string>
|
||||
<string name="wouldCurrentlyApply">¿Se aplicaría actualmente?</string>
|
||||
<string name="repeatEveryXseconds">Repetir cada x segundos</string>
|
||||
<string name="repeatEveryXsecondsWithVariable">repetir cada %1$s segundos</string>
|
||||
<string name="permissionsRequiredNotAvailable">Sus reglas requerían permisos que no se pueden solicitar a este tipo instalado de Automation.</string>
|
||||
<string name="automationNotificationsIgnored">Si no elige una aplicación específica, sino que elige \"Cualquier aplicación\", las notificaciones de Automatización se ignorarán para evitar bucles.</string>
|
||||
<string name="enterRepetitionTime">Debe insertar un valor positivo no decimal para el tiempo de repetición.</string>
|
||||
<string name="elementSkipped">No se pudo leer un elemento del archivo de configuración. El archivoo puede haber sido creado por una versión más reciente del programa.</string>
|
||||
<string name="enterValidNumbersIntoAllFields">Introduzca números válidos en todos los campos.</string>
|
||||
<string name="toleranceOf180OnlyAllowedIn2Fields">Se permite una tolerancia de 180 solo para 2 campos de tolerancia, no para todos los 3. De lo contrario, el disparador SIEMPRE se aplicaría.</string>
|
||||
<string name="triggerWrong">Hay algo mal con este condición. No se pudo cargar correctamente.</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalSummary">Aceptar nuevas señales de movimiento cada x milisegundos</string>
|
||||
<string name="deviceAdminNote">Se requieren permisos de administrador de dispositivo para al mens 1 reglas que haya creado.</string>
|
||||
<string name="dndRemarks">El ajuste fino (como permitir llamadas telefónicas, elegir números específicos, etc.) solo se puede hacer desde la configuración del sistema.</string>
|
||||
<string name="btTetheringNotice">Se confirma que esta función funcionará hasta Android 8.0. A partir de alguna versión superior deja de funcionar, pero debido a la falta de dispositivos físicos no puedo decir cuál es. En Android 11 definitivamente ya no funciona. Si tiene una versión intermedia, hágamelo saber si está funcionando o no.</string>
|
||||
<string name="deviceIsInCertainOrientation">el dispositivo esta en una orientación determinada</string>
|
||||
<string name="explanationDeviceOrientationDirection">Si la casilla de verificación está marcada, significa que el dispositivo debe estar en la orientación que especifique. Si no está marcado, cualquier orientación que NO coincida con sus criterios servirá.</string>
|
||||
<string name="silentTriggersDnd">OBSERVACIÓN: El modo silencioso a menudo activa No-Interrumpir en dispositivos más nuevos. Si eso sucede en su dispositivo, le recomiendo usar el modo normal en su lugar y reducir todos los volúmenes a cero.</string>
|
||||
<string name="wifiApi30">Porque Google arruinó otra parte de Android, a partir de API 30 solo se puede mostrar los wifi actualmente visibles, ya no todos que su positivo tiene conectados.</string>
|
||||
<string name="smsDialogNotice">Si no ha utilizado una acción de envío de sms en este programa antes, Android puede mostrar un diálogo de confirmación adicional, pidiéndole que permita el envío de mensajes. Debe seleccionar la casilla de verificación \"permitir siempre\" y confirmar si desea que esta acción funcione en segundo plano. Se recomienda ejecutar esta regla manualmente una vez para provocar este diálogo de confirmación.</string>
|
||||
<string name="deviceOrientationExplanation">Cuando mueva su dispositivo, los siguientes números se actualizarán. Lo que puede ver allí, es la orientación actual de su dispositivo medida en grados. Si está en la orientación deseada, haga clic en el botón Aplicar para copiar los valores actuales en los campos deseados. Debido a que alcanzar esta orientación exacta nunca más es muy poco probable, también deba ingresar a una tolerancia. Esta es la cantidad de grados a los que la orientación puede desviarse en cualquier dirección. 15° resultará en un ángulo total de 30°, 15° en todas las direcciones. Si solo le importa un eje específico, especifique una tolerancia de 180° para los otros dos.</string>
|
||||
<string name="profileNotActive">el perfil %1$s no está activo</string>
|
||||
<string name="profileActive">el perfil %1$s está activo</string>
|
||||
<string name="checkSettings">Comprobar la configuración</string>
|
||||
<string name="needsToBeActive">Necesita estar activo</string>
|
||||
<string name="recommendedForBetterReliability">Recomendado para una mejor fiabilidad</string>
|
||||
<string name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS">Excluir de la optimización de la batería</string>
|
||||
<string name="profileTriggerCheckSettings">Si esta casilla de verificación no está desactivada, solo se marcará si el perfil seleccionado ha sido el último en activarse. No importa si alguna configuración relacionada con el audio se ha cambiado externamente.\nSin embargo, si la casilla de verificación está habilitada, la configuración de audio actual realmente debe ser como se define en el perfil. CUIDADO: La comprobación del archivo de tono de llamada no es compatible actualmente, todavía.</string>
|
||||
<string name="ruleXIsUsingProfileY">No se puede eliminar este perfil. La regla %s$1 hace referencia al perfil %s$2.</string>
|
||||
<string name="profileCouldNotBeDeleted">No se pudo eliminar el perfil.</string>
|
||||
<string name="noRepetition">sin repetición</string>
|
||||
<string name="usingAuthentication">uso de la autenticación</string>
|
||||
<string name="toNumber">a número</string>
|
||||
<string name="message">mensaje</string>
|
||||
<string name="onDays">en días</string>
|
||||
<string name="notSet">no configurado</string>
|
||||
<string name="takeLauncherActivity">Buscar automaticamente</string>
|
||||
<string name="pickActivityManually">Eligir manualmente</string>
|
||||
<string name="launcherOrManualExplanation">Modo facil: Automation puede probar identifcar el launcher activity del programa automaticamente.\nAlternativamente puede eligir una de las activities del programa manualmente.\nCual variante queria?</string>
|
||||
<string name="launcherNotFound">No se puede encontrar una launcher activity. Tiene que elegir una manualmente.</string>
|
||||
</resources>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:ns1="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="ConfigurationExportError">There was an error while exporting the configuration.</string>
|
||||
<string name="ConfigurationExportError">C\'è stato un errore durante l\'esportazione della configurazione.</string>
|
||||
<string name="accelerometer">Accelerometro</string>
|
||||
<string name="accelerometerThreshold">Soglia accelerometro</string>
|
||||
<string name="accelerometerThresholdDescription">Soglia per i movimenti dell\'accelerometro</string>
|
||||
@ -14,15 +14,15 @@
|
||||
<string name="actionSetDataConnectionOff">disattiva la connessione mobile</string>
|
||||
<string name="actionSetDataConnectionOn">attiva la connessione mobile</string>
|
||||
<string name="actionSetDisplayRotation">Rotazione dello schermo</string>
|
||||
<string name="actionSetUsbTethering">Tethering USB</string>
|
||||
<string name="actionSetUsbTethering">USB Tethering</string>
|
||||
<string name="actionSetWifi">Wifi</string>
|
||||
<string name="actionSetWifiTethering">Wifi Tethering</string>
|
||||
<string name="actionSpeakText">Pronuncia testo</string>
|
||||
<string name="actionTriggerUrl">Apri indirizzo</string>
|
||||
<string name="actionTurnAirplaneModeOff">termina la modalità aereo</string>
|
||||
<string name="actionTurnAirplaneModeOn">passa a modalità aereo</string>
|
||||
<string name="actionTurnBluetoothOff">attiva Bluetooth</string>
|
||||
<string name="actionTurnBluetoothOn">disattiva Bluetooth</string>
|
||||
<string name="actionTurnBluetoothOff">disattiva Bluetooth</string>
|
||||
<string name="actionTurnBluetoothOn">attiva Bluetooth</string>
|
||||
<string name="actionTurnUsbTetheringOff">disattiva Tethering USB</string>
|
||||
<string name="actionTurnUsbTetheringOn">attiva Tethering USB</string>
|
||||
<string name="actionTurnWifiOff">disattiva Wifi</string>
|
||||
@ -46,7 +46,7 @@
|
||||
<string name="addParameters">Aggiungi parametri</string>
|
||||
<string name="addPoi">Aggiungi posizione</string>
|
||||
<string name="addProfile">Aggiungi profilo</string>
|
||||
<string name="addRule">Aggiugni regola</string>
|
||||
<string name="addRule">Aggiungi regola</string>
|
||||
<string name="addTrigger">Aggiungi evento di attivazione</string>
|
||||
<string name="airplaneMode">Modalità aereo</string>
|
||||
<string name="airplaneModeSdk17Warning">A partire dalla versione Android 4.2 questa funzione è disponibile solo se il dispositivo ha accesso root.</string>
|
||||
@ -56,7 +56,7 @@
|
||||
<string name="android.permission.ACCESS_COARSE_LOCATION">Leggi posizione approssimativa</string>
|
||||
<string name="android.permission.ACCESS_FINE_LOCATION">Leggi posizione precisa</string>
|
||||
<string name="android.permission.ACCESS_NETWORK_STATE">Leggi lo stato della rete mobile</string>
|
||||
<string name="android.permission.ACCESS_NOTIFICATION_POLICY">Ignore la politica di "non disturbare"</string>
|
||||
<string name="android.permission.ACCESS_NOTIFICATION_POLICY">Ignora la politica di "non disturbare"</string>
|
||||
<string name="android.permission.ACCESS_WIFI_STATE">Leggi lo stato della rete wifi</string>
|
||||
<string name="android.permission.ACTIVITY_RECOGNITION">Identificazione attività</string>
|
||||
<string name="android.permission.BATTERY_STATS">Leggere lo stato della batteria</string>
|
||||
@ -73,13 +73,13 @@
|
||||
<string name="android.permission.READ_CALENDAR">Leggere gli appuntamenti dal calendario</string>
|
||||
<string name="android.permission.READ_CALL_LOG">Leggere il registro chiamate</string>
|
||||
<string name="android.permission.READ_CONTACTS">Leggere informazioni dai Contatti</string>
|
||||
<string name="android.permission.READ_EXTERNAL_STORAGE">Legge la memoria esterna</string>
|
||||
<string name="android.permission.READ_EXTERNAL_STORAGE">Leggere la memoria esterna</string>
|
||||
<string name="android.permission.READ_PHONE_STATE">Rileva lo stato del telefono</string>
|
||||
<string name="android.permission.RECEIVE_BOOT_COMPLETED">Rileva riavvio del dispositivo</string>
|
||||
<string name="android.permission.RECORD_AUDIO">Registra audio</string>
|
||||
<string name="android.permission.SEND_SMS">Invia messaggio di testo</string>
|
||||
<string name="android.permission.VIBRATE">Attiva vibrazione</string>
|
||||
<string name="android.permission.WAKE_LOCK">Mantiene attivo il dispositivo</string>
|
||||
<string name="android.permission.WAKE_LOCK">Mantienere attivo il dispositivo</string>
|
||||
<string name="android.permission.WRITE_EXTERNAL_STORAGE">Scrive sulla SD</string>
|
||||
<string name="android.permission.WRITE_SECURE_SETTINGS">Cambia le impostazioni del dispositivo</string>
|
||||
<string name="android.permission.WRITE_SETTINGS">Cambia le impostazioni del dispositivo</string>
|
||||
@ -97,7 +97,6 @@
|
||||
<string name="anyWifi">qualsiasi wifi</string>
|
||||
<string name="appRequiresPermissiontoAccessExternalStorage">Automation richiede accesso alla memoria esterna per leggere le proprie impostazioni e regole.</string>
|
||||
<string name="application">Applicazione</string>
|
||||
<string name="applicationHasBeenUpdated">L\'applicazione è stata aggiornata.</string>
|
||||
<string name="apply">applica</string>
|
||||
<string name="areYouSure">Sei sicuro?</string>
|
||||
<string name="at">al</string>
|
||||
@ -125,8 +124,7 @@
|
||||
<string name="clickAndHoldForOptions">Clicca e mantieni premuto un elemento per vedere le opzioni.</string>
|
||||
<string name="closeTo">vicino a</string>
|
||||
<string name="closestPoi">Posizione più vicina:</string>
|
||||
<string name="com.wireguard.android.permission.CONTROL_TUNNELS">Controlla i tunnels dell\'applicazione wireguard</string>
|
||||
<string name="comparing">Ho la posizione sia dalla rete che dal GPS e le sto confrontando...</string>
|
||||
<string name="com.wireguard.android.permission.CONTROL_TUNNELS">Controllare i tunnels dell\'applicazione wireguard</string>
|
||||
<string name="configurationExportedSuccessfully">Configurazione esportata con successo.</string>
|
||||
<string name="configurationImportedSuccessfully">Configurazione esportata con successo.</string>
|
||||
<string name="connected">connesso</string>
|
||||
@ -177,8 +175,8 @@
|
||||
<string name="dropsBelow">inferiore</string>
|
||||
<string name="edit">Modifica</string>
|
||||
<string name="end">Fine</string>
|
||||
<string name="enterAPositiveValidNonDecimalNumber">Inserire un numero intero positivo</string>
|
||||
<string name="enterAname">Inserisci un nome!</string>
|
||||
<string name="enterAPositiveValidNonDecimalNumber">Inserisci un numero intero positivo</string>
|
||||
<string name="enterAname">Inserisci un nome.</string>
|
||||
<string name="enterNameForIntentPair">Definisci un nome per la coppia di intenzioni</string>
|
||||
<string name="enterPackageName">Inserisci un nome di pacchetto che sia valido.</string>
|
||||
<string name="enterPhoneNumber">Inserisci un numero di telefono. Lascia vuoto per accettare qualsiasi numero.</string>
|
||||
@ -190,9 +188,6 @@
|
||||
<string name="eraseSettings">Azzera le impostazioni</string>
|
||||
<string name="error">Errore</string>
|
||||
<string name="errorActivatingProfile">Errore nell\'attivazione del profilo:</string>
|
||||
<string name="errorActivatingWifiAp">Errore nell\'attivazione del punto di accesso wifi</string>
|
||||
<string name="errorChangingScreenRotation">Errore nel ruotare lo schermo</string>
|
||||
<string name="errorDeterminingWifiApState">Errore nel riconoscimento del punto di accesso wifi</string>
|
||||
<string name="errorReadingPoisAndRulesFromFile">Errore nella lettura di regole e posizioni dal file.</string>
|
||||
<string name="errorRunningRule">C\'è stato un errore cercando di eseguire una regola.</string>
|
||||
<string name="errorStartingOtherActivity">Errore nel\'avvio dell\'altra attività</string>
|
||||
@ -208,8 +203,6 @@
|
||||
<string name="fileDoesNotExist">Il file non esiste.</string>
|
||||
<string name="filesHaveBeenMovedTo">Automation usa adesso un percorso nuovo per salvare i tuoi files. Tutti i files di Automation sono stati mossi qui: \"%s\". I permessi di accesso alla memoria esterna non sono più necessari e si possono revocare. Questo verrà permanentemente rimosso in una versione futura.</string>
|
||||
<string name="filesStoredAt">I files di configurazione e log sono salvati nella cartella %1$s. Clicca su questo testo per aprire l\'esploratore di files. Sfortunatamente, questo solo funziona su un dispositivo con accesso root.\n\nPER TUTTI GLI ALTRI DISPOSITIVI: basta usare il bottone \'esporta\' per fare un backup.</string>
|
||||
<string name="forcedLocationUpdate">Aggiornamento forzato della posizione</string>
|
||||
<string name="forcedLocationUpdateLong">Avendo raggiunto il timeout comparando le misure, sarà considerata valida l\'ultima posizione rilevata.</string>
|
||||
<string name="friday">Venerdì</string>
|
||||
<string name="from">da</string>
|
||||
<string name="general">Generale</string>
|
||||
@ -220,11 +213,9 @@
|
||||
<string name="gettingPosition">Sto rilevando la posizione. Attendere prego ...</string>
|
||||
<string name="googleLocationChicanery">Questa applicazione accumula dati di localizzazione per abilitare regole basate sulla posizione insieme al rilevamento della velocità anche quando l\'applicazione è chiusa o non in uso.</string>
|
||||
<string name="googleLocationChicaneryOld">Questa applicazione accumula dati di localizzazione per determinare se sei attualmente ad una delle posizioni che hai creato. Inoltre, questa funzione è usata per determinare la tua velocità attuale se tale evento è stato attivato nelle regole. Questi rilevamenti sono effettuati anche quando l\'applicazione è chiusa o non in uso (ma solo se il servizio è attivato).</string>
|
||||
<string name="googleSarcasm">Grazie alla infinita sapienza di Google e continui sforzi per proteggere la privacy di ognuno di noi, nelle regole che possano inviare SMS o coinvolgere lo stato del telefono, sono state rimossi eventi ed azioni rilevanti.</string>
|
||||
<string name="google_app_id">id della tua app</string>
|
||||
<string name="googleSarcasm">Grazie alla infinita sapienza di Google e continui sforzi per proteggere la nostra privacy, nelle regole che possano inviare SMS o coinvolgere lo stato del telefono, sono state rimossi eventi ed azioni rilevanti.</string>
|
||||
<string name="gpsAccuracy">Precisone del GPS [m]</string>
|
||||
<string name="gpsComparison">Comparazione GPS</string>
|
||||
<string name="gpsComparisonTimeoutStop">Sto fermando la comparazione con il GPS a causa di un timeout.</string>
|
||||
<string name="hapticFeedback">Sensazione tattile (vibrazione al tocco)</string>
|
||||
<string name="headphoneAny">Oppure</string>
|
||||
<string name="headphoneMicrophone">Microfono</string>
|
||||
@ -232,14 +223,14 @@
|
||||
<string name="headphoneSimple">Auricolari</string>
|
||||
<string name="headsetConnected">Connesso auricolare (tipo: %1$s) </string>
|
||||
<string name="headsetDisconnected">Disconnesso auticolari (tipo: %1$s) </string>
|
||||
<string name="helpTextActivityDetection">Questa funzione può identificare se sei attualmente in movimento e se sei a piedi o in che tipo di veicolo (almeno con una certa precisione). Questa funzione non è completamente integrata con Automation, ma viene fornita dai servizi di Google Play. In pratica, non fornisce un risultato si/no, ma provvede una percentuale del livello di sicurezza dello stato di movimento identificato. Puoi scegliere la percentuale raggiunta la quale Automation accetterà un resultato. Nota: 1) è possibile che più di uno stato sia identificato nello stesso momento. Per esempio, potresti star CAMMINANDO dentro a un bus in movimento; 2) Questo sensor usa molta energia. Se possibile, potresti considerare delle alternative, per esempio, potresti identificare che stai guidando, forzando una connessione con il vivavoce.</string>
|
||||
<string name="helpTextActivityDetection">Questa funzione può identificare se sei attualmente in movimento e se sei a piedi o in che tipo di veicolo (almeno con una certa precisione). Questa funzione non è completamente integrata con Automation, ma viene fornita dai servizi di Google Play. In pratica, non fornisce un risultato si/no, ma provvede una percentuale del livello di sicurezza dello stato di movimento identificato. Puoi scegliere la percentuale raggiunta la quale Automation accetterà un resultato. Nota: 1) è possibile che più di uno stato sia identificato nello stesso momento. Per esempio, potresti star CAMMINANDO dentro a un bus in movimento; 2) Questo sensore ha bisogno di molte risorse di sistema. Se possibile, potresti considerare delle alternative, per esempio, potresti identificare che stai guidando, forzando una connessione con il vivavoce.</string>
|
||||
<string name="helpTextEnergySaving">Molti produttori di dispositive Android cercano di salvare energia limitando le attività di applicazioni eseguite in secondo piano. Sfortunatamente, questo spesso fa che tali applicazioni non funzionino correttamente e Automation è fra queste. Puoi leggere questa <a href="https://dontkillmyapp.com/">pagina web</a> per scoprire come escludere Automation da queste funzioni di risparmio energetico.</string>
|
||||
<string name="helpTextPoi">Una posizione è composta da cooridinate GPS ed un raggio d\'azione. Dato che il posizionamento realizzato tramite i ripetitori del tuo gestore è piuttosto impreciso (ma veloce e consuma poca batteria), è bene non specificare un raggio troppo piccolo. L\'applicazione suggerisce un raggio minimo quando si crea una nuova posizione.</string>
|
||||
<string name="helpTextProcessMonitoring">Se si specifica una regola che controlli l\'esecuzione di un processo, Automation eseguirà la verifica ogni x secondi (con x selezionabile nelle impostazioni). Bisogna considerare che un monitoraggio costante provocherebbe un rapido esaurimento della batteria e non esistono notifiche di questo tipo di attività proviste dal sistema operativo.</string>
|
||||
<string name="helpTextRules">Una regola sarà eseguita quando tutti i suoi eventi risultano veri. Basta che solo un evento non sia eseguito e la regola non si attiverà. Per eseguire una regola in base a diversi eventi individuali, è sufficiente creare regole specifiche per ogni set di eventi.</string>
|
||||
<string name="helpTextSound">Nello schermo principale puoi bloccare temporaneamente i cambi ai suoni per evitare l\'esecuzione di regole che facciano cambi alle attività sonore. Per esempio, potresti essere in una situatione o in un luogo dove normalmente ascoltare il suono di una suoneria è ok, ma in questa occasione bisognerebbe evitarlo. Questa funzione si disattiverà automaticamente non appena sia trascorso il tempo selezionato. Fai Click sul bottone + per raggiungere la quantità di tempo desiderata. Una volta attiva, questa si può disattivare nuovamente usando il pulsante di attivazione (e in questo modo, si riattiveranno le regole basate su cambi sonori).</string>
|
||||
<string name="helpTextTimeFrame">Se si specifica una regola con un intervallo temporale si hanno due scelte. È possibile scegliere se si desidera attivare la regola all\'interno o all\'esterno dell\'intervallo di tempo. In entrambi i casi l\'azione verrà eseguita una sola volta. Quindi, se si crea una regola che imposta il profilo su vibrazione nell\'intervallo temporale xyz, il telefono, passato allo stato vibrazione, rimarrà definitivamente in tale stato anche dopo lo scadere dell\'intervallo di tempo. Se si desidera che ciò avvenga è necessario specificare un\'altra regola con un altro periodo di tempo.</string>
|
||||
<string name="helpTextToggable">Le regole hanno un segno di spunta chiamato "Reversibile". Ciò significa che, se una regola viene eseguita al verificarsi di un evento e poi quest\'ultimo si verifica una seconda volta, il comando della regola verrà eseguito una ulteriore volta in modalità inversa, se possibile. Attualmente questo avverrà solo in combinazione con i tag NFC. Se li si tocca due volte la regola associata invertirà la situazione attuale. Per esempio una regola “Reversibile” può disattivare il WiFi se attivo e viceversa attivarlo se non attivo.</string>
|
||||
<string name="helpTextToggable">Le regole hanno un segno di spunta chiamato "Reversibile". Ciò significa che, se una regola viene eseguita al verificarsi di un evento e poi quest\'ultimo si verifica una seconda volta, il comando della regola verrà eseguito una ulteriore volta in modalità inversa, se possibile. Attualmente questo avverrà solo in combinazione con etichette NFC. Se le si tocca due volte la regola associata invertirà la situazione attuale. Per esempio una regola “Reversibile” può disattivare il WiFi se attivo e viceversa attivarlo se non attivo.</string>
|
||||
<string name="helpTitleEnergySaving">Risparmio energetico</string>
|
||||
<string name="hint">Suggerimento</string>
|
||||
<string name="httpAcceptAllCertificatesSummary">Salta il controllo dei certificati SSL (si consiglia di non attivarlo)</string>
|
||||
@ -272,7 +263,7 @@
|
||||
<string name="listenToWifiState">Rileva il cambiamento di stato del wifi se disponibile</string>
|
||||
<string name="loadWifiList">Carica lista wifi</string>
|
||||
<string name="locationDisabled">Localizzazione disattivata</string>
|
||||
<string name="locationEngineDisabledLong">Purtroppo la tua posizione non può più essere determinata. Un debito di gratitudine è dovuto a Google per la sua infinita saggezza e amabilità.\n\nVediamo di approfondire questo problema. A partire da Android 10 è stato introdotto un nuovo permesso che è necessario per determinare la vostra posizione in secondo piano (che naturalmente è necessario per un\'app come questa). Sebbene la consideri una buona idea in generale, i problemi che comporta per gli sviluppatori non lo sono.\n\nWQuando si sviluppa un\'app si può cercare di qualificarsi per questo permesso rispettando un catalogo di requisiti. Purtroppo le nuove versioni della mia app sono state rifiutate per un periodo di tre mesi. Ho soddisfatto tutti questi requisiti, mentre il merdoso supporto allo sviluppo di Google ha affermato che non l\'ho fatto. Dopo aver dato loro la prova che l\'ho fatto - ho ottenuto una risposta del tipo \"non posso più aiutarti\". Alla fine mi sono arreso.\n\nDi conseguenza, la versione di Google Play non può più usare la tua posizione come trigger. La mia unica opzione alternativa sarebbe stata quella di avere questa applicazione rimossa dal negozio interamente.\n\nNe sono molto dispiaciuto, ma ho fatto del mio meglio per discutere con un \"supporto\" che ripetutamente non ha superato il test di Turing.\n\nInfine, c\'è una buona notizia: puoi ancora avere tutto!\n\nAutomation è adesso una applicazione di codice aperto e si può trovare su F-Droid. Questo è un app store che si preoccupa davvero della tua privacy - invece che fingere di farlo. Basta fare il backup del tuo file di configurazione, disinstallare questa app, installarla di nuovo da F-Droid e ripristinare il tuo file di configurazione - fatto.\n\nClicca qui per maggiori informazioni:</string>
|
||||
<string name="locationEngineDisabledLong">Purtroppo la tua posizione non può più essere determinata. Un debito di gratitudine è dovuto a Google per la sua infinita saggezza e amabilità.\\n\\nVediamo di approfondire questo problema. A partire da Android 10 è stato introdotto un nuovo permesso che è necessario per determinare la vostra posizione in secondo piano (che naturalmente è necessario per un\'app come questa). Sebbene la consideri una buona idea in generale, i problemi che comporta per gli sviluppatori non lo sono.\\n\\nWQuando si sviluppa un\'app si può cercare di qualificarsi per questo permesso rispettando un catalogo di requisiti. Purtroppo le nuove versioni della mia app sono state rifiutate per un periodo di tre mesi. Ho soddisfatto tutti questi requisiti, mentre il merdoso supporto allo sviluppo di Google ha affermato che non l\'ho fatto. Dopo aver dato loro la prova che l\'ho fatto - ho ottenuto una risposta del tipo \"non posso più aiutarti\". Alla fine mi sono arreso. \\n\\nDi conseguenza, la versione di Google Play non può più usare la tua posizione come trigger. La mia unica opzione alternativa sarebbe stata quella di avere questa applicazione rimossa dal negozio interamente.\\n\\nNe sono molto dispiaciuto, ma ho fatto del mio meglio per discutere con un \"supporto\" che ripetutamente non ha superato il test di Turing.\n\\nInfine, c\'è una buona notizia: puoi ancora avere tutto!\\n\\nAutomation è adesso una applicazione di codice aperto e si può trovare su F-Droid. Questo è un app store che si preoccupa davvero della tua privacy - invece che fingere di farlo. Basta fare il backup del tuo file di configurazione, disinstallare questa app, installarla di nuovo da F-Droid e ripristinare il tuo file di configurazione - fatto.\\n\\nClicca qui per maggiori informazioni:</string>
|
||||
<string name="locationEngineDisabledShort">La localizzazione non può più essere determinata. Clicca qui per scoprirne il perché.</string>
|
||||
<string name="locationEngineNotActive">Ricerca posizione non attiva.</string>
|
||||
<string name="lockSoundChanges">Blocca il cambio dei suoni:</string>
|
||||
@ -302,24 +293,24 @@
|
||||
<string name="newNfcId">Scrivi un nuovo ID NFC</string>
|
||||
<string name="newThreadRules">Nuova discussione</string>
|
||||
<string name="newsOptIn">Vuoi ricevere delle notizie su questa app (solo quelle importanti) nella schermata principale? Queste vengono scaricate dal sito web dello sviluppatore. Non ci sarà nessuna notifica intrusiva, solo un testo nella schermata principale quando apri l\'app.</string>
|
||||
<string name="nfcApplyTagToRule">Applicazione del tag alla regola</string>
|
||||
<string name="nfcBringTagIntoRange">Portare un tag NFC nel campo d\'azione.</string>
|
||||
<string name="nfcBringTagIntoRangeToRead">Avvicina il TAG da leggere.</string>
|
||||
<string name="nfcEnterValidIdentifier">Inserire un nome valido per il tag (come "Porta d\'ingresso di casa").</string>
|
||||
<string name="nfcNoNdefIntentBut">Nessun intento NFC NDEF , ma</string>
|
||||
<string name="nfcNoTag">Nessun tag rilevato.</string>
|
||||
<string name="nfcApplyTagToRule">Applicazione della etichetta alla regola</string>
|
||||
<string name="nfcBringTagIntoRange">Portare una etichetta NFC nel campo d\'azione.</string>
|
||||
<string name="nfcBringTagIntoRangeToRead">Avvicina la etichetta da leggere.</string>
|
||||
<string name="nfcEnterValidIdentifier">Inserire un nome valido per l\'etichetta (come "Porta d\'ingresso di casa").</string>
|
||||
<string name="nfcNoNdefIntentBut">Nessun intento NFC NDEF, ma</string>
|
||||
<string name="nfcNoTag">Nessuna etichetta rilevata.</string>
|
||||
<string name="nfcNotSupportedInThisAndroidVersionYet">NFC non ancora supportato in questa versione di Android.</string>
|
||||
<string name="nfcReadTag">Lettura ID dal tag</string>
|
||||
<string name="nfcTag">Tag NFC</string>
|
||||
<string name="nfcTagDataNotUsable">Dati del tag non leggibili, si prega di riscriverli.</string>
|
||||
<string name="nfcTagDiscovered">Tag rilevato</string>
|
||||
<string name="nfcTagFoundWithText">Trovato Tag con testo:</string>
|
||||
<string name="nfcTagReadSuccessfully">Tag letto con successo.</string>
|
||||
<string name="nfcTagWriteError">Errore di scrittura sul tag. È sufficientemente vicino?</string>
|
||||
<string name="nfcTagWrittenSuccessfully">Scrittura Tag eseguita con successo.</string>
|
||||
<string name="nfcReadTag">Lettura ID dall\'etichetta</string>
|
||||
<string name="nfcTag">Etichetta NFC</string>
|
||||
<string name="nfcTagDataNotUsable">Dati dell\'etichetta non leggibili, si prega di riscriverli.</string>
|
||||
<string name="nfcTagDiscovered">Etichetta rilevata</string>
|
||||
<string name="nfcTagFoundWithText">Trovata etichetta con testo:</string>
|
||||
<string name="nfcTagReadSuccessfully">Etichetta letta con successo.</string>
|
||||
<string name="nfcTagWriteError">Errore di scrittura dell\'etichetta. È sufficientemente vicina?</string>
|
||||
<string name="nfcTagWrittenSuccessfully">Scrittura dell\'etichetta eseguita con successo.</string>
|
||||
<string name="nfcUnsupportedEncoding">Codifica non supportata:</string>
|
||||
<string name="nfcValueNotSuitable">Valore memorizzato non adatto.</string>
|
||||
<string name="nfcWriteTag">Scrittura tag</string>
|
||||
<string name="nfcWriteTag">Scrittura etichetta</string>
|
||||
<string name="no">No</string>
|
||||
<string name="noApplicableFilesFoundInDirectory">Nessun file adatto è stato trovato in quella directory.</string>
|
||||
<string name="noChangeSelectedProfileDoesntMakeSense">Nessun cambiamento selezionato. Questo profilo non ha senso.</string>
|
||||
@ -329,13 +320,10 @@
|
||||
<string name="noFilesImported">Non è stato possibile importare nessun file.</string>
|
||||
<string name="noKnownWifis">Non c\'è nessuna wifi conosciuta sul tuo dispositivo.</string>
|
||||
<string name="noMapsApplicationFound">Non trovo un navigatore installato.</string>
|
||||
<string name="noOverLap">Nessuna duplicazione di posizioni rilevata.</string>
|
||||
<string name="noPoiInRelevantRange">Nessuna posizione nel raggio specificato.</string>
|
||||
<string name="noPoisDefinedShort">Nessuna posizione indicata.</string>
|
||||
<string name="noPoisSpecified">Non hai specificato nessuna posizione. È necessario.</string>
|
||||
<string name="noProfileChangeSoundLocked">Il profilo non può essere attivato. L\'ultimo profilo attivato è bloccato.</string>
|
||||
<string name="noProfilesCreateOneFirst">Non è specificato nessun profilo nella tua configurazione. Prima di tutto, creane uno.</string>
|
||||
<string name="noWifiNameSpecifiedAnyWillDo">Nessun nome della wifi specificato; devi inserirne uno.</string>
|
||||
<string name="noProfilesCreateOneFirst">Non c\'è nessun profilo nella tua configurazione. Prima di tutto, creane uno.</string>
|
||||
<string name="noWritableFolderFound">Nessuna cartella scrivibile trovata che permetta salvare il file di configurazione.</string>
|
||||
<string name="noiseDetectionHint">Se pensi che la rilevazione del rumore non funzioni correttamente (in base al valore specificato) considera che ogni telefono è diverso. Quindi puoi tarare il "riferimento per la misurazione del rumore" nelle impostazioni. Consulta http://en.wikipedia.org/wiki/Decibel per maggiori informazioni. È possibile utilizzare la \"Taratura audio\" dalla schermata principale per calibrare il dispositivo.</string>
|
||||
<string name="none">nessuno</string>
|
||||
@ -360,11 +348,11 @@
|
||||
<string name="parameterValue">Valore</string>
|
||||
<string name="password">Password</string>
|
||||
<string name="permissionsExplanation">Spiegazione delle autorizzazioni richieste</string>
|
||||
<string name="permissionsExplanationGeneric">L\'applicazione sta venendo attualmente eseguita in modalità limitata ed ha pertanto disattivato alcune funzioni. Per funzionare appieno richiede ulteriori permessi. Se vuoi utilizzare tutte le funzionalità è necessario concedere i permessi nelle successive finestre o alcune regole non potranno essere eseguite. Di seguito ti viene data una spiegazione dei permessi richiesti. Clicca su \"Continua\" quando sei pronto a procedere.</string>
|
||||
<string name="permissionsExplanationGeneric">L\'applicazione si sta eseguendo in modalità limitata ed ha pertanto disattivato alcune funzioni. Per funzionare appieno richiede ulteriori permessi. Se vuoi utilizzare tutte le funzionalità è necessario concedere i permessi nelle successive finestre o alcune regole non potranno essere eseguite. Di seguito ti viene data una spiegazione dei permessi richiesti. Clicca su \"Continua\" quando sei pronto a procedere.</string>
|
||||
<string name="permissionsExplanationSmall">Per attivare la funzione che hai appena tentato di utilizzare, sono necessari ulteriori permessi. Clicca \"Continua\" per richiederli.</string>
|
||||
<string name="permissionsTitle">Permessi necessari</string>
|
||||
<string name="phoneCall">Chiamata</string>
|
||||
<string name="phoneDirection">Seleziona se entrante o uscente</string>
|
||||
<string name="phoneDirection">Seleziona se\nentrante o uscente</string>
|
||||
<string name="phoneNrReplacementError">Non ho l\'ultimo numero di telefono e quindi non posso inserirlo nella variabile.</string>
|
||||
<string name="phoneNumber">Numero di telefono</string>
|
||||
<string name="phoneNumberExplanation">È possibile inserire un numero di telefono specifico, ma non è necessario. Se vuoi specificarne uno, puoi sceglierlo dalla tua rubrica o inserirlo manualmente. Inoltre puoi usare espressioni regolari. Per testare un\'espressione regolare mi piace questa pagina:</string>
|
||||
@ -376,7 +364,6 @@
|
||||
<string name="pleaseSpecifiyAction">Indica almeno un\'azione.</string>
|
||||
<string name="pleaseSpecifiyTrigger">Indica almeno un evento.</string>
|
||||
<string name="poi">Posizione</string>
|
||||
<string name="poiCouldBeInRange">Almeno la posizione %1$s potrebbe essere in zona, se non ne esistono altre in aggiunta.</string>
|
||||
<string name="poiList">Elenco delle posizioni:</string>
|
||||
<string name="poiStillReferenced">Ci sono ancora regole che fanno riferimento a questa posizione (%1$s). Quindi non posso cancellarla ancora.</string>
|
||||
<string name="pois">Posizioni</string>
|
||||
@ -411,26 +398,10 @@
|
||||
<string name="ruleActivate">Attivando la regola %1$s</string>
|
||||
<string name="ruleActivateToggle">Attivando la regola %1$s in modalità reversibile</string>
|
||||
<string name="ruleActive">Regola attiva</string>
|
||||
<string name="ruleCheckOf">Controllo della regola %1$s</string>
|
||||
<string name="ruleDoesntApplyBatteryHigherThan">Impossibile applicare la regola: Livello della batteria superiore a</string>
|
||||
<string name="ruleDoesntApplyBatteryLowerThan">Impossibile applicare la regola: livello della batteria inferiore a</string>
|
||||
<string name="ruleDoesntApplyDeviceInRangeButShouldNotBe">Impossibile applicare la regola. Il dispositivo è in portata, ma non dovrebbe esserlo</string>
|
||||
<string name="ruleDoesntApplyItsLouderThan">Impossibile applicare la regola. È più forte di</string>
|
||||
<string name="ruleDoesntApplyItsQuieterThan">Impossibile applicare la regola. È inferiore a</string>
|
||||
<string name="ruleDoesntApplyNoTagLabel">Impossibile applicare la regola. Non vi è alcuna etichetta tag o nessun tag. </string>
|
||||
<string name="ruleDoesntApplyNotTheCorrectDeviceAddress">Impossibile applicare la regola. Indirizzo dispositivo bluetooth errato.</string>
|
||||
<string name="ruleDoesntApplyNotTheCorrectDeviceName">Impossibile applicare la regola. Nome dispositivo bluetooth errato.</string>
|
||||
<string name="ruleDoesntApplyNotTheCorrectSsid">Impossibile applicare la regola. SSID errato (richiesto: \"%1$s\", ottenuto: \"%2$s\").</string>
|
||||
<string name="ruleDoesntApplyStateNotCorrect">Impossibile applicare la regola. Stato errato</string>
|
||||
<string name="ruleDoesntApplyWeAreFasterThan">Impossibile applicare la regola. Velocità superiore a</string>
|
||||
<string name="ruleDoesntApplyWeAreSlowerThan">Impossibile applicare la regola. Velocità inferiore a</string>
|
||||
<string name="ruleDoesntApplyWrongTagLabel">Impossibile applicare la regola. Etichetta Tag errata.</string>
|
||||
<string name="ruleHistory">Cronologia delle regole (dalla più recente):</string>
|
||||
<string name="ruleIsDeactivatedCantApply">La regola %1$s è disabilitata e non posso applicarla.</string>
|
||||
<string name="ruleLegend">Verde = abilitata, Rosso = disabilitata, Giallo = necessita ulteriori permessi</string>
|
||||
<string name="ruleList">Elenco delle regole:</string>
|
||||
<string name="ruleName">Nome della regola</string>
|
||||
<string name="ruleNotToggable">La regola %1$s non è adatta ad essere Reversibile.</string>
|
||||
<string name="ruleToggable">La regola %1$s è adatta per essere Reversibile.</string>
|
||||
<string name="ruleXrequiresThis">La regola \"%1$s\" ne ha bisogno.</string>
|
||||
<string name="rules">Regole</string>
|
||||
@ -503,7 +474,7 @@
|
||||
<string name="startAppByActivity">per attività</string>
|
||||
<string name="startAppBySendBroadcast">per sendBroadcast()</string>
|
||||
<string name="startAppByStartActivity">per startActivity()</string>
|
||||
<string name="startAppChoiceNote">Qui hai 2 opzioni generali: 1. Puoi avviare un programma selezionando un\'attività. Immagina questo come la preselezione di una specifica schermata/finestra di un\'applicazione. Tieni a mente che questo potrebbe non funzionare sempre. Questo perché le finestre di un\'applicazione potrebbero interagire tra loro, ad esempio per passarsi dei parametri. Quando si avvia direttamente una schermata specifica la cui interazione non è ancora avvenuta, la finestra potrebbe chiudersi istantaneamente (quindi non verrà mai mostrata). Ma puoi provare comunque! Inserisci un percorso di attività manualmente, ma si raccomanda di usare il pulsante \"Seleziona\". Se decidi di inserirlo manualmente, digita il nome del pacchetto dell\'applicazione nel campo superiore e il percorso completo dell\'attività in quello inferiore. 2. Selezione per azione. Invece che selezionare una specifica finestra puoi anche avviare un programma per mezzo di un\'azione. Questo è come gridare "Vorrei xyz" e se c\'è un\'applicazione installata che è registrata con quella funzione, verrà avviata. Un buon esempio sarebbe avviare un navigatore - potresti anche averne più di uno installato (ma uno è di solito quello di default). Devi inserire questo manualmente, mentre PackageName è opzionale qui. Tieni a mente che nessuna variabile sarà risolta. Se vuoi avviare la fotocamera per esempio usando \"MediaStore.ACTION_IMAGE_CAPTURE\" non funzionerà. Devi dare un\'occhiata alla documentazione di Android e usare invece il valore effettivo di questa variabile che in questo esempio sarebbe \"android.media.action.IMAGE_CAPTURE\".</string>
|
||||
<string name="startAppChoiceNote">Qui hai 2 opzioni generali:\n\n1. Puoi avviare un programma selezionando un\'attività. Immagina questo come la preselezione di una specifica schermata/finestra di un\'applicazione. Tieni a mente che questo potrebbe non funzionare sempre. Questo perché le finestre di un\'applicazione potrebbero interagire tra loro, ad esempio per passarsi dei parametri. Quando si avvia direttamente una schermata specifica la cui\n\ninterazione non è ancora avvenuta, la finestra potrebbe chiudersi istantaneamente (quindi non verrà mai mostrata). Ma puoi provare comunque! Inserisci un percorso di attività manualmente, ma si raccomanda di usare il pulsante \"Seleziona\". Se decidi di inserirlo manualmente, digita il nome del pacchetto dell\'applicazione nel campo superiore e il percorso completo dell\'attività in quello inferiore.\n\n2. Selezione per azione. Invece che selezionare una specifica finestra puoi anche avviare un programma per mezzo di un\'azione. Questo è come gridare "Vorrei xyz" e se c\'è un\'applicazione installata che è registrata con quella funzione, verrà avviata. Un buon esempio sarebbe avviare un navigatore - potresti anche averne più di uno installato (ma uno è di solito quello di default). Devi inserire questo manualmente, mentre PackageName è opzionale qui. Tieni a mente che nessuna variabile sarà risolta. Se vuoi avviare la fotocamera per esempio usando \"MediaStore.ACTION_IMAGE_CAPTURE\" non funzionerà. Devi dare un\'occhiata alla documentazione di Android e usare invece il valore effettivo di questa variabile che in questo esempio sarebbe \"android.media.action.IMAGE_CAPTURE\".</string>
|
||||
<string name="startAppSelectionType">Metodo per\nselezionare l\'applicazione</string>
|
||||
<string name="startAppStartType">Seleziona tipo di avvio</string>
|
||||
<string name="startAtSystemBoot">Avvio automatico al boot</string>
|
||||
@ -516,7 +487,6 @@
|
||||
<string name="startServiceAfterAppUpdateShort">Riavvio del servizio dopo l\'aggiornamento</string>
|
||||
<string name="started">avviato</string>
|
||||
<string name="starting">avviando</string>
|
||||
<string name="startingGpsTimeout">Avviando timeout GPS</string>
|
||||
<string name="status">Stato</string>
|
||||
<string name="stillGettingPosition">Ancora in attesa della posizione</string>
|
||||
<string name="stopped">terminatoo</string>
|
||||
@ -530,7 +500,7 @@
|
||||
<string name="textMessageAnnotations">Puoi inserire direttamente un numero di telefono. In alternativa usa l\'opzione contatti per sceglierne uno. Ma tieni presente che il numero verrà memorizzato qui, non nel contatto. Se cambi il numero di telefono di un contatto, dovrai aggiornarlo nella questa regola. Non si aggiorna da solo.</string>
|
||||
<string name="textToSend">Testo da inviare</string>
|
||||
<string name="textToSpeak">Testo da leggere</string>
|
||||
<string name="textTooShort">Il testo deve avere almeno 10 caratteri.</string>
|
||||
<string name="enterPhoneNumberAndText">Inserisci un numero di telefono e un testo.</string>
|
||||
<string name="theFollowingPermissionsHaveBeenDenied">Sono state negate le seguenti autorizzazioni:</string>
|
||||
<string name="theseAreThePermissionsRequired">Queste sono le autorizzazioni necessarie:</string>
|
||||
<string name="thursday">Giovedì</string>
|
||||
@ -547,7 +517,7 @@
|
||||
<string name="to">a</string>
|
||||
<string name="toggableRules">Regole \"Reversibili\"</string>
|
||||
<string name="toggle">reversibile</string>
|
||||
<string name="toggleNotAllowed">La reversibilità al momento è disponibile solo per le regole che hanno come evento un tag NFC. Consulta l\'aiuto per i dettagli.</string>
|
||||
<string name="toggleNotAllowed">La reversibilità al momento è disponibile solo per le regole che hanno come evento una etichetta NFC. Consulta l\'aiuto per i dettagli.</string>
|
||||
<string name="toggleRule">Regola Reversibile</string>
|
||||
<string name="toggling">Attivando</string>
|
||||
<string name="triggerCharging">Batteria sotto carica</string>
|
||||
@ -557,20 +527,18 @@
|
||||
<string name="triggerPointOfInterest">Posizione</string>
|
||||
<string name="triggerSpeed">Velocità</string>
|
||||
<string name="triggerTimeFrame">Intervallo</string>
|
||||
<string name="triggerUrlReplacementPositionError">Hai chiesto di aggiungere una posizione alla tua URL. Purtroppo non ho ancora ricevuto nessuna posizione.</string>
|
||||
<string name="triggerUsb_host_connection">connessione al computer (USB)</string>
|
||||
<string name="triggers">Evento(i)</string>
|
||||
<string name="triggersComment">(tutti gli eventi devono essere validi allo stesso tempo)</string>
|
||||
<string name="tuesday">Martedì</string>
|
||||
<string name="unknownActionSpecified">Azione non riconosciuta.</string>
|
||||
<string name="unknownError">Errore indeterminato.</string>
|
||||
<string name="until">finchè</string>
|
||||
<string name="urlLegend">Variabili:\n È possibile utilizzare le seguenti variabili. All\'attivazione saranno sostituite con il valore corrispondente sul dispositivo. Includi le parentesi nel tuo testo.\n\n[uniqueid] - Il numero di serie del tuo dispositivo\n[serialnr] - Il serial number del tuo dispositivio\n[latitude] - La latitudine del tuo dispositivo\n[longitude] - La longitudine del tuo dispositivo\n[phonenr] - Numero dell\'ultima chiamata (entrante o uscente)\n[d] - Il giorno del mese, sempre 2 cifre\n[m] - Mese in formato numerico, sempre 2 cifre\n[Y] - L\’anno, sempre 4 cifre\n[h] - Ore in formato 12 ore, sempre 2 cifre con due punti\n[H] - Ore in formato 24 ore, sempre 2 cifre con due punti\n[i] - Minuti, sempre 2 cifre\n[s] - Secondi, sempre 2 cifre\n[ms] - millisecondi, sempre 3 cifre [notificationTitle] - titolo dell\'ultima notifica [notificationText] - testo dell\'ultima notifica</string>
|
||||
<string name="urlToTrigger">URL da caricare:</string>
|
||||
<string name="urlTooShort">L\'url deve avere almeno 10 caratteri.</string>
|
||||
<string name="usbTetheringFailForAboveGingerbread">Questo molto probabilmente non funzionerà dato che sei su una versione superiore ad Android 2.3. Tuttavia è possibile utilizzare la connessione wifi tethering per attivare la regola se sei su una versione inferiore ad Android 7.</string>
|
||||
<string name="usbTetheringFailForAboveGingerbread">Questo molto probabilmente non funzionerà dato che sei su una versione superiore ad Android 2.3. Tuttavia è possibile utilizzare la connessione wifi tethering per attivare la regola.</string>
|
||||
<string name="useAuthentication">Usa l\'autenticazione</string>
|
||||
<string name="useExistingTag">Utilizzo di un tag NFC esistente</string>
|
||||
<string name="useExistingTag">Utilizzo di una etichetta NFC esistente</string>
|
||||
<string name="useTextToSpeechOnNormalSummary">Usa TextToSpeech nel modo normale</string>
|
||||
<string name="useTextToSpeechOnNormalTitle">TTS in modo normale</string>
|
||||
<string name="useTextToSpeechOnSilentSummary">Usa TextToSpeech nel modo silenzioso</string>
|
||||
@ -584,8 +552,8 @@
|
||||
<string name="volumeAlarms">Allarmi sonori</string>
|
||||
<string name="volumeMusicVideoGameMedia">Multimedia (musica, video …)</string>
|
||||
<string name="volumeRingtoneNotifications">Toni e notifiche</string>
|
||||
<string name="volumeTest">Taratura audio</string>
|
||||
<string name="volumeTesterExplanation">Per calcolare il valore del rumore di fondo in dB è necessario specificare un valore di riferimento fisico (si prega di leggere Wikipedia per ulteriori informazioni). Questo valore è probabilmente diverso per ogni telefono. Trascinare il cursore per modificare il valore di riferimento fisico definito. Più alto è il valore di riferimento e più basso sarà il valore misurato in dB. Misurazioni costanti saranno effettuate ogni %1$s secondi ed i risultati visualizzati sotto. Premere indietro quando hai trovato un valore adeguato.</string>
|
||||
<string name="volumeTest">Calibratura audio</string>
|
||||
<string name="volumeCalibrationExplanation">Per calcolare il valore del rumore di fondo in dB è necessario specificare un valore di riferimento fisico (si prega di leggere Wikipedia per ulteriori informazioni). Questo valore è probabilmente diverso per ogni telefono. Trascinare il cursore per modificare il valore di riferimento fisico definito. Più alto è il valore di riferimento e più basso sarà il valore misurato in dB. Misurazioni costanti saranno effettuate ogni %1$s secondi ed i risultati visualizzati sotto. Premere indietro quando hai trovato un valore adeguato.</string>
|
||||
<string name="volumes">Volumi</string>
|
||||
<string name="waitBeforeNextAction">Attesa prima della azione successiva</string>
|
||||
<string name="waitBeforeNextActionEnterValue">Inserisci il valore della pausa tra tra un\'azione e la successiva (millisecondi).</string>
|
||||
@ -603,12 +571,92 @@
|
||||
<string name="wifi">wifi</string>
|
||||
<string name="wifiConnection">Connessione wifi</string>
|
||||
<string name="wifiName">Nome wifi</string>
|
||||
<string name="wifiNameMatchesRuleWillApply">Il nome della wifi combacia. La regola si applicherà.</string>
|
||||
<string name="wifiNameSpecifiedCheckingThat">Verifica della wifi indicata.</string>
|
||||
<string name="wifiState">Stato Wifi</string>
|
||||
<string name="wifiTetheringFailForAboveNougat">Questo non funziona più dato che sei su una versione superiore ad Android 7.</string>
|
||||
<string name="with">con</string>
|
||||
<string name="withLabel">con etichetta</string>
|
||||
<string name="writeLogFile">Memorizza un file di log</string>
|
||||
<string name="yes">Si</string>
|
||||
<string name="clone">Clonare</string>
|
||||
<string name="state">Status</string>
|
||||
<string name="urlToTriggerExplanation">Questa funzione NON apre un navigatore, ma attiva un indirizzo URL in secondo piano. Puoi usarla per esempio per mandare dei comandi al tuo sistema di domotica.</string>
|
||||
<string name="automaticUpdateCheck">Controlla aggiornamenti</string>
|
||||
<string name="automaticUpdateCheckSummary">Applicabile solo alla versione APK.</string>
|
||||
<string name="updateAvailable">C\'è un nuovo aggiornamento disponibile. Vuoi aprire il navigatore per scaricarlo?</string>
|
||||
<string name="locationFound">Ubicazione trovata. Il raggio minimo per le ubicazioni è di %1$d m.</string>
|
||||
<string name="locationFoundInaccurate">È stato possibile solo trovare una ubicazione con una precisione limitata. Potrebbe non funzionare in maniera affidabile. Il raggio minimo per le ubicazioni è di %1$d m.</string>
|
||||
<string name="noLocationCouldBeFound">Nessuna posizione è stata trovata dopo un tempo di attesa di %1$s seconds.</string>
|
||||
<string name="pleaseGiveBgLocation">Nella schermata successiva vai su permessi, poi posizione. Lì seleziona \"Consenti sempre\" per permettere ad Automation di determinare la tua posizione in secondo piano.</string>
|
||||
<string name="tones">Suonerias</string>
|
||||
<string name="dnd">Non disturbare</string>
|
||||
<string name="deviceOrientation">Orientamento</string>
|
||||
<string name="tolerance">Tolleranza</string>
|
||||
<string name="orientationAzimuth">Azimut:</string>
|
||||
<string name="actionSetBluetoothTethering">Bluetooth Tethering</string>
|
||||
<string name="actionTurnBluetoothTetheringOn">accendere Bluetooth Tethering</string>
|
||||
<string name="actionTurnBluetoothTetheringOff">spegnere Bluetooth Tethering</string>
|
||||
<string name="vibrate">Vibrare</string>
|
||||
<string name="test">Provare</string>
|
||||
<string name="VibrateExplanation">Inserisci una durata per la vibrazione, seguita da una virgola e poi la durata di una pausa. Si possono concatenare tutte le vibrazioni che si vogliono. Per esempio, lo schema 100,500,500,1000,100 farà vibrare il dispositivo per 100ms, aspetterà 500ms, vibrerà 500ms, aspetterà 1000ms e vibrerà 100ms. Se pensi che una vibrazione non venga eseguita, prova ad aumentare la pausa precedente.</string>
|
||||
<string name="pleaseEnterValidVibrationPattern">Si prega di inserire uno schema di vibrazione valido.</string>
|
||||
<string name="top">Superiore</string>
|
||||
<string name="bottom">Inferiore</string>
|
||||
<string name="tabsPlacement">Posizione della barra delle schede</string>
|
||||
<string name="tabsPlacementSummary">Scegli dove posizionare la barra delle schede.</string>
|
||||
<string name="wifiApi30">Dato che Google ha rovinato un\'altra parte ancora di Android, a partire con le API 30, solo le reti wifi attualmente visibili possono essere visualizzate, non tutte quelle a cui il tuo dispositivo si è collegato.</string>
|
||||
<string name="smsDialogNotice">Se non hai mai usato una azione \"invia-sms\" prima, Android potrebbe visualizzare una finestra di conferma addizionale, chiedendo di permettere l\'invio di messaggi. Dovrai mettere il segno di spunta su \"permetti sempre"\ e confermare se vuoi che questa attività funzioni in secondo piano. Si raccomanda l\'esecuzione manuale la prima volta solo per far apparire questa finestra.</string>
|
||||
<string name="silentTriggersDnd">ATTENZIONE: La modalità silenziosa spesso attiva quella \"non disturbare\" sui dispositivi più nuovi. Se questo avviene sul tuo, ti raccomando di usare la modalità normale invece di abbassare tutti i volumi a zero.</string>
|
||||
<string name="miscellaneous">Altro</string>
|
||||
<string name="dndOff">Spegni \"Non disturbare\"</string>
|
||||
<string name="dndPriority">Permetti notifiche prioritarie</string>
|
||||
<string name="dndAlarms">Permetti allarmi</string>
|
||||
<string name="dndNothing">Non permettere nulla</string>
|
||||
<string name="dndRemarks">La configurazione dettagliata (come il permesso di fare chiamate, scegliere numeri specifici, etc.) può solo essere effettuata dalle impostazioni di sistema.</string>
|
||||
<string name="permissionsRequiredNotAvailable">Le tue regole hanno bisogno di permessi che non possono essere richiesti da questa versione di Automation.</string>
|
||||
<string name="automationNotificationsIgnored">Se non scegli una applicazione specifica, ma scegli \"Qualsiasi applicazione\", le notifiche provenienti da Automation saranno ignorate per evitare che vada in ripetizione.</string>
|
||||
<string name="repeatEveryXseconds">Ripeti ogni x secondi</string>
|
||||
<string name="repeatEveryXsecondsWithVariable">ripeti ogni %1$s secondi</string>
|
||||
<string name="enterRepetitionTime">Devi inserire un valore positivo e non decimale per il tempo di ripetizione.</string>
|
||||
<string name="elementSkipped">Un elemento del file di configurazione non può essere letto. Il file potrebbe essere stato create da una versione più recente del programma.</string>
|
||||
<string name="donate">Donazioni</string>
|
||||
<string name="btTetheringNotice">È stato confermato che questa caratteristica funziona fino ad Android 8.0. Da qualche versione superiore ha cessato di funzionare, ma dato che non ho sufficienti dispositivi fisici, non posso identificare quale sia. Su Android 11 sicuramente non funziona più. Se hai una versione intermedia, per favore fammi sapere se funziona per il tuo dispositivo, o no. </string>
|
||||
<string name="notice">Avviso</string>
|
||||
<string name="orientationPitch">Inclinazione:</string>
|
||||
<string name="orientationRoll">Rotazione:</string>
|
||||
<string name="enterValidNumbersIntoAllFields">Inserire un numero valido in tutti i campi.</string>
|
||||
<string name="deviceOrientationExplanation">When you move your device the below numbers will update. What you can see there, is the current orientation of your device measured in degrees. If it is in the desired orientation, click the apply button to copy the current values to the desired fields.\nBecause reaching this exact orientation ever again is highly unlikely you must also enter a tolerance. The is amount of degrees to which the orientation can deviate in either direction. 15° will result in a total angle of 30°, 15° in every direction.\nIf you only care about one specific axis, specify a tolerance of 180° for the two other ones.</string>
|
||||
<string name="wouldCurrentlyApply">Si applica attualmente?</string>
|
||||
<string name="deviceIsInCertainOrientation">il dispositivo si trova in una certa orientazione</string>
|
||||
<string name="toleranceOf180OnlyAllowedIn2Fields">Una tolleranza di 180 è permessa solo per 2 campi di tolleranza, non tutti e tre. Altrimenti l\'attività si applicherebbe SEMPRE.</string>
|
||||
<string name="unknown">sconosciuto</string>
|
||||
<string name="orientation">Orientazione</string>
|
||||
<string name="triggerWrong">C\'è qualcosa di errato con questo evento. Non può essere caricato correttamente.</string>
|
||||
<string name="turnScreenOnOrOff">Accendi/Spegni lo schermo</string>
|
||||
<string name="turnScreenOn">accendi lo schermo</string>
|
||||
<string name="turnScreenOff">spegni lo schermo</string>
|
||||
<string name="mustApply">Si deve applicare</string>
|
||||
<string name="explanationDeviceOrientationDirection">Se la casella di controllo è spuntata, significa che il dispositivo deve essere nell\'orientamento specificato. Se non è spuntata, qualsiasi orientamento che NON corrisponde ai tuoi criteri andrà bene. </string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalTitle">Frequenza del segnale</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalSummary">Accetta nuovi segnali di movimento ogni x millisecondi </string>
|
||||
<string name="deviceOrientationSettings">Impostazioni di orientamento del dispositivo</string>
|
||||
<string name="android.permission.BIND_DEVICE_ADMIN">Amministrazione dispositivo</string>
|
||||
<string name="deviceAdminNote">I permessi di amministratore del dispositivo sono necessari per almeno 1 delle regole che hai creato.</string>
|
||||
<string name="profileTriggerCheckSettings">Se questa casella di controllo non è disabilitata, verrà selezionata solo se il profilo selezionato è stato l\'ultimo ad essere attivato. Non importa se le impostazioni relative all\'audio sono state modificate esternamente.\nTuttavia, se la casella di controllo è abilitata, le impostazioni audio correnti devono essere definite nel profilo. ATTENZIONE: il controllo del file della suoneria non è ancora supportato.</string>
|
||||
<string name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS">Escludere dall\'ottimizzazione della batteria</string>
|
||||
<string name="recommendedForBetterReliability">Consigliato per una migliore affidabilità</string>
|
||||
<string name="needsToBeActive">Deve essere attivo</string>
|
||||
<string name="checkSettings">Controlla le impostazioni</string>
|
||||
<string name="profileActive">profilo %1$s è attivo</string>
|
||||
<string name="profileNotActive">profilo %1$s non attivo</string>
|
||||
<string name="ruleXIsUsingProfileY">Impossibile eliminare questo profilo. La regola %s$1 fa riferimento al profilo %s$2.</string>
|
||||
<string name="profileCouldNotBeDeleted">Impossibile eliminare il profilo.</string>
|
||||
<string name="noRepetition">nessuna ripetizione</string>
|
||||
<string name="usingAuthentication">utilizzo dell\'autenticazione</string>
|
||||
<string name="toNumber">al numero</string>
|
||||
<string name="message">messaggio</string>
|
||||
<string name="onDays">nei giorni</string>
|
||||
<string name="notSet">non impostato</string>
|
||||
<string name="takeLauncherActivity">Trova automaticamente</string>
|
||||
<string name="pickActivityManually">Scegli manualmente</string>
|
||||
<string name="launcherOrManualExplanation">Modalità semplice: l\'automazione può provare a identificare l\'attività di avvio del programma desiderato.\nIn alternativa puoi anche scegliere manualmente una delle attività dell\'applicazione.\nCosa vorresti?</string>
|
||||
<string name="launcherNotFound">Impossibile identificare un\'attività di avvio di questa app. Dovrai sceglierne uno manualmente.</string>
|
||||
</resources>
|
||||
|
660
app/src/main/res/values-nl/strings.xml
Normal file
660
app/src/main/res/values-nl/strings.xml
Normal file
@ -0,0 +1,660 @@
|
||||
<resources>
|
||||
<string name="ruleActivate">Activering regel %1$s</string>
|
||||
<string name="profileActivate">Activeren profiel %1$s</string>
|
||||
<string name="ruleActivateToggle">Activeren regel %1$s in Togglemode</string>
|
||||
<string name="addPoi">Locatie toevoegen</string>
|
||||
<string name="addRule">Regel toevoegen</string>
|
||||
<string name="poiList">Lijst locaties:</string>
|
||||
<string name="ruleList">Lijst Regels:</string>
|
||||
<string name="pleaseEnterValidName">Voer a.u.b. een geldige naam in.</string>
|
||||
<string name="pleaseSpecifiyTrigger">Gelieve minstens één trigger op te geven.</string>
|
||||
<string name="pleaseSpecifiyAction">Gelieve minstens één actie te specificeren</string>
|
||||
<string name="serviceWontStart">Geen regels gedefinieerd. Dienst start niet.</string>
|
||||
<string name="serviceStarted">Automations Service gestart.</string>
|
||||
<string name="version">Versie %1$s.</string>
|
||||
<string name="distanceBetween">Afstand tussen GPS locatie en netwerklocatie is %1$d meter. Deze +1m moet de absolute minimum radius zijn.</string>
|
||||
<string name="positioningWindowNotice">Als u zich in een gebouw bevindt, wordt u sterk aangeraden om uw apparaat naast een raam te plaatsen totdat een positie is gevonden. Anders kan het erg lang duren als het al in staat is om er een te vinden.</string>
|
||||
<string name="gettingPosition">Positie aan het zoeken. Even geduld aub...</string>
|
||||
<string name="yes">Ja</string>
|
||||
<string name="no">Nee</string>
|
||||
<string name="pleaseEnterValidLatitude">Voer a.u.b. een geldige breedtegraad in.</string>
|
||||
<string name="pleaseEnterValidLongitude">Voer a.u.b. een geldige lengtegraad in.</string>
|
||||
<string name="pleaseEnterValidRadius">Voer a.u.b. een geldige positieve radius in.</string>
|
||||
<string name="selectOneDay">Selecteer ten minste één dag.</string>
|
||||
<string name="whatToDoWithRule">Wat wil je met de regel doen?</string>
|
||||
<string name="whatToDoWithPoi">Wat wil je met de locatie doen?</string>
|
||||
<string name="whatToDoWithProfile">Wat wil je met profiel doen?</string>
|
||||
<string name="delete">Verwijderen</string>
|
||||
<string name="deleteCapital">Verwijderen</string>
|
||||
<string name="serviceStopped">Automation: dienst gestopt.</string>
|
||||
<string name="logServiceStopping">Service stoppen.</string>
|
||||
<string name="stillGettingPosition">Nog steeds positie aan het verkrijgen.</string>
|
||||
<string name="lastRule">Laatste regel:</string>
|
||||
<string name="at">Bij</string>
|
||||
<string name="service">Service:</string>
|
||||
<string name="getCurrentPosition">Huidige locatie ophalen</string>
|
||||
<string name="savePoi">Sla locatie op</string>
|
||||
<string name="deletePoi">Locatie verwijderen</string>
|
||||
<string name="latitude">Latitude</string>
|
||||
<string name="longitude">Longitude</string>
|
||||
<string name="ruleName">Naam regel</string>
|
||||
<string name="triggers">Trigger(s)</string>
|
||||
<string name="triggersComment">EN-verbonden (alle triggers moeten tegelijk van toepassing zijn)</string>
|
||||
<string name="addTrigger">Trigger toevoegen</string>
|
||||
<string name="actions">Action(s)</string>
|
||||
<string name="actionsComment">(worden in die volgorde uitgevoerd)</string>
|
||||
<string name="addAction">Actie toevoegen</string>
|
||||
<string name="saveRule">Regel opslaan</string>
|
||||
<string name="monday">Maandag</string>
|
||||
<string name="tuesday">Dinsdag</string>
|
||||
<string name="wednesday">Woensdag</string>
|
||||
<string name="thursday">Donderdag</string>
|
||||
<string name="friday">Vrijdag</string>
|
||||
<string name="saturday">Saturday</string>
|
||||
<string name="sunday">Zondag</string>
|
||||
<string name="start">Start</string>
|
||||
<string name="end">Einde</string>
|
||||
<string name="save">Opslaan</string>
|
||||
<string name="urlToTrigger">URL om te activeren:</string>
|
||||
<string name="urlLegend">Variabelen:U kunt de volgende variabelen gebruiken. Bij het triggeren zullen ze worden vervangen door de corresponderende waarde op je apparaat. Zet de haakjes in uw tekst. \n[uniqueid] - Het unieke id van uw apparaat[serienummer] - Het serienummer van uw apparaat[latitude] - De breedtegraad van uw apparaat[longitude] - De lengtegraad van uw apparaat[phonenr] - Nummer van het laatste inkomende of uitgaande gesprek[d] - Dag van de maand, 2 cijfers met voorloopnullen[m] - Numerieke weergave van een maand, met voorloopnullen[Y] - een volledige numerieke weergave van een jaar, 4 cijfers[h] - 12-uurs indeling van een uur, met voorloopnullen[H] - 24-uurs indeling van een uur, met voorloopnullen[i] - minuten, met voorloopnullen[s] - seconden, met voorloopnullen[ms] - milliseconden[notificationTitle] - titel van de laatste melding[notificationText] - tekst van de laatste melding</string>
|
||||
<string name="wifi">wifi</string>
|
||||
<string name="activating">Activeren</string>
|
||||
<string name="deactivating">Deactiveren</string>
|
||||
<string name="bluetoothFailed">Niet gelukt om Bluetooth te activeren. Heeft dit apparaat Bluetooth?</string>
|
||||
<string name="urlTooShort">De url moet uit minstens 10 tekens bestaan.</string>
|
||||
<string name="selectTypeOfTrigger">Selecteer type trigger</string>
|
||||
<string name="entering">inkomend</string>
|
||||
<string name="leaving">uitgaand</string>
|
||||
<string name="noPoisSpecified">Je hebt nog geen locaties opgegeven. Doe dat eerst.</string>
|
||||
<string name="started">gestart</string>
|
||||
<string name="stopped">gestopt</string>
|
||||
<string name="connected">verbonden</string>
|
||||
<string name="disconnected">verbinding verbroken</string>
|
||||
<string name="selectPoi">Selecteer locatie</string>
|
||||
<string name="selectTypeOfAction">Selecteer type actie</string>
|
||||
<string name="selectSoundProfile">Selecteer geluidsprofiel</string>
|
||||
<string name="whatToDoWithTrigger">Wat te doen met trigger?</string>
|
||||
<string name="whatToDoWithAction">Wat te doen met actie?</string>
|
||||
<string name="radiusHasToBePositive">Straal moet een positief getal zijn.</string>
|
||||
<string name="poiStillReferenced">Er zijn nog steeds regels die verwijzen naar deze locatie (%1$s). Ik kan het nog niet verwijderen.</string>
|
||||
<string name="generalSettings">Algemene instellingen</string>
|
||||
<string name="startAtSystemBoot">Start bij opstarten systeem</string>
|
||||
<string name="onOff">Aan/Uit</string>
|
||||
<string name="writeLogFile">Logbestand schrijven</string>
|
||||
<string name="useTextToSpeechOnNormalSummary">Gebruik TextToSpeech op normaal</string>
|
||||
<string name="useTextToSpeechOnVibrateSummary">Gebruik TextToSpeech op trillen</string>
|
||||
<string name="useTextToSpeechOnSilentSummary">Gebruik TextToSpeech op stil</string>
|
||||
<string name="useTextToSpeechOnNormalTitle">TTS op normaal gebruiken</string>
|
||||
<string name="useTextToSpeechOnVibrateTitle">TTS op trillen</string>
|
||||
<string name="useTextToSpeechOnSilentTitle">TTS op stil</string>
|
||||
<string name="positioningSettings">Positie instellingen</string>
|
||||
<string name="listenToWifiState">Luisteren naar wifi-statuswijzigingen waar mogelijk</string>
|
||||
<string name="wifiState">Wifi-toestand</string>
|
||||
<string name="listenToAccelerometerState">Observeer bewegingssensor waar wifi niet beschikbaar is</string>
|
||||
<string name="accelerometer">Accelerometer</string>
|
||||
<string name="accelerometerTimer">Accelerometer gebruiken na x minuten zonder verandering van torenmast</string>
|
||||
<string name="cellMastIdleTime">Inactieve tijd zendmast</string>
|
||||
<string name="accelerometerThresholdDescription">Drempel voor accelerometerbewegingen</string>
|
||||
<string name="accelerometerThreshold">Accelerometerdrempel</string>
|
||||
<string name="positioningThresholds">Drempels voor positionering</string>
|
||||
<string name="minimumDistanceChangeForGpsLocationUpdates">Minimale afstandsverandering voor gps locatie-updates</string>
|
||||
<string name="distanceForGpsUpdate">Afstand voor gps update [m]</string>
|
||||
<string name="minimumDistanceChangeForNetworkLocationUpdates">Minimale afstandswijziging voor netwerklocatie-updates</string>
|
||||
<string name="distanceForNetworkUpdate">Afstand voor netwerkupdate [m]</string>
|
||||
<string name="satisfactoryAccuracyGps">Bevredigende nauwkeurigheid bij het verkrijgen van locatie via gps in meters</string>
|
||||
<string name="gpsAccuracy">GPS nauwkeurigheid [m]</string>
|
||||
<string name="satisfactoryAccuracyNetwork">Bevredigende nauwkeurigheid bij het verkrijgen van locatie via celtorens in meters</string>
|
||||
<string name="networkAccuracy">Netwerk nauwkeurigheid [m]</string>
|
||||
<string name="minimumTimeForLocationUpdates">Minimale tijdsverandering in milliseconden voor locatie-updates</string>
|
||||
<string name="timeForUpdate">Tijd voor update [milliseconden]</string>
|
||||
<string name="soundSettings">Geluidsinstellingen</string>
|
||||
<string name="showHelp">Toon help</string>
|
||||
<string name="rules">Regels</string>
|
||||
<string name="helpTextRules">Alle triggers in een regel zijn EN-verbonden (AND). De regel zal alleen worden toegepast als aan alle triggers is voldaan. Als je OR wilt, maak dan een andere regel.</string>
|
||||
<string name="timeframes">Tijdsbestek</string>
|
||||
<string name="helpTextTimeFrame">Als je een regel opgeeft met een tijdsbestek heb je twee keuzes. Je kunt kiezen tussen het binnengaan OF het verlaten van een tijdframe. In beide gevallen wordt een regel slechts eenmaal getriggerd. Dus als je een regel maakt met als trigger "ingaan tijdvak xyz" en je laat je geluidsprofiel veranderen in trillen dan betekent dat niet dat de telefoon automatisch gaat rinkelen als het tijdvak voorbij is. Als je dat wilt moet je een andere regel specificeren met een ander tijdsbestek.</string>
|
||||
<string name="helpTextSound">Op het hoofdscherm kunt u vergrendelingsgeluiden gebruiken om op regels gebaseerde geluidsveranderingen tijdelijk te vermijden. U kunt bijvoorbeeld in een situatie of plaats zijn waar ringtones normaal gesproken ok zijn, maar deze ene keer zou het storend zijn. De functie zal automatisch worden uitgeschakeld zodra de ingestelde tijd is verstreken. Klik op de + knop om de ingestelde tijd toe te voegen. Zodra het actief is kunt u het weer deactiveren met de toggle knop (en op die manier op regels gebaseerde geluidsveranderingen weer inschakelen).</string>
|
||||
<string name="toggableRules">Schakelbare regels</string>
|
||||
<string name="helpTextToggable">Regels hebben een vlag genaamd "Toggable". Dit betekent dat als een regel wordt uitgevoerd en daarna dezelfde triggers opnieuw van toepassing zijn, de regel zal worden uitgevoerd in een tegenovergestelde modus indien van toepassing. Momenteel gebeurt dit alleen in combinatie met NFC tags. Als je er twee keer op tikt en er is een toggable regel aan verbonden, zal het het tegenovergestelde doen van de huidige situatie, bv. wifi uitschakelen als het momenteel geactiveerd is.</string>
|
||||
<string name="helpTextProcessMonitoring">Als je een regel opgeeft met een procesmonitor, zal de applicatie elke x seconden controleren of er een proces is (je kunt dat in de instellingen wijzigen). Ik weet dat dit traag kan zijn, maar continu monitoren zou de batterij te snel leegmaken. En er is geen uitzending van het OS voor die gebeurtenis.</string>
|
||||
<string name="helpTitleEnergySaving">Energiebesparing</string>
|
||||
<string name="helpTextEnergySaving">Veel fabrikanten van Android-toestellen proberen energie te besparen door de achtergrondactiviteit van draaiende apps te beperken. Helaas leidt dat er vaak toe dat die apps niet goed werken, Automation is daar één van. Zie dit om uit te vinden hoe je Automation kunt uitsluiten van deze maatregelen.</string>
|
||||
<string name="speedMaximumTimeBetweenLocations">Maximale tijd tussen 2 locaties voor snelheidsbepaling.</string>
|
||||
<string name="speedMaximumTime">Tijd in minuten</string>
|
||||
<string name="exceeds">overschrijdt</string>
|
||||
<string name="dropsBelow">daalt onder</string>
|
||||
<string name="settingsCategoryNoiseLevelMeasurements">Geluidsniveau meting</string>
|
||||
<string name="timeBetweenNoiseLevelMeasurementsSummary">Seconden tussen metingen geluidsniveau</string>
|
||||
<string name="timeBetweenNoiseLevelMeasurementsTitle">Seconden tussen metingen geluidsniveau</string>
|
||||
<string name="lengthOfNoiseLevelMeasurementsSummary">Lengte in seconden voor elke meting van het geluidsniveau</string>
|
||||
<string name="lengthOfNoiseLevelMeasurementsTitle">Lengte van elke meting van het geluidsniveau</string>
|
||||
<string name="referenceValueForNoiseLevelMeasurementsSummary">Fysieke referentiewaarde voor geluidsniveaumeting</string>
|
||||
<string name="referenceValueForNoiseLevelMeasurementsTitle">Referentie voor geluidsmeting</string>
|
||||
<string name="logLevelSummary">Logboek niveau (1=minimum, 5=maximum)</string>
|
||||
<string name="logLevelTitle">Logboek niveau</string>
|
||||
<string name="ruleActive">Regel actief</string>
|
||||
<string name="triggerPointOfInterest">Locatie</string>
|
||||
<string name="triggerTimeFrame">Timeframe</string>
|
||||
<string name="triggerCharging">Batterij wordt opgeladen</string>
|
||||
<string name="triggerUsb_host_connection">USB-verbinding met een computer</string>
|
||||
<string name="triggerSpeed">Snelheid</string>
|
||||
<string name="triggerNoiseLevel">Achtergrond geluidsniveau</string>
|
||||
<string name="actionSetWifi">Wifi</string>
|
||||
<string name="actionSetBluetooth">Bluetooth</string>
|
||||
<string name="actionSetUsbTethering">USB Tethering</string>
|
||||
<string name="actionSetWifiTethering">Wifi Tethering</string>
|
||||
<string name="actionSetDisplayRotation">Beeldschermrotatie</string>
|
||||
<string name="actionTurnWifiOn">Wifi inschakelen</string>
|
||||
<string name="actionTurnWifiOff">Wifi uitzetten</string>
|
||||
<string name="actionTurnBluetoothOn">zet Bluetooth aan</string>
|
||||
<string name="actionTurnBluetoothOff">zet Bluetooth uit</string>
|
||||
<string name="actionTriggerUrl">Trigger een URL</string>
|
||||
<string name="actionChangeSoundProfile">Wijzig geluidsprofiel</string>
|
||||
<string name="actionTurnUsbTetheringOn">Schakel USB-tethering in</string>
|
||||
<string name="actionTurnUsbTetheringOff">USB-tethering uitschakelen</string>
|
||||
<string name="actionTurnWifiTetheringOn">zet Wifi Tethering aan</string>
|
||||
<string name="actionTurnWifiTetheringOff">zet Wifi Tethering uit</string>
|
||||
<string name="actionTurnAirplaneModeOn">zet vliegtuigmodus aan</string>
|
||||
<string name="actionTurnAirplaneModeOff">zet vliegtuigmodus uit</string>
|
||||
<string name="actionEnableScreenRotation">schermrotatie inschakelen</string>
|
||||
<string name="actionDisableScreenRotation">schermrotatie uitschakelen</string>
|
||||
<string name="screenRotationEnabled">Schermrotatie ingeschakeld</string>
|
||||
<string name="screenRotationDisabled">Schermrotatie uitgeschakeld.</string>
|
||||
<string name="screenRotationAlreadyEnabled">Schermrotatie was al ingeschakeld.</string>
|
||||
<string name="screenRotationAlreadyDisabled">Schermrotatie was al uitgeschakeld.</string>
|
||||
<string name="noPoisDefinedShort">Geen locaties gedefinieerd.</string>
|
||||
<string name="activePoi">Actieve locatie:</string>
|
||||
<string name="closestPoi">Dichtstbijzijnde locatie:</string>
|
||||
<string name="overview">Overzicht</string>
|
||||
<string name="poi">Locatie</string>
|
||||
<string name="pois">Locaties</string>
|
||||
<string name="helpTextPoi">Een locatie is opgebouwd uit GPS-coördinaten en een radius. Aangezien plaatsbepaling via zendmasten nogal onnauwkeurig is (maar snel en goedkoop) moet je de straal niet te klein opgeven. De applicatie zal u een minimale straal voorstellen wanneer u een nieuwe locatie aanmaakt.</string>
|
||||
<string name="serviceNotRunning">Service is niet actief.</string>
|
||||
<string name="general">General</string>
|
||||
<string name="generalText">Om dit programma te gebruiken moet je regels instellen. Die bevatten triggers, bijvoorbeeld als je een bepaald gebied bereikt of als je een bepaalde tijd binnengaat. Als dat gedaan is klik je op de aan/uit knop op het hoofdscherm.</string>
|
||||
<string name="failedToTriggerBluetooth">Mislukt om Bluetooth te activeren. Heeft dit apparaat Bluetooth?</string>
|
||||
<string name="startServiceAfterAppUpdate">Start service automatisch na app update als deze al eerder heeft gedraaid.</string>
|
||||
<string name="startServiceAfterAppUpdateShort">Start service na update</string>
|
||||
<string name="wifiConnection">Wifi-verbinding</string>
|
||||
<string name="wifiName">Wifi-naam</string>
|
||||
<string name="enterWifiName">Voer een wifi-naam in. Laat leeg voor elke wifi.</string>
|
||||
<string name="cancel">Annuleren</string>
|
||||
<string name="starting">bezig met starten</string>
|
||||
<string name="stopping">bezig met stoppen</string>
|
||||
<string name="connecting">aan het verbinden</string>
|
||||
<string name="disconnecting">verbinding aan het verbreken</string>
|
||||
<string name="exceeding">te hoog</string>
|
||||
<string name="droppingBelow">lager dan</string>
|
||||
<string name="connectedToWifi">verbonden met wifi %1$s</string>
|
||||
<string name="disconnectedFromWifi">losgekoppeld van wifi "%1$s"</string>
|
||||
<string name="anyWifi">enige wifi</string>
|
||||
<string name="cantStopIt">Kan het niet stoppen.</string>
|
||||
<string name="settingsCategoryHttp">HTTP(s) Verzoeken</string>
|
||||
<string name="httpAcceptAllCertificatesTitle">Accepteer alle certificaten</string>
|
||||
<string name="httpAcceptAllCertificatesSummary">Geldigheidscontrole van SSL certificaten overslaan (aanbevolen om dit niet te activeren)</string>
|
||||
<string name="httpAttemptsSummary">Aantal pogingen indien HTTP-verzoeken om connectiviteitsredenen mislukken</string>
|
||||
<string name="httpAttemptsTitle">Aantal HTTP-pogingen</string>
|
||||
<string name="httpAttemptsTimeoutSummary">Time-out voor HTTP-verzoeken [seconden]</string>
|
||||
<string name="httpAttemptsTimeoutTitle">Timeout [sec]</string>
|
||||
<string name="httpAttemptGapSummary">Pauze voor een volgende poging [seconden]</string>
|
||||
<string name="httpAttemptGapTitle">Pauze [sec]</string>
|
||||
<string name="runManually">Handmatig uitvoeren</string>
|
||||
<string name="serviceHasToRunForThat">De service moet daarvoor actief zijn.</string>
|
||||
<string name="gpsComparison">GPS-vergelijking</string>
|
||||
<string name="timeoutForGpsComparisonsTitle">GPS timeout [sec]</string>
|
||||
<string name="timeoutForGpsComparisonsSummary">Maximale tijd in seconden om te proberen een GPS-locatie te krijgen voor vergelijking. Indien meer dan laatst bekende locatie zal worden toegepast.</string>
|
||||
<string name="rememberLastActivePoiSummary">Als u op een locatie bent, uw apparaat of de applicatie opnieuw opstart en de locatie verlaat, zal de applicatie bij de volgende start regels uitvoeren die zijn gekoppeld aan het verlaten van de locatie.</string>
|
||||
<string name="rememberLastActivePoiTitle">Onthoud laatste actieve locatie</string>
|
||||
<string name="muteTextToSpeechDuringCallsTitle">Dempen tijdens oproepen</string>
|
||||
<string name="muteTextToSpeechDuringCallsSummary">Mute TextToSpeech tijdens gesprekken</string>
|
||||
<string name="anotherPoiByThatName">Er is al een andere locatie met die naam.</string>
|
||||
<string name="anotherRuleByThatName">Er is al een andere regel met die naam.</string>
|
||||
<string name="startOtherActivity">Start een ander programma</string>
|
||||
<string name="selectApplication">Selecteer app</string>
|
||||
<string name="selectPackageOfApplication">Selecteer pakket van toepassing</string>
|
||||
<string name="selectActivityToBeStarted">Selecteer activiteit van gekozen pakket</string>
|
||||
<string name="errorStartingOtherActivity">Fout bij starten andere activiteit</string>
|
||||
<string name="anotherAppIsRunning">Een andere app is gestart/gestopt</string>
|
||||
<string name="settingsCategoryProcessMonitoring">Process monitoring</string>
|
||||
<string name="timeBetweenProcessMonitoringsTitle">Seconden tussen procesbewakingen</string>
|
||||
<string name="timeBetweenProcessMonitoringsSummary">Hoe lager, hoe hoger het batterijverbruik</string>
|
||||
<string name="processes">Processes</string>
|
||||
<string name="processMonitoring">Process monitoring</string>
|
||||
<string name="settings">Settings</string>
|
||||
<string name="settingsErased">Instellingen gewist.</string>
|
||||
<string name="settingsSetToDefault">Instellingen op standaard gezet.</string>
|
||||
<string name="batteryLevel">Batterijniveau</string>
|
||||
<string name="selectSpeed">Selecteer snelheid</string>
|
||||
<string name="selectBattery">Selecteer batterijniveau</string>
|
||||
<string name="privacy">Privacybeleid</string>
|
||||
<string name="privacyConfirmationText">Een browser wordt nu geopend op uw apparaat en laadt het privacybeleid van de website van de ontwikkelaar.</string>
|
||||
<string name="waitBeforeNextAction">Wachten voor volgende actie</string>
|
||||
<string name="wakeupDevice">Apparaat wekken</string>
|
||||
<string name="waitBeforeNextActionEnterValue">Voer een waarde in milliseconden in hoe lang er gewacht moet worden voor de volgende actie.</string>
|
||||
<string name="wakeupDeviceValue">Voer een waarde in milliseconden in hoe lang het apparaat tenminste wakker moet blijven. 0 voor standaardwaarden.</string>
|
||||
<string name="enterAPositiveValidNonDecimalNumber">Voer een positief geldig niet-decimaal getal in.</string>
|
||||
<string name="moveUp">Ga omhoog</string>
|
||||
<string name="moveDown">Ga naar beneden</string>
|
||||
<string name="cantMoveUp">Kan item niet naar boven verplaatsen. Het staat al bovenaan.</string>
|
||||
<string name="cantMoveDown">Kan item niet naar beneden verplaatsen. Het staat al onderaan.</string>
|
||||
<string name="airplaneMode">Vliegtuigmodus</string>
|
||||
<string name="activate">Activate</string>
|
||||
<string name="deactivate">Deactivate</string>
|
||||
<string name="airplaneModeSdk17Warning">Beginnend vanaf Android versie 4.2 werkt deze functie alleen als uw toestel is geroot.</string>
|
||||
<string name="addIntentValue">Intentiepaar toevoegen</string>
|
||||
<string name="parameterName">Parameter naam</string>
|
||||
<string name="parameterValue">Parameter waarde</string>
|
||||
<string name="parameterType">Parameter type</string>
|
||||
<string name="selectTypeOfIntentPair">Selecteer een type voor het intentiepaar.</string>
|
||||
<string name="enterNameForIntentPair">Voer een naam in voor het intentiepaar.</string>
|
||||
<string name="enterValueForIntentPair">Voer een waarde in voor het intentiepaar.</string>
|
||||
<string name="whatToDoWithIntentPair">Wat te doen met paar?</string>
|
||||
<string name="gettingListOfInstalledApplications">Lijst van geïnstalleerde applicaties ophalen...</string>
|
||||
<string name="timeFrameWhichDays">Op welke dagen?</string>
|
||||
<string name="insideOrOutsideTimeFrames">Binnen of buiten die tijdsbestekken?</string>
|
||||
<string name="selectToggleDirection">Aan- of uitzetten?</string>
|
||||
<string name="name">Naam</string>
|
||||
<string name="radiusWithUnit">Straal [m]</string>
|
||||
<string name="status">Status</string>
|
||||
<string name="actionDataConnection">Gegevensverbinding</string>
|
||||
<string name="actionSetDataConnectionOn">Mobiele data aanzetten</string>
|
||||
<string name="actionSetDataConnectionOff">mobiele data uitzetten</string>
|
||||
<string name="roaming">Roaming</string>
|
||||
<string name="activated">ingeschakeld</string>
|
||||
<string name="deactivated">uitgeschakeld</string>
|
||||
<string name="until">tot</string>
|
||||
<string name="application">Application</string>
|
||||
<string name="is">is</string>
|
||||
<string name="phoneCall">Telefoongesprek</string>
|
||||
<string name="with">met</string>
|
||||
<string name="phoneNumber">Telefoonnummer</string>
|
||||
<string name="enterPhoneNumber">Voer telefoonnummer in. Laat leeg voor een willekeurig nummer.</string>
|
||||
<string name="phoneDirection">Selecteer gespreksrichting</string>
|
||||
<string name="any">een willekeurig</string>
|
||||
<string name="incoming">binnenkomend</string>
|
||||
<string name="outgoing">uitgaand</string>
|
||||
<string name="incomingAdjective">binnenkomend</string>
|
||||
<string name="outgoingAdjective">uitgaand</string>
|
||||
<string name="anyNumber">elk nummer</string>
|
||||
<string name="number">nummer</string>
|
||||
<string name="nfcTag">NFC tag</string>
|
||||
<string name="closeTo">dicht bij</string>
|
||||
<string name="withLabel">met label</string>
|
||||
<string name="deviceDoesNotHaveNfc">Het lijkt erop dat dit apparaat geen NFC heeft.</string>
|
||||
<string name="nfcReadTag">Lees ID van tag</string>
|
||||
<string name="nfcWriteTag">Tag schrijven</string>
|
||||
<string name="nfcEnterValidIdentifier">Voer een geldige identificatiecode in voor de tag (zoals "Huisdeur").</string>
|
||||
<string name="nfcTagWrittenSuccessfully">Tag succesvol geschreven.</string>
|
||||
<string name="nfcTagWriteError">Fout bij schrijven tag. Is het binnen bereik?</string>
|
||||
<string name="nfcTagDiscovered">Tag ontdekt.</string>
|
||||
<string name="nfcBringTagIntoRange">Breng een NFC tag binnen bereik.</string>
|
||||
<string name="nfcTagFoundWithText">Tag gevonden met tekst:</string>
|
||||
<string name="nfcUnsupportedEncoding">Niet ondersteunde codering:</string>
|
||||
<string name="nfcNoNdefIntentBut">Geen NFC NDEF bedoeling, maar</string>
|
||||
<string name="nfcNotSupportedInThisAndroidVersionYet">NFC nog niet ondersteund in deze Android versie.</string>
|
||||
<string name="cantRunRule">Kan regels niet uitvoeren.</string>
|
||||
<string name="nfcApplyTagToRule">Pas Tag toe op regel</string>
|
||||
<string name="nfcTagReadSuccessfully">Tag succesvol gelezen.</string>
|
||||
<string name="nfcValueNotSuitable">Opgeslagen waarde niet geschikt.</string>
|
||||
<string name="nfcNoTag">Geen tag aanwezig.</string>
|
||||
<string name="newNfcId">Schrijf nieuwe NFC ID</string>
|
||||
<string name="useExistingTag">Gebruik bestaande NFC-tag</string>
|
||||
<string name="newId">Nieuwe ID:</string>
|
||||
<string name="currentId">Huidige ID:</string>
|
||||
<string name="nfcTagDataNotUsable">Tag gegevens niet bruikbaar, opnieuw schrijven.</string>
|
||||
<string name="nfcBringTagIntoRangeToRead">Breng een tag binnen bereik om te lezen.</string>
|
||||
<string name="toggleRule">Verwissel regel</string>
|
||||
<string name="toggling">Toggling</string>
|
||||
<string name="toggle">Toggle</string>
|
||||
<string name="overlapBetweenPois">Overlap gedetecteerd tot locatie %1$s van %2$s meter. Verminder de straal met ten minste dat.</string>
|
||||
<string name="none">geen</string>
|
||||
<string name="anyLocation">elke locatie</string>
|
||||
<string name="invalidPoiName">Ongeldige naam voor locatie.</string>
|
||||
<string name="eraseSettings">Instellingen wissen</string>
|
||||
<string name="defaultSettings">Standaardinstellingen</string>
|
||||
<string name="areYouSure">Weet je het zeker?</string>
|
||||
<string name="activityDetection">Activity detection</string>
|
||||
<string name="android.permission.ACTIVITY_RECOGNITION">Activity detection</string>
|
||||
<string name="detectedActivity">Detected activity:</string>
|
||||
<string name="detectedActivityInVehicle">In voertuig (auto/bus)</string>
|
||||
<string name="detectedActivityOnBicycle">Op fiets</string>
|
||||
<string name="detectedActivityOnFoot">Te voet</string>
|
||||
<string name="detectedActivityStill">Nog steeds</string>
|
||||
<string name="detectedActivityUnknown">Onbekend</string>
|
||||
<string name="detectedActivityTilting">Kantelend</string>
|
||||
<string name="detectedActivityWalking">Lopend</string>
|
||||
<string name="detectedActivityRunning">Rennend</string>
|
||||
<string name="detectedActivityInvalidStatus">Ongeldige activiteit</string>
|
||||
<string name="selectTypeOfActivity">Selecteer type activiteit</string>
|
||||
<string name="triggerOnlyAvailableIfPlayServicesInstalled">Deze trigger is alleen beschikbaar als Google Play Services is geïnstalleerd.</string>
|
||||
<string name="activityDetectionFrequencyTitle">Activiteitsdetectiefrequentie [sec]</string>
|
||||
<string name="activityDetectionFrequencySummary">Seconden tussen pogingen om activiteit te detecteren.</string>
|
||||
<string name="activityDetectionRequiredProbabilityTitle">Waarschijnlijkheid activiteitdetectie.</string>
|
||||
<string name="activityDetectionRequiredProbabilitySummary">Zekerheid vanaf wanneer activiteiten als feit worden geaccepteerd.</string>
|
||||
<string name="incomingCallFrom">Inkomend telefoongesprek van %1$s.</string>
|
||||
<string name="outgoingCallTo">Uitgaand telefoongesprek naar %1$s.</string>
|
||||
<string name="actionSpeakText">Spreek tekst in</string>
|
||||
<string name="textToSpeak">Tekst uitspreken</string>
|
||||
<string name="toggleNotAllowed">Schakelen is momenteel alleen toegestaan voor regels die NFC-tags als trigger hebben. Zie help voor meer informatie.</string>
|
||||
<string name="errorReadingPoisAndRulesFromFile">Fout bij het lezen van locaties en regels uit bestand.</string>
|
||||
<string name="noDataChangedReadingAnyway">Het lijkt erop dat er geen gegevenswijziging is opgeslagen. Er kunnen echter wijzigingen in het geheugen zijn geweest die moeten worden teruggedraaid. Herlezen van bestand.</string>
|
||||
<string name="bluetoothConnection">Bluetooth connection</string>
|
||||
<string name="bluetoothConnectionTo">Bluetooth-verbinding met %1$s</string>
|
||||
<string name="bluetoothDisconnectFrom">Bluetooth-verbinding met %1$s verbroken</string>
|
||||
<string name="bluetoothDeviceInRange">Bluetooth-apparaat %1$s binnen bereik.</string>
|
||||
<string name="bluetoothDeviceOutOfRange">Bluetooth-apparaat %1$s buiten bereik.</string>
|
||||
<string name="anyDevice">elk apparaat</string>
|
||||
<string name="noDevice">geen apparaat</string>
|
||||
<string name="selectDeviceFromList">één uit lijst</string>
|
||||
<string name="connectionToDevice">verbinding met apparaat</string>
|
||||
<string name="disconnectionFromDevice">verbinding met apparaat verbroken</string>
|
||||
<string name="deviceInRange">apparaat in bereik</string>
|
||||
<string name="deviceOutOfRange">apparaat buiten bereik</string>
|
||||
<string name="selectDeviceOption">Selecteer een apparaatoptie.</string>
|
||||
<string name="selectConnectionOption">Selecteer een verbindingsoptie.</string>
|
||||
<string name="triggerHeadsetPlugged">Headset connection</string>
|
||||
<string name="actionPlayMusic">Muziekspeler openen</string>
|
||||
<string name="headsetConnected">Headset (type: %1$s) aangesloten</string>
|
||||
<string name="headsetDisconnected">Headset (type: %1$s) ontkoppeld</string>
|
||||
<string name="headphoneSimple">Headphone</string>
|
||||
<string name="headphoneMicrophone">Microphone</string>
|
||||
<string name="headphoneAny">willekeurige</string>
|
||||
<string name="headphoneSelectType">Selecteer type hoofdtelefoon</string>
|
||||
<string name="whatsThis">Wat is dit?</string>
|
||||
<string name="privacyLocationingTitle">Alleen privé lokalisatie</string>
|
||||
<string name="privacyLocationingSummary">Vermijd locatiemethoden die uw locatie naar een provider kunnen sturen, bijv. Google. Dit zal alleen GPS gebruiken en kan daarom traag zijn of niet betrouwbaar werken.</string>
|
||||
<string name="noiseDetectionHint">Als u denkt dat de ruisdetectie niet goed werkt (afhankelijk van de waarde die u opgeeft), houd er dan rekening mee dat elke telefoon anders is. U kunt daarom "Referentie voor ruismeting" in de instellingen wijzigen. Zie http://en.wikipedia.org/wiki/Decibel voor meer informatie. U kunt de volumetester in het hoofdscherm gebruiken om uw toestel te kalibreren.</string>
|
||||
<string name="hint">Hint</string>
|
||||
<string name="selectNoiseLevel">Selecteer geluidsniveau</string>
|
||||
<string name="showOnMap">Toon op kaart</string>
|
||||
<string name="noMapsApplicationFound">Geen kaarttoepassing gevonden op uw apparaat.</string>
|
||||
<string name="locationEngineNotActive">Locatiemotor niet actief.</string>
|
||||
<string name="addProfile">Profiel toevoegen</string>
|
||||
<string name="profile">Profile</string>
|
||||
<string name="soundMode">Geluidsmodus</string>
|
||||
<string name="volumes">Volumes</string>
|
||||
<string name="incomingCallsRingtone">Toon voor inkomende gesprekken</string>
|
||||
<string name="notificationRingtone">Toon voor meldingen</string>
|
||||
<string name="hapticFeedback">Haptische feedback (trillen bij aanraken scherm)</string>
|
||||
<string name="volumeMusicVideoGameMedia">Muziek, video, spel en andere media</string>
|
||||
<string name="volumeRingtoneNotifications">Ringtone en meldingen</string>
|
||||
<string name="volumeAlarms">Alarmen</string>
|
||||
<string name="change">Wijzigen</string>
|
||||
<string name="audibleSelection">Hoorbare selectie (geluid bij schermselectie)</string>
|
||||
<string name="screenLockUnlockSound">Geluid bij schermvergrendeling/ontgrendeling</string>
|
||||
<string name="vibrateWhenRinging">Trillen bij overgaan</string>
|
||||
<string name="profiles">Profiles</string>
|
||||
<string name="soundModeNormal">Normaal</string>
|
||||
<string name="soundModeVibrate">Trillen</string>
|
||||
<string name="soundModeSilent">Stil</string>
|
||||
<string name="enterAname">Voer een naam in.</string>
|
||||
<string name="noChangeSelectedProfileDoesntMakeSense">Geen wijziging geselecteerd. Profiel heeft geen zin.</string>
|
||||
<string name="noProfilesCreateOneFirst">Er zijn geen profielen in uw configuratie. Maak er eerst een aan.</string>
|
||||
<string name="errorActivatingProfile">Fout bij activeren profiel:</string>
|
||||
<string name="anotherProfileByThatName">Er is al een ander profiel met die naam.</string>
|
||||
<string name="invalidProfileName">Ongeldige naam voor profiel.</string>
|
||||
<string name="errorWritingFile">Fout bij schrijven instellingenbestand.</string>
|
||||
<string name="unknownError">Onbekende fout.</string>
|
||||
<string name="noWritableFolderFound">Geen beschrijfbare map gevonden om configuratiebestand op te slaan.</string>
|
||||
<string name="usbTetheringFailForAboveGingerbread">Dit zal waarschijnlijk niet werken omdat je boven Android 2.3 zit. Je zou in plaats daarvan wifi tethering kunnen gebruiken.</string>
|
||||
<string name="usingNewThreadForRuleExecution">Nieuw process gebruiken voor activatie regel.</string>
|
||||
<string name="startNewThreadForRuleExecution">Start nieuw process voor activatie regel.</string>
|
||||
<string name="newThreadRules">Nieuw process</string>
|
||||
<string name="showIcon">Pictogram tonen</string>
|
||||
<string name="showIconWhenServiceIsRunning">Pictogram tonen als de service draait (verbergen werkt alleen onder Android 7)</string>
|
||||
<string name="ruleHistory">Regelgeschiedenis (meest recente eerst):</string>
|
||||
<string name="someOptionsNotAvailableYet">Sommige opties zijn uitgeschakeld omdat ze nog niet gebruikt kunnen worden. Ze zullen in een latere programmaversie worden geïntroduceerd.</string>
|
||||
<string name="lockSoundChanges">Geluidswijzigingen vergrendelen</string>
|
||||
<string name="noProfileChangeSoundLocked">Profiel zal niet worden geactiveerd. Laatst geactiveerde profiel is vergrendeld.</string>
|
||||
<string name="currentVolume">Huidig volume</string>
|
||||
<string name="enterValidReferenceValue">Voer een geldige referentiewaarde in.</string>
|
||||
<string name="volumeTest">Volume test</string>
|
||||
<string name="volumeCalibrationExplanation">Om een dB-waarde voor geluidsbewaking te berekenen, moet je een zogenaamde fysische referentiewaarde opgeven. Lees Wikipedia voor meer informatie. Deze waarde is waarschijnlijk voor elke telefoon anders. Sleep de zoekbalk om de gedefinieerde fysieke referentiewaarde te wijzigen. Hoe hoger de referentiewaarde, hoe lager de dB-waarde zal zijn. Constante metingen zullen worden uitgevoerd om de %1$s seconden en de resultaten zullen hieronder worden weergegeven. Druk op terug wanneer u een geschikte waarde hebt gevonden.</string>
|
||||
<string name="settingsWillTakeTime">Sommige instellingen zullen niet worden toegepast voordat bepaalde omgevingsinstellingen worden gewijzigd of de service opnieuw wordt opgestart.</string>
|
||||
<string name="rootExplanation">U moet uw telefoon rooten om deze functie te laten werken. Daarna moet je de regel handmatig uitvoeren om de superuser-toestemmingsvraag te laten verschijnen. Als de superuser popup verschijnt moet je de applicatie altijd toestemming geven om dat te doen. Anders kan de regel niet werken als de telefoon onbeheerd is.</string>
|
||||
<string name="errorWritingConfig">Fout bij het schrijven van de config. Heeft u een beschrijfbaar geheugen?</string>
|
||||
<string name="phoneNrReplacementError">Ik kon het laatste telefoonnummer niet in de variabele plaatsen. Ik heb het niet.</string>
|
||||
<string name="username">Username</string>
|
||||
<string name="password">Password</string>
|
||||
<string name="useAuthentication">Gebruik authenticatie</string>
|
||||
<string name="permissionsTitle">Vereiste permissies</string>
|
||||
<string name="permissionsExplanation">Verklaring van vereiste permissies</string>
|
||||
<string name="ok">Ok</string>
|
||||
<string name="disabledFeatures">Uitgeschakelde functies</string>
|
||||
<string name="theFollowingPermissionsHaveBeenDenied">De volgende permissies zijn geweigerd:</string>
|
||||
<string name="permissionsExplanationGeneric">De app draait momenteel in beperkte modus en heeft sommige functies gedeactiveerd. Om volledig te functioneren heeft het rechten nodig. Als je alle functionaliteit wilt gebruiken moet je de permissies toekennen in de volgende rechten dialogen. Als je dat niet doet, kunnen bepaalde regels niet worden uitgevoerd. In het volgende venster krijgt u uitleg over de gevraagde rechten. Klik op "doorgaan", als u klaar bent om verder te gaan.</string>
|
||||
<string name="permissionsExplanationSmall">Om de functie die u zojuist probeerde te gebruiken in te schakelen, zijn meer machtigingen nodig. Klik op doorgaan om ze aan te vragen.</string>
|
||||
<string name="continueText">continue</string>
|
||||
<string name="rule">Regel</string>
|
||||
<string name="storeSettings">Instellingen lezen en opslaan</string>
|
||||
<string name="featuresDisabled">WAARSCHUWING: Functies zijn uitgeschakeld, Automation draait in beperkte modus. Klik hier voor meer informatie.</string>
|
||||
<string name="ruleLegend">Groen = ingeschakeld, rood = uitgeschakeld, geel = niet genoeg rechten</string>
|
||||
<string name="systemSettingsNote1">De toestemming om sommige OS instellingen te wijzigen is vereist (zelfs eenvoudige dingen zoals bluetooth of wifi aanzetten). Nadat je op "continue" hebt geklikt zal er een venster verschijnen waar je dit moet inschakelen voor Automation. Druk daarna op de "back" toets.</string>
|
||||
<string name="systemSettingsNote2">Verdere permissies zullen worden gevraagd in een tweede dialoogvenster daarna.</string>
|
||||
<string name="appRequiresPermissiontoAccessExternalStorage">Automation heeft toegang nodig tot externe opslag om zijn instellingen en regels te kunnen lezen.</string>
|
||||
<string name="mainScreenPermissionNote">Automation vereist meer permissies om volledig te kunnen functioneren. Klik op deze tekst om meer te weten te komen en ze aan te vragen.</string>
|
||||
<string name="invalidDevice">Ongeldig apparaat</string>
|
||||
<string name="logFileMaxSizeSummary">Maximale grootte logbestand in Megabyte. Zal geroteerd worden indien groter.</string>
|
||||
<string name="logFileMaxSizeTitle">Maximale grootte logbestand [Mb]</string>
|
||||
<string name="android.permission.READ_CALL_LOG">Telefoon log lezen</string>
|
||||
<string name="android.permission.READ_CALENDAR">Lees agenda-items</string>
|
||||
<string name="android.permission.ACCESS_FINE_LOCATION">Exacte locatie lezen</string>
|
||||
<string name="android.permission.ACCESS_COARSE_LOCATION">Lees grove locatie</string>
|
||||
<string name="readLocation">Lees locatie</string>
|
||||
<string name="android.permission.INTERNET">Verzend gegevens via een netwerkverbinding</string>
|
||||
<string name="android.permission.ACCESS_NETWORK_STATE">Netwerkstatus van apparaat lezen</string>
|
||||
<string name="android.permission.ACCESS_WIFI_STATE">Lees de wifi status van apparaat</string>
|
||||
<string name="android.permission.BLUETOOTH">Bluetooth instellingen wijzigen</string>
|
||||
<string name="android.permission.BLUETOOTH_ADMIN">Bluetooth-instellingen wijzigen</string>
|
||||
<string name="android.permission.NFC">Gebruik NFC-module</string>
|
||||
<string name="android.permission.VIBRATE">Laat telefoon trillen</string>
|
||||
<string name="android.permission.WAKE_LOCK">Telefoon aan laten staan</string>
|
||||
<string name="android.permission.MODIFY_AUDIO_SETTINGS">Audio-instellingen wijzigen</string>
|
||||
<string name="android.permission.RECORD_AUDIO">Audio opnemen</string>
|
||||
<string name="android.permission.PROCESS_OUTGOING_CALLS">Detecteer uitgaande gesprekken</string>
|
||||
<string name="android.permission.MODIFY_PHONE_STATE">Apparaatinstellingen wijzigen</string>
|
||||
<string name="android.permission.READ_PHONE_STATE">Detecteer telefoontoestand</string>
|
||||
<string name="android.permission.READ_EXTERNAL_STORAGE">Opslag lezen</string>
|
||||
<string name="android.permission.WRITE_EXTERNAL_STORAGE">Opslagruimte schrijven</string>
|
||||
<string name="android.permission.GET_TASKS">Detecteer lopende processen</string>
|
||||
<string name="android.permission.WRITE_SETTINGS">Apparaatinstellingen wijzigen</string>
|
||||
<string name="android.permission.RECEIVE_BOOT_COMPLETED">Detecteer apparaat herstart</string>
|
||||
<string name="android.permission.WRITE_SECURE_SETTINGS">Apparaatinstellingen wijzigen</string>
|
||||
<string name="android.permission.BATTERY_STATS">Batterijstatus lezen</string>
|
||||
<string name="android.permission.CHANGE_BACKGROUND_DATA_SETTING">Wijzig dataverbinding</string>
|
||||
<string name="android.permission.SEND_SMS">Tekstberichten verzenden</string>
|
||||
<string name="android.permission.READ_CONTACTS">Lees contactgegevens</string>
|
||||
<string name="android.permission.ACCESS_NOTIFICATION_POLICY">Niet storen beleid opheffen</string>
|
||||
<string name="theseAreThePermissionsRequired">Dit zijn de vereiste machtigingen:</string>
|
||||
<string name="ruleXrequiresThis">Regel %1$s vereist dit.</string>
|
||||
<string name="helpTextActivityDetection">Deze functie kan detecteren of je op dit moment onderweg bent en of dat te voet is of in welk type voertuig (tot op zekere hoogte). De functie is niet volledig ingebouwd in Automation, maar wordt geleverd door Google Play Services. Technisch gezien geeft het geen ja/nee resultaat, maar geeft een percentage terug tot welk niveau het zeker is dat het je status heeft gedetecteerd. U kunt de percentage waarde instellen vanaf welke Automation een resultaat zal accepteren. Twee opmerkingen: 1) Meer dan 1 status kan zich op hetzelfde moment voordoen. U kunt bijvoorbeeld WANDELEN in een rijdende bus. 2) Deze sensor is relatief duur in termen van batterijverbruik. Als het mogelijk is, zou je kunnen overwegen alternatieven te gebruiken, b.v. eisen dat het handsfree apparaat van je auto verbonden is om te detecteren dat je rijdt.</string>
|
||||
<string name="sendTextMessage">Tekstbericht verzenden</string>
|
||||
<string name="textToSend">Te verzenden tekst</string>
|
||||
<string name="textMessageAnnotations">U kunt direct een telefoonnummer invoeren. Of gebruik de contacten optie om er een te kiezen. Maar houd in gedachten: Het nummer zal hier worden opgeslagen, niet het contact. Als je het telefoonnummer van een geselecteerde contactpersoon wijzigt, moet je deze regel bijwerken. Het doet dat niet uit zichzelf.</string>
|
||||
<string name="importNumberFromContacts">Importeer nummer uit contacten</string>
|
||||
<string name="android9RecordAudioNotice">Als u de ruisniveaumeter gebruikt: Helaas heeft Google vanaf Android 9 (Pie) besloten om achtergrond applicaties niet meer toe te staan de microfoon te gebruiken. Dus deze trigger heeft geen effect meer en zal niets meer triggeren.</string>
|
||||
<string name="android10WifiToggleNotice">Helaas heeft Google besloten om deze functie te verwijderen in Android 10. Reguliere apps mogen wifi niet meer aan of uit zetten. Alleen als je toestel geworteld is zou het moeten blijven werken. Zo niet, dan vrees ik dat dit geen effect meer heeft.</string>
|
||||
<string name="messageNotShownAgain">Deze melding zal niet meer getoond worden.</string>
|
||||
<string name="chooseActivityHint">In deze laatste selectie popup moet je een specifieke activiteit selecteren. Vereenvoudigd is dit als een venster van de gewenste toepassing. Als je niet weet welke, is het meestal een goed idee om er een te kiezen met "main" of "launcher" in de naam.</string>
|
||||
<string name="edit">Bewerken</string>
|
||||
<string name="clickAndHoldForOptions">Klik en houd een item vast voor opties.</string>
|
||||
<string name="positioningEngine">Positioning engine</string>
|
||||
<string name="googleSarcasm">Dankzij de oneindige wijsheid van Google en het constante streven om ieders privacy te beschermen, zijn alle regels die gebruikt kunnen worden om sms\'jes te versturen of de telefoonstatus te lezen, ontdaan van alle triggers en acties die Google als riskant beschouwt.</string>
|
||||
<string name="startAutomationAsService">Start Automation als een service</string>
|
||||
<string name="setScreenBrightness">Schermhelderheid instellen</string>
|
||||
<string name="setScreenBrightnessEnterValue">Voer de gewenste helderheid in (van 0 tot 100).</string>
|
||||
<string name="autoBrightness">Automatische helderheid inschakelen</string>
|
||||
<string name="apply">Toepassen</string>
|
||||
<string name="brightnessAuto">automatische helderheid</string>
|
||||
<string name="brightnessManual">handmatige helderheid</string>
|
||||
<string name="autoBrightnessNotice">Als u automatische helderheid gebruikt, zal de helderheidswaarde die u hieronder gebruikt waarschijnlijk niet lang gebruikt worden.</string>
|
||||
<string name="screenLockSoundNotice">Schermvergrendelingsgeluiden kunnen niet meer automatisch worden gewijzigd op apparaten met Android versie 6.0 of hoger. Wat je hier ook instelt, het zal in beide richtingen niet werken.</string>
|
||||
<string name="startScreen">Startscherm</string>
|
||||
<string name="startScreenSummary">Selecteer het scherm waarmee de applicaties openen bij start.</string>
|
||||
<string name="executeRulesAndProfilesWithSingleClickTitle">Voer regels/profielen uit met één klik.</string>
|
||||
<string name="googleLocationChicanery">Deze app verzamelt locatiegegevens om locatiegebaseerde regels en snelheidsdetectie mogelijk te maken, zelfs als de app gesloten of niet in gebruik is.</string>
|
||||
<string name="googleLocationChicaneryOld">Deze app verzamelt locatiegegevens om te bepalen of u zich momenteel op een van de locaties bevindt die u hebt gemaakt. Verder wordt het gebruikt om uw huidige snelheid te bepalen als u die trigger in regels gebruikt. Dat gebeurt zelfs als de app gesloten of niet in gebruik is (maar alleen als de dienst geactiveerd is).</string>
|
||||
<string name="android.permission.ACCESS_BACKGROUND_LOCATION">Lees locatie op achtergrond.</string>
|
||||
<string name="deviceDoesNotHaveBluetooth">Dit apparaat lijkt geen bluetooth te hebben. U kunt nog steeds doorgaan met het configureren hiervan, maar het zal hoogstwaarschijnlijk geen effect hebben.</string>
|
||||
<string name="manageLocations">Locaties maken of bewerken</string>
|
||||
<string name="error">Fout</string>
|
||||
<string name="featureNotInFdroidVersion">Deze functie is gebaseerd op niet-vrije software. Daarom is is niet beschikbaar in de F-Droid versie.</string>
|
||||
<string name="settingsReferringToRestrictedFeatures">Uw instellingen en of regels verwijzen momenteel naar niet-vrije functies die niet kunnen worden geleverd in de F-Droid versie. Dat omvat het detecteren van uw huidige fysieke activiteit.</string>
|
||||
<string name="publishedOn">gepubliceerd op</string>
|
||||
<string name="displayNewsOnMainScreen">Toepassingsnieuws weergeven op hoofdscherm</string>
|
||||
<string name="displayNewsOnMainScreenDescription">Aankondigingen over deze app alleen, we hebben het waarschijnlijk over 1-2 per jaar, niet meer.</string>
|
||||
<string name="filesHaveBeenMovedTo">Automation gebruikt nu een ander pad om uw bestanden op te slaan. Al uw Automation-bestanden zijn hierheen verplaatst: "%s". De externe opslag permissie is niet meer nodig; u kunt het intrekken. Het zal worden verwijderd in een toekomstige versie.</string>
|
||||
<string name="locationDisabled">Location disabled</string>
|
||||
<string name="locationEngineDisabledShort">Locatie kan niet meer op de achtergrond worden bepaald. Klik hier om uit te vinden waarom.</string>
|
||||
<string name="locationEngineDisabledLong">Helaas kan uw locatie niet meer worden bepaald. Ik ben Google dank verschuldigd voor haar oneindige wijsheid en vriendelijkheid. Laat me dit verder uitleggen. Vanaf Android 10 werd een nieuwe toestemming geïntroduceerd die nodig is om uw locatie op de achtergrond te bepalen (wat natuurlijk nodig is voor een app als deze). Hoewel ik dat in het algemeen een goed idee vind, is het gezever en ellende die het met zich meebrengt voor ontwikkelaars dat niet. Als je een app ontwikkelt, kun je proberen in aanmerking te komen voor deze toestemming door je te houden aan een catalogus van vereisten. Helaas zijn nieuwe versies van mijn app over een periode van drie maanden afgewezen. Ik voldeed aan al die eisen, de schijtlollige ontwikkelingsondersteuning van Google beweerde van niet. Nadat ik ze bewijs had gegeven dat ik dat toch had gedaan - kreeg ik een antwoord in de trant van "Ik kan u niet meer helpen". Uiteindelijk gaf ik het op. Als gevolg daarvan kan de Google Play versie uw locatie NIET meer als trigger gebruiken. Mijn enige andere optie zou zijn geweest om deze applicatie helemaal uit de winkel te laten verwijderen.Het spijt me zeer, maar ik heb mijn best gedaan om ruzie te maken met een "support" die herhaaldelijk de Turing test niet heeft doorstaan.Het goede nieuws: U kunt het allemaal nog hebben! Automation is nu open source en kan worden gevonden in F-Droid. Dat is een app winkel die echt geeft om uw privacy - in plaats van alleen maar zo te doen. Maak gewoon een back-up van uw configuratiebestand, verwijder deze app, installeer hem opnieuw vanuit F-Droid, herstel uw configuratiebestand - klaar.Klik hier voor meer informatie:</string>
|
||||
<string name="filesStoredAt">Config en log bestanden worden opgeslagen in map %1$s. Klik op deze tekst om een bestandsverkenner te openen. Helaas zal dit alleen werken op een geroot apparaat. VOOR ALLE ANDERE APPARATEN: Gebruik gewoon de export knop om een backup te maken.</string>
|
||||
<string name="notification">Notification</string>
|
||||
<string name="title">Titel</string>
|
||||
<string name="text">Tekst</string>
|
||||
<string name="directionStringEquals">Gelijk aan</string>
|
||||
<string name="directionStringContains">bevat</string>
|
||||
<string name="directionStringStartsWith">begint met</string>
|
||||
<string name="directionStringEndsWith">eindigt met</string>
|
||||
<string name="directionStringNotEquals">is niet gelijk aan</string>
|
||||
<string name="anyApp">Elke app</string>
|
||||
<string name="notificationTriggerExplanation">Deze trigger zal reageren op andere applicaties die meldingen openen in het meldingsgebied (of die worden gesloten). Je kunt een andere applicatie specificeren waar de melding vandaan moet komen. Als je dat niet doet, tellen de meldingen van een andere toepassing mee. U kunt ook tekenreeksen opgeven die wel of niet in de titel of de body van de melding moeten voorkomen. De vergelijking gebeurt hoofdletter-IN-sensitief.</string>
|
||||
<string name="postsNotification">%1$s berichten notificatie</string>
|
||||
<string name="removedNotification">kennisgeving van %1$s verwijderd</string>
|
||||
<string name="notificationAppears">Kennisgeving verschijnt</string>
|
||||
<string name="notificationDisappears">Kennisgeving verdwijnt</string>
|
||||
<string name="direction">Direction</string>
|
||||
<string name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">Systeemmeldingen lezen</string>
|
||||
<string name="playSound">Geluid afspelen</string>
|
||||
<string name="alwaysPlay">Speel altijd af</string>
|
||||
<string name="alwaysPlayExplanation">Als deze instelling actief is zal het geluid altijd worden afgespeeld. Als het gedeactiveerd is zal het alleen spelen als je telefoon niet op mute of trillen staat. Maar als het actief is, heeft het geen effect op het volume. Dus als uw telefoon op ring mode staat zal het niet het media volume verhogen bijvoorbeeld. Dus als het media volume op mute staat zal je ook niets horen.</string>
|
||||
<string name="selectSoundFile">Selecteer geluidsbestand</string>
|
||||
<string name="fileDoesNotExist">Bestand bestaat niet.</string>
|
||||
<string name="noFileManageInstalled">Geen bestandsmanager geïnstalleerd.</string>
|
||||
<string name="shareConfigAndLogFilesWithDev">Deel config en log bestanden met ontwikkelaar (via email).</string>
|
||||
<string name="shareConfigAndLogExplanation">Dit zal een nieuwe email starten met uw configuratie en log bestanden als zip bestand bijgevoegd. Het zal niet automatisch verzonden worden, je moet nog steeds op "verzenden" drukken. U kunt ook de ontvanger veranderen in bijvoorbeeld uzelf.</string>
|
||||
<string name="startAppChoiceNote">Hier heeft u 2 algemene opties:. Je kunt een programma starten door een activiteit te selecteren. Stel je dit voor als het voorselecteren van een specifiek scherm/venster van een applicatie. Onthoud dat dit niet altijd zal werken. Dit komt omdat de vensters van een toepassing met elkaar kunnen interageren, bv. parameters doorgeven. Bij het botweg starten van een specifiek scherm heeft die interactie niet plaatsgevonden en kan het venster direct sluiten (waardoor het nooit echt getoond wordt). Probeer het desondanks! Je kunt een activiteitspad handmatig invoeren, maar het is aan te bevelen om de knop "Kiezen" te gebruiken. Als u besluit het pad handmatig in te voeren, voer dan in het bovenste veld de pakketnaam van de toepassing in en in het onderste veld het volledige pad van de activiteit.. Selectie door actie In tegenstelling tot het selecteren van een specifiek venster kunt u een programma ook door een actie starten. Dit is hetzelfde als roepen "Ik zou graag xyz willen" en als er een programma is geïnstalleerd dat u daarbij kan helpen, wordt het gestart. Een goed voorbeeld zou kunnen zijn start browser - je kunt er zelfs meerdere geïnstalleerd hebben (een is meestal de standaard). U moet dit handmatig invoeren, PackageName is hier optioneel. Houd in gedachten dat er geen variabelen zullen worden opgelost. Als je bijvoorbeeld de camera wilt starten met "MediaStore.ACTION_IMAGE_CAPTURE" zal dat niet werken. U moet een kijkje nemen in de Android documentatie en in plaats daarvan de werkelijke waarde van deze variabele gebruiken, die in dit voorbeeld zou zijn: "android.media.action.IMAGE_CAPTURE"</string>
|
||||
<string name="errorRunningRule">Er is een fout opgetreden bij het uitvoeren van een regel.</string>
|
||||
<string name="cantFindSoundFile">Kan geluidsbestand %1$s niet vinden en daarom niet afspelen.</string>
|
||||
<string name="addParameters">Parameters toevoegen</string>
|
||||
<string name="com.wireguard.android.permission.CONTROL_TUNNELS">Controle tunnels van de wireguard app</string>
|
||||
<string name="startAppSelectionType">Methode om toepassing te selecteren</string>
|
||||
<string name="startAppByActivity">op activiteit</string>
|
||||
<string name="startAppByAction">op actie</string>
|
||||
<string name="enterValidAction">Voer een geldige actie in</string>
|
||||
<string name="enterPackageName">Voer een geldige pakketnaam in.</string>
|
||||
<string name="state">Staat</string>
|
||||
<string name="phoneNumberExplanation">U kunt een specifiek telefoonnummer opgeven, maar dat hoeft niet. Als u er een wilt opgeven, kunt u er een uit uw adresboek kiezen of het handmatig invoeren. Daarnaast kun je reguliere expressies gebruiken. Om een reguliere expressie te testen is deze pagina behulpzaam:</string>
|
||||
<string name="importConfiguration">Import configuration</string>
|
||||
<string name="exportConfiguration">Export configuration</string>
|
||||
<string name="moreSettings">Meer instellingen</string>
|
||||
<string name="configurationExportedSuccessfully">Configuratie succesvol geëxporteerd.</string>
|
||||
<string name="ConfigurationExportError">Er is een fout opgetreden tijdens het exporteren van de configuratie.</string>
|
||||
<string name="rulesImportedSuccessfully">Regels en locaties zijn succesvol geïmporteerd.</string>
|
||||
<string name="rulesImportError">Er is een fout opgetreden bij het importeren van regels en locaties.</string>
|
||||
<string name="configurationImportedSuccessfully">Configuratie succesvol geïmporteerd.</string>
|
||||
<string name="prefsImportError">Er is een fout opgetreden bij het importeren van de voorkeuren.</string>
|
||||
<string name="noApplicableFilesFoundInDirectory">Er konden geen toepasbare bestanden gevonden worden in die directory.</string>
|
||||
<string name="noFilesImported">Er kon geen bestand geïmporteerd worden.</string>
|
||||
<string name="notAllFilesImported">Niet alle toepasbare bestanden konden geïmporteerd worden.</string>
|
||||
<string name="importExportExplanation">Wanneer u klikt op importeren of exporteren selecteert u de map van waaruit bestanden worden geïmporteerd of geëxporteerd. Bij het exporteren kunnen bestaande bestanden overschreven worden.</string>
|
||||
<string name="intentDataComment">Als je parameter van het type Uri is EN je specificeert "IntentData" als naam (kleine/hoofdletter is niet belangrijk), dan zal de parameter niet als een normale parameter worden toegevoegd met putExtra(), maar zal in plaats daarvan worden toegevoegd aan de intent met setData().</string>
|
||||
<string name="stringNotAllowed">String %1$s is niet toegestaan.</string>
|
||||
<string name="startAppStartType">Selecteer start type</string>
|
||||
<string name="startAppByStartActivity">by startActivity()</string>
|
||||
<string name="startAppBySendBroadcast">by sendBroadcast()</string>
|
||||
<string name="openExamplesPage">Open webpagina met voorbeelden</string>
|
||||
<string name="packageName">Naam pakket</string>
|
||||
<string name="activityOrActionName">Activity/action name</string>
|
||||
<string name="warning">Warning</string>
|
||||
<string name="ringing">ringing</string>
|
||||
<string name="from">van</string>
|
||||
<string name="to">naar</string>
|
||||
<string name="matching">matching</string>
|
||||
<string name="loadWifiList">Laad wifi lijst</string>
|
||||
<string name="needLocationPermForWifiList">De lijst met wifi\'s waarmee je apparaat verbonden is geweest, kan worden gebruikt om te bepalen op welke plaatsen je bent geweest. Daarom is de locatietoestemming nodig om de lijst met wifi\'s te laden. Als je er een uit de lijst wilt kunnen kiezen, moet je die toestemming geven. Als u dat niet wilt, kunt u nog steeds uw wifi-naam handmatig invoeren.</string>
|
||||
<string name="noKnownWifis">Er zijn geen bekende wifis op uw apparaat.</string>
|
||||
<string name="urlToTriggerExplanation">Deze functie opent GEEN browser, maar triggert een URL op de achtergrond. U kunt dit bijvoorbeeld gebruiken om commando\'s naar uw homeAutomation te sturen.</string>
|
||||
<string name="automaticUpdateCheck">Controleer op updates</string>
|
||||
<string name="automaticUpdateCheckSummary">Geldt alleen voor APK versie.</string>
|
||||
<string name="updateAvailable">Er is een nieuwe update beschikbaar. Wilt u de browser openen om deze te downloaden?</string>
|
||||
<string name="locationFound">Locatie gevonden. De voorgestelde minimum radius voor locaties is %1$d m.</string>
|
||||
<string name="locationFoundInaccurate">Alleen een locatie met een beperkte nauwkeurigheid kon worden gevonden. Het werkt misschien niet betrouwbaar. De voorgestelde minimale straal voor locaties is %1$d.</string>
|
||||
<string name="clone">kloon</string>
|
||||
<string name="noLocationCouldBeFound">Er kon geen positie worden gevonden na een time-out van %1$s seconden.</string>
|
||||
<string name="pleaseGiveBgLocation">Ga in het volgende scherm naar machtigingen, dan naar locatie. Selecteer daar "Sta alle tijden toe" om Automation toe te staan uw locatie op de achtergrond te bepalen.</string>
|
||||
<string name="vibrate">Tril</string>
|
||||
<string name="test">Test</string>
|
||||
<string name="VibrateExplanation">Voer een trilduur in, gevolgd door een komma, en vervolgens een pauze duur. U kunt zoveel trillingen aaneenkoppelen als u wilt. Scheid ze weer door komma\'s. Bijv. het patroon 100,500,500,1000,100 zal 100 trillen, 500 wachten, 500 trillen, 1000 wachten, 100 ms trillen. Als je denkt dat een trilling wegvalt, probeer dan de pauze ervoor te vergroten.</string>
|
||||
<string name="pleaseEnterValidVibrationPattern">Voer a.u.b. een geldig trilpatroon in.</string>
|
||||
<string name="newsOptIn">Wilt u (alleen belangrijk) nieuws over deze app op het hoofdscherm ontvangen? Deze worden gedownload van de website van de ontwikkelaar. Er komt geen opdringerige melding, alleen een tekst op het hoofdscherm als u de app opent.</string>
|
||||
<string name="top">boven</string>
|
||||
<string name="bottom">onder</string>
|
||||
<string name="tabsPlacement">Positie van tabbalk</string>
|
||||
<string name="tabsPlacementSummary">Kies waar de tabbladenbalk geplaatst moet worden.</string>
|
||||
<string name="wifiApi30">Omdat Google weer een ander deel van Android verpest heeft, kunnen vanaf API 30 alleen de op dat moment zichtbare Wifi netwerken worden weergegeven. Niet alle Wifi netwerken die uw apparaat kent.</string>
|
||||
<string name="smsDialogNotice">Als u niet eerder een verzend-sms actie in dit programma hebt gebruikt, kan Android een extra bevestigingsdialoog tonen, waarin u wordt gevraagd om het verzenden van berichten toe te staan. U moet het vakje "altijd toestaan" aanvinken en bevestigen als u wilt dat deze actie op de achtergrond werkt. Het wordt aangeraden om deze regel eenmaal handmatig uit te voeren.</string>
|
||||
<string name="silentTriggersDnd">OPMERKING: De stille modus triggert vaak Do-Not-Disturb op nieuwere apparaten. Als dat op jouw apparaat gebeurt, raad ik aan om in plaats daarvan de normale modus te gebruiken en alle volumes naar nul te verlagen.</string>
|
||||
<string name="tones">Tonen</string>
|
||||
<string name="miscellaneous">Varia</string>
|
||||
<string name="dnd">Niet-storen</string>
|
||||
<string name="dndOff">Niet-storen uit</string>
|
||||
<string name="dndPriority">Laat meldingen met prioriteit door</string>
|
||||
<string name="dndAlarms">Laat Alarmen door</string>
|
||||
<string name="dndNothing">Niets doorlaten</string>
|
||||
<string name="dndRemarks">Fijnafstelling (zoals telefoongesprekken toestaan, specifieke nummers kiezen, etc.) kan alleen via de instellingen van het systeem.</string>
|
||||
<string name="permissionsRequiredNotAvailable">Uw regels vereisten permissies die niet kunnen worden opgevraagd vanuit deze geïnstalleerde smaak van Automation.</string>
|
||||
<string name="automationNotificationsIgnored">Als u niet kiest voor een specifieke app, maar kiest voor "Elke app" zullen meldingen van Automation genegeerd worden om lussen te voorkomen.</string>
|
||||
<string name="repeatEveryXseconds">Herhaal elke x seconden</string>
|
||||
<string name="repeatEveryXsecondsWithVariable">Herhaal elke %1$s seconden</string>
|
||||
<string name="enterRepetitionTime">Je moet een positieve niet-decimale waarde invoeren voor de herhalingstijd.</string>
|
||||
<string name="elementSkipped">Een element van het configuratiebestand kon niet worden gelezen. Mogelijk is het bestand gemaakt in een nieuwere programmaversie.</string>
|
||||
<string name="donate">Doneren</string>
|
||||
<string name="unknown">onbekend</string>
|
||||
<string name="orientation">Oriëntatie</string>
|
||||
<string name="turnScreenOnOrOff">Scherm in- of uitschakelen</string>
|
||||
<string name="turnScreenOn">scherm inschakelen</string>
|
||||
<string name="turnScreenOff">scherm uitschakelen</string>
|
||||
<string name="mustApply">Moet van toepassing zijn</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalTitle">Signaalfrequentie</string>
|
||||
<string name="deviceOrientationSettings">Instellingen voor apparaatstand</string>
|
||||
<string name="android.permission.BIND_DEVICE_ADMIN">Apparaatbeheerder</string>
|
||||
<string name="deviceAdminNote">Apparaatbeheerdersmachtigingen vereist voor ten minste 1 regel die u hebt gemaakt.</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalSummary">Accepteer elke x milliseconden nieuwe bewegingssignalen</string>
|
||||
<string name="explanationDeviceOrientationDirection">Als het selectievakje is aangevinkt, betekent dit dat het apparaat zich in de door u opgegeven richting moet bevinden. Als het niet is gecontroleerd, is elke oriëntatie die NIET aan uw criteria voldoet voldoende.</string>
|
||||
<string name="triggerWrong">Er is iets mis met deze trigger. Het kan niet correct worden geladen.</string>
|
||||
<string name="orientationAzimuth">Azimut:</string>
|
||||
<string name="orientationPitch">Pitch:</string>
|
||||
<string name="orientationRoll">Rollen:</string>
|
||||
<string name="enterValidNumbersIntoAllFields">Voer geldige nummers in alle velden in.</string>
|
||||
<string name="deviceOrientation">Apparaat oriëntatie</string>
|
||||
<string name="notice">Bemerken</string>
|
||||
<string name="tolerance">Tolerantie (0-180)</string>
|
||||
<string name="actionSetBluetoothTethering">Bluetooth Tethering</string>
|
||||
<string name="enterPhoneNumberAndText">Voer een telefoonnummer en een sms in.</string>
|
||||
<string name="actionTurnBluetoothTetheringOn">Schakel Bluetooth Tethering in</string>
|
||||
<string name="actionTurnBluetoothTetheringOff">Schakel Bluetooth Tethering uit</string>
|
||||
<string name="deviceIsInCertainOrientation">het apparaat zich in een bepaalde richting bevindt</string>
|
||||
<string name="wouldCurrentlyApply">Zou momenteel van toepassing zijn?</string>
|
||||
<string name="btTetheringNotice">Deze functie werkt naar verluidt tot Android 8.0. Vanaf een hogere versie werkt het niet meer, maar door een gebrek aan fysieke apparaten kan ik niet zeggen welke dat is. Op Android 11 werkt het absoluut niet meer. Als je een versie tussendoor hebt, laat het me dan weten of het werkt of niet.</string>
|
||||
<string name="deviceOrientationExplanation">Wanneer u uw apparaat verplaatst, worden de onderstaande nummers bijgewerkt. Wat je daar kunt zien, is de huidige oriëntatie van je apparaat gemeten in graden. Als het zich in de gewenste richting bevindt, klikt u op de knop Toepassen om de huidige waarden naar de gewenste velden te kopiëren.\nOmdat het zeer onwaarschijnlijk is dat u deze exacte oriëntatie ooit nog bereikt, moet u ook een tolerantie invoeren. Dit is het aantal graden waarin de oriëntatie in beide richtingen kan afwijken. 15° resulteert in een totale hoek van 30°, 15° in elke richting.\nAls u slechts om één specifieke as geeft, geef dan een tolerantie van 180° op voor de twee andere.</string>
|
||||
<string name="toleranceOf180OnlyAllowedIn2Fields">Een tolerantie van 180 is alleen toegestaan voor 2 tolerantievelden, niet alle 3. Anders zou de trigger ALTIJD van toepassing zijn.</string>
|
||||
<string name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS">Uitsluiten van batterijoptimalisatie</string>
|
||||
<string name="recommendedForBetterReliability">Aanbevolen voor een betere betrouwbaarheid</string>
|
||||
<string name="needsToBeActive">Moet actief zijn</string>
|
||||
<string name="checkSettings">Instellingen controleren</string>
|
||||
<string name="profileActive">profile %1$s is actief</string>
|
||||
<string name="profileNotActive">profile %1$s is niet actief</string>
|
||||
<string name="profileTriggerCheckSettings">Als dit selectievakje niet is uitgeschakeld, wordt het alleen aangevinkt als het geselecteerde profiel het laatste is dat is geactiveerd. Het maakt niet uit of audiogerelateerde instellingen extern zijn gewijzigd.\nAls het selectievakje echter is ingeschakeld, moeten de huidige audio-instellingen echt worden gedefinieerd in het profiel. PAS OP: Het controleren van het beltoonbestand wordt momenteel nog niet ondersteund.</string>
|
||||
<string name="ruleXIsUsingProfileY">Kan dit profiel niet verwijderen. Regel %s$1 verwijst naar het profiel %s$2.</string>
|
||||
<string name="profileCouldNotBeDeleted">Profiel kan niet worden verwijderd.</string>
|
||||
<string name="noRepetition">geen herhaling</string>
|
||||
<string name="usingAuthentication">authenticatie gebruiken</string>
|
||||
<string name="toNumber">naar nummer</string>
|
||||
<string name="message">Bericht</string>
|
||||
<string name="onDays">op dagen</string>
|
||||
<string name="notSet">niet ingesteld</string>
|
||||
<string name="takeLauncherActivity">Automatisch zoeken</string>
|
||||
<string name="pickActivityManually">Handmatig kiezen</string>
|
||||
<string name="launcherNotFound">Een launcher-activiteit van deze app kon niet worden geïdentificeerd. U moet er handmatig een kiezen.</string>
|
||||
<string name="launcherOrManualExplanation">Eenvoudige modus: Automatisering kan proberen de opstartactiviteit van het gewenste programma te identificeren.\nU kunt ook handmatig een van de activiteiten van de toepassing kiezen.\nWat wil je?</string>
|
||||
</resources>
|
@ -10,10 +10,10 @@
|
||||
</string-array>
|
||||
|
||||
<string-array name="startScreenOptions">
|
||||
<item name="0">Home</item>
|
||||
<item name="1">Locations</item>
|
||||
<item name="2">Rules</item>
|
||||
<item name="3">Profiles</item>
|
||||
<item name="0">@string/overview</item>
|
||||
<item name="1">@string/pois</item>
|
||||
<item name="2">@string/rules</item>
|
||||
<item name="3">@string/profiles</item>
|
||||
</string-array>
|
||||
<string-array name="startScreenOptionsValues">
|
||||
<item name="0">0</item>
|
||||
@ -21,4 +21,16 @@
|
||||
<item name="2">2</item>
|
||||
<item name="3">3</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="tabsPlacementOptions">
|
||||
<item name="0">@string/top</item>
|
||||
<item name="1">@string/bottom</item>
|
||||
</string-array>
|
||||
<string-array name="tabsPlacementOptionsValues">
|
||||
<item name="0">0</item>
|
||||
<item name="1">1</item>
|
||||
<item name="2">2</item>
|
||||
<item name="3">3</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
@ -12,7 +12,6 @@
|
||||
<color name="black">#000000</color>
|
||||
<color name="brightScreenBackgroundColor">#F3F3F3</color>
|
||||
<color name="brightScreenTextColor">#FFFFFF</color>
|
||||
<color name="darkScreenBackgroundColor">#FFFFFF</color>
|
||||
<color name="darkScreenTextColor">#F3F3F3</color>
|
||||
|
||||
</resources>
|
||||
<color name="darkScreenBackgroundColor">#444444</color>
|
||||
<color name="darkScreenTextColor">#eeeeee</color>
|
||||
</resources>
|
@ -17,7 +17,7 @@
|
||||
<string name="logServiceStarting" translatable="false">Starting service.</string>
|
||||
<string name="logNotAllMeasurings" translatable="false">Don\'t have all location measurings, yet. Can\'t do comparison.</string>
|
||||
<string name="distanceBetween">Distance between GPS location and network location is %1$d meters. This +1m should be the absolute minimum radius.</string>
|
||||
<string name="comparing">Have both network and gps location. Comparing...</string>
|
||||
<string name="comparing" translatable="false">Have both network and gps location. Comparing...</string>
|
||||
<string name="logNoSuitableProvider" translatable="false">No suitable location providers could be used.</string>
|
||||
<string name="positioningWindowNotice">If you are in a building it is strongly advised to place your device next to a window until a position has been found. Otherwise it may take a very long time if it is able to find one at all.</string>
|
||||
<string name="gettingPosition">Getting position. Please wait...</string>
|
||||
@ -76,7 +76,7 @@
|
||||
<string name="deactivating">Deactivating</string>
|
||||
<string name="bluetoothFailed">Failed to trigger Bluetooth. Does this device have Bluetooth?</string>
|
||||
<string name="urlTooShort">The url has to have least 10 characters.</string>
|
||||
<string name="textTooShort">The text has to have least 10 characters.</string>
|
||||
<string name="enterPhoneNumberAndText">Enter a phone number and a text.</string>
|
||||
<string name="selectTypeOfTrigger">Select type of trigger</string>
|
||||
<string name="entering">entering</string>
|
||||
<string name="leaving">leaving</string>
|
||||
@ -107,8 +107,8 @@
|
||||
<string name="wifiState">Wifi state</string>
|
||||
<string name="listenToAccelerometerState">Observe device movement where wifi is not available</string>
|
||||
<string name="accelerometer">Accelerometer</string>
|
||||
<string name="accelerometerTimer">Use Accelerometer after x minutes without cell mast change</string>
|
||||
<string name="cellMastIdleTime">Cell mast idle time</string>
|
||||
<string name="accelerometerTimer">Use Accelerometer after x minutes without tower mast change</string>
|
||||
<string name="cellMastIdleTime">Cell tower idle time</string>
|
||||
<string name="accelerometerThresholdDescription">Threshold for accelerometer movements</string>
|
||||
<string name="accelerometerThreshold">Accelerometer threshold</string>
|
||||
<string name="positioningThresholds">Positioning thresholds</string>
|
||||
@ -125,7 +125,7 @@
|
||||
<string name="soundSettings">Sound settings</string>
|
||||
<string name="showHelp">Show help</string>
|
||||
<string name="rules">Rules</string>
|
||||
<string name="helpTextRules">All triggers in a rule are AND-connected. The rule will only apply if all triggers are met. If you want OR create another rule.</string>
|
||||
<string name="helpTextRules">All triggers in a rule are AND-connected. The rule will only apply if all triggers are met. If you want OR, create another rule.</string>
|
||||
<string name="timeframes">TimeFrames</string>
|
||||
<string name="helpTextTimeFrame">If you specify a rule with a timeframe you have two choices. You can choose between entering OR leaving a timeframe. Either way a rule is triggered only once. So if you create a rule that has \"entering timeframe xyz\" as trigger and let it change your sound profile to vibrate that does not mean that the phone will automatically go to ring if the timeframe is over. If you want that you need to specify another rule with another timeframe.</string>
|
||||
<string name="helpTextSound">On the main screen you can use lock sound changes to temporarily avoid rule based sound changes. E.g. you may be in a situation or place where usually ringtones are ok, but this one time it would be disturbing. The feature will automatically deactivate once the configured time has elapsed. Click the + button to add the given amount of time. Once it is active you may deactivate it again using the toggle button (and that way enable rule based sound changes again).</string>
|
||||
@ -158,6 +158,7 @@
|
||||
<string name="actionSetBluetooth">Bluetooth</string>
|
||||
<string name="actionSetUsbTethering">USB Tethering</string>
|
||||
<string name="actionSetWifiTethering">Wifi Tethering</string>
|
||||
<string name="actionSetBluetoothTethering">Bluetooth Tethering</string>
|
||||
<string name="actionSetDisplayRotation">Display rotation</string>
|
||||
<string name="actionTurnWifiOn">turn Wifi on</string>
|
||||
<string name="actionTurnWifiOff">turn Wifi off</string>
|
||||
@ -169,6 +170,8 @@
|
||||
<string name="actionTurnUsbTetheringOff">turn USB Tethering off</string>
|
||||
<string name="actionTurnWifiTetheringOn">turn Wifi Tethering on</string>
|
||||
<string name="actionTurnWifiTetheringOff">turn Wifi Tethering off</string>
|
||||
<string name="actionTurnBluetoothTetheringOn">turn Bluetooth Tethering on</string>
|
||||
<string name="actionTurnBluetoothTetheringOff">turn Bluetooth Tethering off</string>
|
||||
<string name="actionTurnAirplaneModeOn">turn airplane mode on</string>
|
||||
<string name="actionTurnAirplaneModeOff">turn airplane mode off</string>
|
||||
<string name="actionEnableScreenRotation">enable screen rotation</string>
|
||||
@ -209,15 +212,15 @@
|
||||
<string name="wifiName">Wifi name</string>
|
||||
<string name="enterWifiName">Enter a wifi name. Leave empty for any wifi.</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="ruleDoesntApplyWeAreSlowerThan" translatable="false">Rule doesn\'t apply. We are slower than</string>
|
||||
<string name="ruleDoesntApplyWeAreFasterThan" translatable="false">Rule doesn\'t apply. We are faster than</string>
|
||||
<string name="ruleDoesntApplyItsQuieterThan" translatable="false">Rule doesn\'t apply. It\'s quieter than</string>
|
||||
<string name="ruleDoesntApplyItsLouderThan" translatable="false">Rule doesn\'t apply. It\'s louder than</string>
|
||||
<string name="ruleDoesntApplyBatteryLowerThan" translatable="false">Rule doesn\'t apply. Battery level is lower than</string>
|
||||
<string name="ruleDoesntApplyBatteryHigherThan" translatable="false">Rule doesn\'t apply. Battery level is higher than</string>
|
||||
<string name="ruleDoesntApplyNotTheCorrectSsid" translatable="false">Rule doesn\'t apply. Not the correct SSID (demanded: \"%1$s\", given: \"%2$s\").</string>
|
||||
<string name="ruleDoesntApplyNoTagLabel" translatable="false">Rule doesn\'t apply. There is no tag label or not tag at all.</string>
|
||||
<string name="ruleDoesntApplyWrongTagLabel" translatable="false">Rule doesn\'t apply. Wrong tag label.</string>
|
||||
<string name="ruleDoesntApplyWeAreSlowerThan" translatable="false">Rule %1$s doesn\'t apply. We are slower than</string>
|
||||
<string name="ruleDoesntApplyWeAreFasterThan" translatable="false">Rule %1$s doesn\'t apply. We are faster than</string>
|
||||
<string name="ruleDoesntApplyItsQuieterThan" translatable="false">Rule %1$s doesn\'t apply. It\'s quieter than</string>
|
||||
<string name="ruleDoesntApplyItsLouderThan" translatable="false">Rule %1$s doesn\'t apply. It\'s louder than</string>
|
||||
<string name="ruleDoesntApplyBatteryLowerThan" translatable="false">Rule %1$s doesn\'t apply. Battery level is lower than</string>
|
||||
<string name="ruleDoesntApplyBatteryHigherThan" translatable="false">Rule %1$s doesn\'t apply. Battery level is higher than</string>
|
||||
<string name="ruleDoesntApplyNotTheCorrectSsid" translatable="false">Rule %1$s doesn\'t apply. Not the correct SSID (demanded: \"%2$s\", given: \"%3$s\").</string>
|
||||
<string name="ruleDoesntApplyNoTagLabel" translatable="false">Rule %1$s doesn\'t apply. There is no tag label or not tag at all.</string>
|
||||
<string name="ruleDoesntApplyWrongTagLabel" translatable="false">Rule %1$s doesn\'t apply. Wrong tag label.</string>
|
||||
<string name="ruleIsDeactivatedCantApply" translatable="false">Rule %1$s is deactivated, can\'t apply.</string>
|
||||
<string name="starting">starting</string>
|
||||
<string name="stopping">stopping</string>
|
||||
@ -261,7 +264,7 @@
|
||||
<string name="anotherAppIsRunning">Another app is started/stopped</string>
|
||||
<string name="settingsCategoryProcessMonitoring">Process monitoring</string>
|
||||
<string name="timeBetweenProcessMonitoringsTitle">Seconds between process monitorings</string>
|
||||
<string name="timeBetweenProcessMonitoringsSummary">The lower the higher the battery usage</string>
|
||||
<string name="timeBetweenProcessMonitoringsSummary">The lower, the higher the battery usage</string>
|
||||
<string name="refreshingProcessList" translatable="false">Refreshing process list.</string>
|
||||
<string name="processes">Processes</string>
|
||||
<string name="startingPeriodicProcessMonitoringEngine" translatable="false">Starting periodic process monitoring engine.</string>
|
||||
@ -339,7 +342,7 @@
|
||||
<string name="with">with</string>
|
||||
<string name="phoneNumber">Phone number</string>
|
||||
<string name="enterPhoneNumber">Enter phone number. Leave empty for any number.</string>
|
||||
<string name="phoneDirection">Select call direction</string>
|
||||
<string name="phoneDirection">Select call\ndirection</string>
|
||||
<string name="any">any</string>
|
||||
<string name="incoming">incoming</string>
|
||||
<string name="outgoing">outgoing</string>
|
||||
@ -378,9 +381,9 @@
|
||||
<string name="toggling">Toggling</string>
|
||||
<string name="toggle">toggle</string>
|
||||
<string name="overlapBetweenPois">Overlap detected to location %1$s of %2$s meters. Reduce radius by at least that.</string>
|
||||
<string name="noOverLap">No overlap to other locations detected.</string>
|
||||
<string name="ruleToggable">Rule %1$s is toggable.</string>
|
||||
<string name="ruleNotToggable">Rule %1$s is not suitable for toggling.</string>
|
||||
<string name="noOverLap" translatable="false">No overlap to other locations detected.</string>
|
||||
<string name="ruleToggable" translatable="false">Rule %1$s is toggable.</string>
|
||||
<string name="ruleNotToggable" translatable="false">Rule %1$s is not suitable for toggling.</string>
|
||||
<string name="none">none</string>
|
||||
<string name="anyLocation">any location</string>
|
||||
<string name="invalidPoiName">Invalid name for location.</string>
|
||||
@ -396,13 +399,13 @@
|
||||
<string name="detectedActivityOnBicycle">On bicycle</string>
|
||||
<string name="detectedActivityOnFoot">On foot</string>
|
||||
<string name="detectedActivityStill">Still</string>
|
||||
<string name="detectedActivityUnknown">Unknown</string>
|
||||
<string name="detectedActivityUnknown">unknown</string>
|
||||
<string name="detectedActivityTilting">Tilting</string>
|
||||
<string name="detectedActivityWalking">Walking</string>
|
||||
<string name="detectedActivityRunning">Running</string>
|
||||
<string name="detectedActivityInvalidStatus">Invalid activity</string>
|
||||
<string name="ruleDoesntApplyActivityGivenButTooLowProbability" translatable="false">Rule doesn\'t apply. Detected activity %1$s given, but too low probability (%2$s %%), required %3$s %%.</string>
|
||||
<string name="ruleDoesntApplyActivityNotPresent" translatable="false">Rule doesn\'t apply. Required activity %1$s not present.</string>
|
||||
<string name="ruleDoesntApplyActivityGivenButTooLowProbability" translatable="false">Rule %1$s doesn\'t apply. Detected activity %2$s given, but too low probability (%3$s %%), required %4$s %%.</string>
|
||||
<string name="ruleDoesntApplyActivityNotPresent" translatable="false">Rule %1$s doesn\'t apply. Required activity %2$s not present.</string>
|
||||
<string name="selectTypeOfActivity">Select type of activity</string>
|
||||
<string name="triggerOnlyAvailableIfPlayServicesInstalled">This trigger is only available if Google Play Services is installed.</string>
|
||||
<string name="activityDetectionFrequencyTitle">Activity detection frequency [sec]</string>
|
||||
@ -422,8 +425,8 @@
|
||||
<string name="bluetoothDeviceInRange">Bluetooth device %1$s in range.</string>
|
||||
<string name="bluetoothDeviceOutOfRange">Bluetooth device %1$s out of range.</string>
|
||||
<string name="anyDevice">any device</string>
|
||||
<string name="ruleDoesntApplyNotTheCorrectDeviceName">Rule doesn\'t apply. Not the correct bluetooth device name.</string>
|
||||
<string name="ruleDoesntApplyNotTheCorrectDeviceAddress">Rule doesn\'t apply. Not the correct bluetooth device address.</string>
|
||||
<string name="ruleDoesntApplyNotTheCorrectDeviceName" translatable="false">Rule %1$s doesn\'t apply. Not the correct bluetooth device name.</string>
|
||||
<string name="ruleDoesntApplyNotTheCorrectDeviceAddress" translatable="false">Rule %1$s doesn\'t apply. Not the correct bluetooth device address.</string>
|
||||
<string name="noDevice">no device</string>
|
||||
<string name="selectDeviceFromList">one from list</string>
|
||||
<string name="connectionToDevice">connection to device</string>
|
||||
@ -432,8 +435,8 @@
|
||||
<string name="deviceOutOfRange">device out of range</string>
|
||||
<string name="selectDeviceOption">Select a device option.</string>
|
||||
<string name="selectConnectionOption">Select a connection option.</string>
|
||||
<string name="ruleDoesntApplyDeviceInRangeButShouldNotBe">Rule doesn\'t apply. Device is in range, but should not be.</string>
|
||||
<string name="ruleDoesntApplyStateNotCorrect">Rule doesn\'t apply. Wrong state.</string>
|
||||
<string name="ruleDoesntApplyDeviceInRangeButShouldNotBe" translatable="false">Rule %1$s doesn\'t apply. Device is in range, but should not be.</string>
|
||||
<string name="ruleDoesntApplyStateNotCorrect" translatable="false">Rule %1$s doesn\'t apply. Wrong state.</string>
|
||||
<string name="triggerHeadsetPlugged">Headset connection</string>
|
||||
<string name="actionPlayMusic">Open music player</string>
|
||||
<string name="headsetConnected">Headset (type: %1$s) connected</string>
|
||||
@ -442,7 +445,7 @@
|
||||
<string name="headphoneMicrophone">Microphone</string>
|
||||
<string name="headphoneAny">Either</string>
|
||||
<string name="headphoneSelectType">Select type of headphone</string>
|
||||
<string name="ruleDoesntApplyWrongHeadphoneType" translatable="false">Rule doesn\'t apply. Wrong headphone type.</string>
|
||||
<string name="ruleDoesntApplyWrongHeadphoneType" translatable="false">Rule %1$s doesn\'t apply. Wrong headphone type.</string>
|
||||
<string name="ignoringActivityDetectionUpdateTooSoon" translatable="false">Ignoring activity detection update. Came in sooner that %1$s seconds.</string>
|
||||
<string name="whatsThis">What\'s this?</string>
|
||||
<string name="atLeastRuleXisUsingY" translatable="false">At least rule \"%1$s\" is using a trigger of type \"%2$s\".</string>
|
||||
@ -452,8 +455,8 @@
|
||||
<string name="notEnforcingGps" translatable="false">Private Locationing not enabled, using regular provider search.</string>
|
||||
<string name="gpsMeasurement" translatable="false">GPS measurement</string>
|
||||
<string name="gpsMeasurementTimeout" translatable="false">GPS measurement stopped due to timeout.</string>
|
||||
<string name="cellMastChanged" translatable="false">Cell mast changed: %1$s</string>
|
||||
<string name="noiseDetectionHint">If you think the noise detection isn\'t working correctly (depending on the value you specify) please keep in mind that every phone is different. You can therefore change \"Reference for noise measurement\" in settings. See http://en.wikipedia.org/wiki/Decibel for more information. You can use the volume tester from the main screen to calibrate your device.</string>
|
||||
<string name="cellMastChanged" translatable="false">Cell tower changed: %1$s</string>
|
||||
<string name="noiseDetectionHint">If you think the noise detection isn\'t working correctly (depending on the value you specify) please keep in mind that every phone is different. You can therefore change \"Reference for noise measurement\" in settings. See http://en.wikipedia.org/wiki/Decibel for more information. You can use the volume calibrator from the main screen to calibrate your device.</string>
|
||||
<string name="hint">Hint</string>
|
||||
<string name="selectNoiseLevel">Select noise level</string>
|
||||
<string name="poiHasWifiStoppingCellLocationListener" translatable="false">Location has wifi. Stopping CellLocationChangedReceiver.</string>
|
||||
@ -479,7 +482,7 @@
|
||||
<string name="soundModeNormal">Normal</string>
|
||||
<string name="soundModeVibrate">Vibrate</string>
|
||||
<string name="soundModeSilent">Silent</string>
|
||||
<string name="enterAname">Enter a name!</string>
|
||||
<string name="enterAname">Enter a name.</string>
|
||||
<string name="noChangeSelectedProfileDoesntMakeSense">No change selected. Profile doesn\'t make sense.</string>
|
||||
<string name="noProfilesCreateOneFirst">There are no profiles in your configuration. Create one first.</string>
|
||||
<string name="errorActivatingProfile">Error activating profile:</string>
|
||||
@ -488,8 +491,7 @@
|
||||
<string name="errorWritingFile">Error writing settings file.</string>
|
||||
<string name="unknownError">Unknown error.</string>
|
||||
<string name="noWritableFolderFound">No writable folder found to store config file.</string>
|
||||
<string name="usbTetheringFailForAboveGingerbread">This will most likely not work as you\'re above Android 2.3. If you\'re below Android 7 you could use wifi tethering instead instead.</string>
|
||||
<string name="wifiTetheringFailForAboveNougat">This will not work anymore as you\'re above Android 7.</string>
|
||||
<string name="usbTetheringFailForAboveGingerbread">This will most likely not work as you\'re above Android 2.3. You could use wifi tethering instead instead.</string>
|
||||
<string name="usingNewThreadForRuleExecution">Using new thread for rule activation.</string>
|
||||
<string name="startNewThreadForRuleExecution">Start new thread for rule activation.</string>
|
||||
<string name="newThreadRules">New thread</string>
|
||||
@ -498,17 +500,17 @@
|
||||
<string name="ruleHistory">Rule history (most recent first):</string>
|
||||
<string name="someOptionsNotAvailableYet">Some options are disabled as they cannot be used, yet. They will be introduced in a later program version.</string>
|
||||
<string name="lockSoundChanges">Lock sound changes</string>
|
||||
<string name="noProfileChangeSoundLocked">Profile will not be activated. Last activated profile was locked.</string>
|
||||
<string name="noProfileChangeSoundLocked">Profile will not be activated. Last activated profile has been locked.</string>
|
||||
<string name="currentVolume">Current volume</string>
|
||||
<string name="enterValidReferenceValue">Enter a valid reference value.</string>
|
||||
<string name="volumeTest">Volume test</string>
|
||||
<string name="volumeTesterExplanation">To calculate a dB value for noise monitoring you need to specify a so called physical reference value. Please read Wikipedia for further information. This value is most likely different for every phone. Drag the seekbar to change the defined physical reference value. The higher the reference value the lower the dB value will be. Constant measurings will be performed every %1$s seconds and the results displayed below. Press back when you have found a suitable value.</string>
|
||||
<string name="volumeTest">Volume calibration</string>
|
||||
<string name="volumeCalibrationExplanation">To calculate a dB value for noise monitoring you need to specify a so called physical reference value. Please read Wikipedia for further information. This value is most likely different for every phone. Drag the seekbar to change the defined physical reference value. The higher the reference value the lower the dB value will be. Constant measurings will be performed every %1$s seconds and the results displayed below. Press back when you have found a suitable value.</string>
|
||||
<string name="settingsWillTakeTime">Some settings will not be applied before certain environment settings change or service is restarted.</string>
|
||||
<string name="phoneIsRooted" translatable="false">Phone is rooted.</string>
|
||||
<string name="phoneIsNotRooted" translatable="false">Phone is not rooted.</string>
|
||||
<string name="dataConWithRootSuccess" translatable="false">Data connection was successfully changed using superuser permissions.</string>
|
||||
<string name="dataConWithRootFail" translatable="false">Data could not be changed using superuser permissions.</string>
|
||||
<string name="rootExplanation">You need to root your phone for this function to work. Afterwards you needs to \"run the rule manually\" to show up the superuser permission question. When the superuser popups shows up you need to always allow the application to do that. Otherwise the rule cannot function when the phone is unattended.</string>
|
||||
<string name="rootExplanation">You need to root your phone for this function to work. Afterwards you need to \"run the rule manually\" to show up the superuser permission question. When the superuser popups shows up you need to always allow the application to do that. Otherwise the rule cannot function when the phone is unattended.</string>
|
||||
<string name="errorWritingConfig">Error writing config. Do you have a writable memory?</string>
|
||||
<string name="phoneNrReplacementError">I could not insert the last phone nr in the variable. I don\'t have it.</string>
|
||||
<string name="username">Username</string>
|
||||
@ -531,7 +533,7 @@
|
||||
<string name="appRequiresPermissiontoAccessExternalStorage">Automation requires access to external storage to read its settings and rules.</string>
|
||||
<string name="mainScreenPermissionNote">Automation requires more permissions to fully function. Click on this text to find out more and request them.</string>
|
||||
<string name="invalidDevice">Invalid device</string>
|
||||
<string name="google_app_id">your app id</string>
|
||||
<string name="google_app_id" translatable="false">your app id</string>
|
||||
<string name="logFileMaxSizeSummary">Maximum log file size in Megabyte. Will be rotated if bigger.</string>
|
||||
<string name="logFileMaxSizeTitle">Maximum log file size [Mb]</string>
|
||||
<string name="android.permission.READ_CALL_LOG">Read phone log</string>
|
||||
@ -565,20 +567,20 @@
|
||||
<string name="android.permission.ACCESS_NOTIFICATION_POLICY">Override do not disturb policy</string>
|
||||
<string name="theseAreThePermissionsRequired">These are the permissions required:</string>
|
||||
<string name="ruleXrequiresThis">Rule \"%1$s\" requires this.</string>
|
||||
<string name="helpTextActivityDetection">This feature can detect if you\'re currently on the go and if it is on foot or in which type of vehicle (to a certain extent). The feature is not fully built into Automation, but is provided by Google Play Services. Technically it does not give a yes/no result, but return a percentage to which level it is sure it detected you\'re status. You can setup the percentage value from which Automation will accept a result. Two remarks: 1) More than 1 status could occur at the same time. For example you might be WALKING inside a driving bus. 2) This sensor is relative cost intensive. If it is possible you might consider using alternatives, e.g. require your car\'s handsfree device to be connected to detect you\'re driving.</string>
|
||||
<string name="helpTextActivityDetection">This feature can detect if you\'re currently on the go and if it is on foot or in which type of vehicle (to a certain extent). The feature is not fully built into Automation, but is provided by Google Play Services. Technically it does not give a yes/no result, but return a percentage to which level it is sure it detected you\'re status. You can setup the percentage value from which Automation will accept a result. Two remarks: 1) More than 1 status could occur at the same time. For example you might be WALKING inside a driving bus. 2) This sensor is relatively expensive in terms of battery usage. If it is possible you might consider using alternatives, e.g. require your car\'s handsfree device to be connected to detect you\'re driving.</string>
|
||||
<string name="sendTextMessage">Send text message</string>
|
||||
<string name="textToSend">Text to send</string>
|
||||
<string name="textMessageAnnotations">You can directly enter a phone number. Alternatively use the contacts option to pick one. But keep in mind: The number will be stored here, not the contact. If you change the phone number of a selected contact you\'ll need to update this rule. It doesn\'t do that by itself.</string>
|
||||
<string name="importNumberFromContacts">Import number from contacts</string>
|
||||
<string name="android9RecordAudioNotice">If you\'re using the noise level trigger: Unfortunately beginning with Android 9 (Pie) Google decided to disallow background applications to use the microphone. So this trigger has no effect anymore and won\'t trigger anything.</string>
|
||||
<string name="android10WifiToggleNotice">Unfortunately Google decided to remove this feature in Android 10. Regular apps are not allowed anymore to turn wifi on or off. This means this action will have no effect on your device.</string>
|
||||
<string name="android10WifiToggleNotice">Unfortunately Google decided to remove this feature in Android 10. Regular apps are not allowed anymore to turn wifi on or off. Only if your device is rooted it should continue to work. If not, then I\'m afraid this won\'t have an effect anymore.</string>
|
||||
<string name="messageNotShownAgain">This message won\'t be shown again.</string>
|
||||
<string name="chooseActivityHint">In this final selection popup you need to select a specific activity. Simplified this is like a window of the desired application. If you do not know which one it is generally a good idea to pick one that has \"main\" or \"launcher\" in its name.</string>
|
||||
<string name="edit">Edit</string>
|
||||
<string name="clickAndHoldForOptions">Click and hold an item for options.</string>
|
||||
<string name="ruleActivationComplete" translatable="false">Rule \"%1$s\" finished.</string>
|
||||
<string name="positioningEngine">Positioning engine</string>
|
||||
<string name="googleSarcasm">Thanks to Google\'s infinite whisdom and constant endeavor to protect everyone\'s privacy rules that may send sms or involve the users phone state have to be stripped off applicable triggers and actions.</string>
|
||||
<string name="googleSarcasm">Thanks to Google\'s infinite wisdom and constant endeavor to protect everyone\'s privacy, all the rules that may be used to send sms or read the phone state have been stripped off of all the triggers and actions which Google considers risky.</string>
|
||||
<string name="startAutomationAsService">Start automation as a service</string>
|
||||
<string name="setScreenBrightness">Set screen brightness</string>
|
||||
<string name="setScreenBrightnessEnterValue">Enter the desired brightness (from 0 to 100).</string>
|
||||
@ -603,11 +605,10 @@
|
||||
<string name="displayNewsOnMainScreen">Display application news on main screen</string>
|
||||
<string name="displayNewsOnMainScreenDescription">Announcements about this app only, we\'re probably talking about 1-2 per year, not more.</string>
|
||||
<string name="filesHaveBeenMovedTo">Automation now uses another path to store your files. All your Automation-files have been moved here: \"%s\". The external storage permission is not required anymore; you can revoke it. It will be removed in a future version.</string>
|
||||
<string name="newsOptIn">Would you like to receive (only important) news about this app on the main screen? Those are downloaded from the developer\'s website. There will be no intrusive notification, just a text on the main screen when you open the app.</string>
|
||||
<string name="locationDisabled">Location disabled</string>
|
||||
<string name="locationEngineDisabledShort">Location cannot be determined in the background anymore. Click here to find out why.</string>
|
||||
<string name="locationEngineDisabledLong">Unfortunately your location cannot be determined anymore. A debt of gratitude is owed to Google for its infinite wisdom and amiableness.\\n\\nLet me explain this further. Starting with Android 10 a new permission was introduced that is needed to determine your location in the background (which of course is required for an app like this). Whilst I consider that a good idea in general the chicanery it involves for developers is not.\\n\\nWhen developing an app you can try to qualify for this permission by abiding to a catalog of requirements. Unfortunately new versions of my app have been rejected over a period of three months. I fulfilled all those requirements, Google\'s shitty development support claimed I would not. After giving them proof that I did after all - I got a response like \"I cannot help you anymore\". Eventually I gave up. \\n\\nAs a consequence the Google Play version can NOT use your location as a trigger anymore. My only alternative option would have been to have this application removed from the store entirely.\\n\\nI\'m very sorry about that, but I\'ve tried my best arguing with a \"support\" that repeatedly failed to pass the Turing test.\\n\\nThe good news: You can still have it all!\\n\\nAutomation is now open source and can be found in F-Droid. That is an app store that really cares about your privacy - rather than just acting like that. Simply backup your config file, uninstall this app, install it again from F-Droid, restore your config file - done.\\n\\nClick here to find out more:</string>
|
||||
<string name="filesStoredAt">Config and log files are stored in folder %1$s. Click on this text to open a file explorer. Unfortunately this will only work on a rooted device.\n\nFOR ALL OTHER DEVICES: Simply use the export button to make a backup.</string>
|
||||
<string name="filesStoredAt">Config and log files are stored in folder %1$s. Click on this text to open a file explorer. Unfortunately this will only work on a rooted device. FOR ALL OTHER DEVICES: Simply use the export button to make a backup.</string>
|
||||
<string name="notification">Notification</string>
|
||||
<string name="title">Title</string>
|
||||
<string name="text">Text</string>
|
||||
@ -632,7 +633,7 @@
|
||||
<string name="noFileManageInstalled">No file manager installed.</string>
|
||||
<string name="shareConfigAndLogFilesWithDev">Share config and log files with developer (via email).</string>
|
||||
<string name="shareConfigAndLogExplanation">This will start a new email with your config and log files attached as zip file. It will not be sent automatically, you still need to hit \"send\". You can also change the recipient to yourself for example.</string>
|
||||
<string name="startAppChoiceNote">Here you have 2 general options: 1. You can start a program by selecting an activity. Imagine this like preselecting a specific screen/window of an application. Keep in mind this may not always work. This is because the windows of an app might interact with each other, e.g. pass on parameters. When bluntly starting a specific screen that interaction has not happened and the window might close instantly (therefore it\'s never really shown). Try it nevertheless! You can enter an activity path manually, but it\'s recommended to use the \"Select\" button. If you decide to enter it manually enter the app\'s package name in the upper field and the full path of the activity in the lower one. 2. Selection by action In contrast to selecting a specific window you can also start a program by an action. This is like shouting out \"I\'d would like xyz\" and if there\'s an app installed that can help you with that it will be started. A good example would be start browser - you might even have multiple installed (one is usually the default one). You need to enter this manually, PackageName is optional here. Keep in mind no variables will be resolved. If you want to start the camera for example using \"MediaStore.ACTION_IMAGE_CAPTURE\" will not work. You have to take a look at the Android documentation and use this variable\'s actual value instead which in this example would be \"android.media.action.IMAGE_CAPTURE\".</string>
|
||||
<string name="startAppChoiceNote">Here you have 2 general options:\n\n1. You can start a program by selecting an activity. Imagine this like preselecting a specific screen/window of an application. Keep in mind this may not always work. This is because the windows of an app might interact with each other, e.g. pass on parameters. When bluntly starting a specific screen that interaction has not happened and the window might close instantly (therefore it\'s never really shown). Try it nevertheless! You can enter an activity path manually, but it\'s recommended to use the \"Select\" button. If you decide to enter it manually enter the app\'s package name in the upper field and the full path of the activity in the lower one.\n\n2. Selection by action In contrast to selecting a specific window you can also start a program by an action. This is like shouting out \"I\'d would like xyz\" and if there\'s an app installed that can help you with that it will be started. A good example would be start browser - you might even have multiple installed (one is usually the default one). You need to enter this manually, PackageName is optional here. Keep in mind no variables will be resolved. If you want to start the camera for example using \"MediaStore.ACTION_IMAGE_CAPTURE\" will not work. You have to take a look at the Android documentation and use this variable\'s actual value instead which in this example would be \"android.media.action.IMAGE_CAPTURE\".</string>
|
||||
<string name="errorRunningRule">There was an error running a rule.</string>
|
||||
<string name="cantFindSoundFile">Cannot find sound file %1$s and therefore not play it.</string>
|
||||
<string name="addParameters">Add parameters</string>
|
||||
@ -672,7 +673,86 @@
|
||||
<string name="matching">matching</string>
|
||||
<string name="urlRegex" translatable="false">https://regex101.com/</string>
|
||||
<string name="loadWifiList">Load wifi list</string>
|
||||
<string name="needLocationPermForWifiList">The list of wifis your device has been connected to could be used to determine which places you have been to. That\'s why the location permission is required to load the list of wifis. If you want to be able to pick one from the list you need to grant that permission. If not you can still enter your wifi name manually.</string>
|
||||
<string name="needLocationPermForWifiList">The list of wifis your device has been connected to could be used to determine which places you have been to. That\'s why the location permission is required to load the list of wifis. If you want to be able to pick one from the list you need to grant that permission. If you do not want that, you can still enter your wifi name manually.</string>
|
||||
<string name="noKnownWifis">There are no known wifis on your device.</string>
|
||||
<string name="urlToTriggerExplanation">This feature does NOT open a browser, but triggers a URL in the background. You can use this e.g. to send commands to your home automation.</string>
|
||||
<string name="automaticUpdateCheck">Check for updates</string>
|
||||
<string name="automaticUpdateCheckSummary">Only applies to APK version.</string>
|
||||
<string name="updateAvailable">There\'s a new update available. Would you like opening the browser to download it?</string>
|
||||
<string name="locationFound">Location found. The suggested minimum radius for locations is %1$d m.</string>
|
||||
<string name="locationFoundInaccurate">Only a location with a limited accuracy could be found. It might not work reliably. The suggested minimum radius for locations is %1$d."</string>
|
||||
<string name="clone">Clone</string>
|
||||
<string name="noLocationCouldBeFound">No position could be found after a timeout of %1$s seconds.</string>
|
||||
<string name="pleaseGiveBgLocation">In the next screen please go to permissions, then location. There select \"Allow all the time\" to allow Automation to determine your location in the background.</string>
|
||||
<string name="vibrate">Vibrate</string>
|
||||
<string name="test">Try</string>
|
||||
<string name="VibrateExplanation">Enter a vibration duration, followed by a comma, then a pause duration. You can concatenate as many vibrations as you like. Separate them by commas again. E.g. the pattern 100,500,500,1000,100 will vibrate 100, wait 500, vibrate 500, wait 1000, vibrate 100 ms. If you think a vibration is dropped, try increasing the pause before them.</string>
|
||||
<string name="pleaseEnterValidVibrationPattern">Please enter a valid vibration pattern.</string>
|
||||
<string name="newsOptIn">Would you like to receive (only important) news about this app on the main screen? Those are downloaded from the developer\'s website. There will be no intrusive notification, just a text on the main screen when you open the app.</string>
|
||||
<string name="top">Top</string>
|
||||
<string name="bottom">Bottom</string>
|
||||
<string name="tabsPlacement">Position of tab bar</string>
|
||||
<string name="tabsPlacementSummary">Choose where the tabs bar should be placed.</string>
|
||||
<string name="wifiApi30">Because Google screwed up yet another part of Android, starting with API 30 only the currently visible wifis can be displayed, not all the ones your device has connected to anymore.</string>
|
||||
<string name="silentTriggersDnd">REMARK: The silent mode often triggers Do-Not-Disturb on newer devices. If that happens on your device, I recommend using the normal mode instead and lowering all volumes to zero.</string>
|
||||
<string name="tones">Tones</string>
|
||||
<string name="miscellaneous">Miscellaneous</string>
|
||||
<string name="dnd">Do not disturb</string>
|
||||
<string name="dndOff">DND off</string>
|
||||
<string name="dndPriority">Let priority notifications through</string>
|
||||
<string name="dndAlarms">Let alarms through</string>
|
||||
<string name="dndNothing">Let nothing through</string>
|
||||
<string name="dndRemarks">Fine tuning (like allowing phone calls, picking specific numbers, etc.) can only be done from the system\'s settings.</string>
|
||||
<string name="automationNotificationsIgnored">If you do not choose a specific app, but choose \"Any app\", notifications from Automation will be ignored to avoid loops.</string>
|
||||
<string name="repeatEveryXseconds">Repeat every x seconds</string>
|
||||
<string name="repeatEveryXsecondsWithVariable">repeat every %1$s seconds</string>
|
||||
<string name="enterRepetitionTime">You need to enter a positive non-decimal value for repetition time.</string>
|
||||
<string name="elementSkipped">An element of the configuration file could not be read. The file may have been created by a newer program version.</string>
|
||||
<string name="donate">Donate</string>
|
||||
<string name="btTetheringNotice">This feature is confirmed to work up until Android 8.0. From some higher version upwards it ceases to work, but due to a lack of physical devices I cannot tell which one that is. On Android 11 it definitely ain\'t working anymore. If you have a version in between please let me know if it\'s working or not.</string>
|
||||
<string name="notice">Notice</string>
|
||||
<string name="deviceOrientation">Device orientation</string>
|
||||
<string name="tolerance">Tolerance (0-180)</string>
|
||||
<string name="orientationAzimuth">Azimuth:</string>
|
||||
<string name="orientationPitch">Pitch:</string>
|
||||
<string name="orientationRoll">Roll:</string>
|
||||
<string name="enterValidNumbersIntoAllFields">Enter valid numbers in all fields.</string>
|
||||
<string name="deviceOrientationExplanation">When you move your device the below numbers will update. What you can see there, is the current orientation of your device measured in degrees. If it is in the desired orientation, click the apply button to copy the current values to the desired fields. Because reaching this exact orientation ever again is highly unlikely you must also enter a tolerance. This is amount of degrees to which the orientation can deviate in either direction. 15° will result in a total angle of 30°, 15° in every direction. If you only care about one specific axis, specify a tolerance of 180° for the two other ones.</string>
|
||||
<string name="wouldCurrentlyApply">Would currently apply?</string>
|
||||
<string name="deviceIsInCertainOrientation">the device is in a certain orientation</string>
|
||||
<string name="toleranceOf180OnlyAllowedIn2Fields">A tolerance of 180 is allowed for 2 tolerance fields only, not all 3. Otherwise the trigger would ALWAYS apply.</string>
|
||||
<string name="unknown">unknown</string>
|
||||
<string name="orientation">Orientation</string>
|
||||
<string name="triggerWrong">There\'s something wrong with this trigger. It could not be loaded correctly.</string>
|
||||
<string name="turnScreenOnOrOff">Turn screen on or off</string>
|
||||
<string name="turnScreenOn">turn screen on</string>
|
||||
<string name="turnScreenOff">turn screen off</string>
|
||||
<string name="mustApply">Must apply</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalTitle">Signal frequency</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalSummary">Accept new movement signals every x milliseconds</string>
|
||||
<string name="deviceOrientationSettings">Device orientation settings</string>
|
||||
<string name="android.permission.BIND_DEVICE_ADMIN">Device administrator</string>
|
||||
<string name="deviceAdminNote">Device administrator permissions required for at least 1 rule you created.</string>
|
||||
<string name="explanationDeviceOrientationDirection">If the checkbox is checked that means the device has to be in the orientation you specify. If it\'s not checked, any orientation that does NOT match your criteria will do.</string>
|
||||
<string name="permissionsRequiredNotAvailable">Your rules required permissions which cannot be requested from this installed flavor of Automation.</string>
|
||||
<string name="smsDialogNotice">If you have not used a send-sms action in this program before, Android may show an additional confirmation dialog, asking you to allow sending messages. You need to select the \"always allow\" checkbox and confirm if you want this action to work in the background. It\'s advised to run this rule manually once to provoke this confirmation dialog.</string>
|
||||
<string name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS">Exclude from battery optimization</string>
|
||||
<string name="recommendedForBetterReliability">Recommended for better reliability</string>
|
||||
<string name="needsToBeActive">Needs to be active</string>
|
||||
<string name="checkSettings">Check settings</string>
|
||||
<string name="profileActive">profile %1$s is active</string>
|
||||
<string name="profileNotActive">profile %1$s is not active</string>
|
||||
<string name="profileTriggerCheckSettings">If this checkbox is not disabled, it will only be checked if the selected profile has been the last one to be activated. It doesn\'t matter if any audio related settings have been changed externally. However if the checkbox is enabled, the current audio settings really need to be like defined in the profile. BEWARE: Checking the ringtone file is currently not supported, yet.</string>
|
||||
<string name="ruleXIsUsingProfileY">Cannot delete this profile. Rule %s$1 is referencing profile %s$2.</string>
|
||||
<string name="profileCouldNotBeDeleted">Profile could not be deleted.</string>
|
||||
<string name="noRepetition">no repetition</string>
|
||||
<string name="usingAuthentication">using authentication</string>
|
||||
<string name="toNumber">to number</string>
|
||||
<string name="message">message</string>
|
||||
<string name="onDays">on days</string>
|
||||
<string name="notSet">not set</string>
|
||||
<string name="takeLauncherActivity">Find automatically</string>
|
||||
<string name="pickActivityManually">Choose manually</string>
|
||||
<string name="launcherOrManualExplanation">Easy mode: Automation can try to identify the launcher activity of the desired program automatically. Alternatively you can also pick one of the application\'s activities manually. What would you like?</string>
|
||||
<string name="launcherNotFound">A launcher activity of this app could not be identified. You will have to pick one manually.</string>
|
||||
</resources>
|
@ -1,5 +1,6 @@
|
||||
<network-security-config>
|
||||
<base-config>
|
||||
<base-config
|
||||
cleartextTrafficPermitted="true">
|
||||
<trust-anchors>
|
||||
<!-- Trust preinstalled CAs -->
|
||||
<certificates src="system" />
|
||||
|
6
app/src/main/res/xml/policies.xml
Normal file
6
app/src/main/res/xml/policies.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<device-admin xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<uses-policies>
|
||||
<force-lock />
|
||||
</uses-policies>
|
||||
</device-admin>
|
@ -5,7 +5,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.2.1'
|
||||
classpath 'com.android.tools.build:gradle:7.0.4'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user