Compare commits
50 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 |
17
.idea/deploymentTargetDropDown.xml
generated
Normal file
17
.idea/deploymentTargetDropDown.xml
generated
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<targetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="C:\Users\jens\.android\avd\Android_11.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2021-09-24T23:07:53.935197300Z" />
|
||||
</component>
|
||||
</project>
|
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 106
|
||||
versionName "1.6.35"
|
||||
versionCode 113
|
||||
versionName "1.6.43"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@ -36,41 +36,42 @@ android {
|
||||
flavorDimensions "version"
|
||||
|
||||
productFlavors
|
||||
{
|
||||
googlePlayFlavor
|
||||
{
|
||||
dimension "version"
|
||||
versionNameSuffix "-googlePlay"
|
||||
targetSdkVersion 29
|
||||
}
|
||||
{
|
||||
googlePlayFlavor
|
||||
{
|
||||
dimension "version"
|
||||
versionNameSuffix "-googlePlay"
|
||||
targetSdkVersion 30
|
||||
}
|
||||
|
||||
fdroidFlavor
|
||||
{
|
||||
dimension "version"
|
||||
targetSdkVersion 28
|
||||
}
|
||||
fdroidFlavor
|
||||
{
|
||||
dimension "version"
|
||||
targetSdkVersion 28
|
||||
}
|
||||
|
||||
apkFlavor
|
||||
{
|
||||
dimension "version"
|
||||
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": 106,
|
||||
"versionName": "1.6.35-googlePlay",
|
||||
"attributes": [],
|
||||
"versionCode": 113,
|
||||
"versionName": "1.6.43-googlePlay",
|
||||
"outputFile": "app-googlePlayFlavor-release.apk"
|
||||
}
|
||||
]
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
@ -146,6 +146,7 @@
|
||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||
<activity android:name=".ActivityHelp" />
|
||||
<activity android:name=".ActivityManageActionVibrate" />
|
||||
<activity
|
||||
android:name=".ActivityMainTabLayout"
|
||||
android:launchMode="singleTask">
|
||||
@ -185,7 +186,6 @@
|
||||
<activity android:name=".ActivityManageActionStartActivity" />
|
||||
<activity android:name=".ActivityManageTriggerNfc" />
|
||||
<activity android:name=".ActivityManageActionSpeakText" />
|
||||
<activity android:name=".ActivityManageActionPlaySound" />
|
||||
<activity android:name=".ActivityManageTriggerBluetooth" />
|
||||
<activity android:name=".ActivityMainProfiles" />
|
||||
<activity android:name=".ActivityManageProfile" />
|
||||
@ -204,8 +204,6 @@
|
||||
|
||||
</service>
|
||||
|
||||
<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"/>
|
||||
|
@ -1,11 +1,14 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Notification;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import android.os.Parcelable;
|
||||
import android.service.notification.StatusBarNotification;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.Log;
|
||||
@ -34,6 +37,10 @@ import static com.jens.automation2.Trigger.triggerParameter2Split;
|
||||
import static com.jens.automation2.receivers.NotificationListener.EXTRA_TEXT;
|
||||
import static com.jens.automation2.receivers.NotificationListener.EXTRA_TITLE;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
|
||||
public class Rule implements Comparable<Rule>
|
||||
{
|
||||
@ -794,13 +801,13 @@ public class Rule implements Comparable<Rule>
|
||||
|
||||
String myApp = params[0];
|
||||
String myTitleDir = params[1];
|
||||
String myTitle = params[2];
|
||||
String requiredTitle = params[2];
|
||||
String myTextDir = params[3];
|
||||
String myText;
|
||||
String requiredText;
|
||||
if (params.length >= 5)
|
||||
myText = params[4];
|
||||
requiredText = params[4];
|
||||
else
|
||||
myText = "";
|
||||
requiredText = "";
|
||||
|
||||
if(oneTrigger.getTriggerParameter())
|
||||
{
|
||||
@ -812,38 +819,58 @@ public class Rule implements Comparable<Rule>
|
||||
{
|
||||
if(getLastExecution() == null || sbn.getPostTime() > this.lastExecution.getTimeInMillis())
|
||||
{
|
||||
String app = sbn.getPackageName();
|
||||
String title = sbn.getNotification().extras.getString(EXTRA_TITLE);
|
||||
String text = sbn.getNotification().extras.getString(EXTRA_TEXT);
|
||||
String notificationApp = sbn.getPackageName();
|
||||
String notificationTitle = null;
|
||||
String notificationText = null;
|
||||
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "Checking if this notification matches our rule " + this.getName() + ". App: " + app + ", title: " + title + ", text: " + text, 5);
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "Checking if this notification matches our rule " + this.getName() + ". App: " + notificationApp + ", title: " + notificationTitle + ", text: " + notificationText, 5);
|
||||
|
||||
if (!myApp.equals("-1"))
|
||||
{
|
||||
if (!app.equalsIgnoreCase(myApp))
|
||||
if (!notificationApp.equalsIgnoreCase(myApp))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "Notification app name does not match rule.", 5);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (myTitle.length() > 0)
|
||||
/*
|
||||
If there are multiple notifications ("stacked") title or text might be null:
|
||||
https://stackoverflow.com/questions/28047767/notificationlistenerservice-not-reading-text-of-stacked-notifications
|
||||
*/
|
||||
|
||||
Bundle extras = sbn.getNotification().extras;
|
||||
|
||||
// T I T L E
|
||||
if (extras.containsKey(EXTRA_TITLE))
|
||||
notificationTitle = sbn.getNotification().extras.getString(EXTRA_TITLE);
|
||||
|
||||
if (!StringUtils.isEmpty(requiredTitle))
|
||||
{
|
||||
if (!Miscellaneous.compare(myTitleDir, myTitle, title))
|
||||
if (!Miscellaneous.compare(myTitleDir, requiredTitle, notificationTitle))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "Notification title does not match rule.", 5);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "A required title for a notification trigger was not specified.", 5);
|
||||
|
||||
if (myText.length() > 0)
|
||||
// T E X T
|
||||
|
||||
if (extras.containsKey(EXTRA_TEXT))
|
||||
notificationText = sbn.getNotification().extras.getString(EXTRA_TEXT);
|
||||
|
||||
if (!StringUtils.isEmpty(requiredText))
|
||||
{
|
||||
if (!Miscellaneous.compare(myTextDir, myText, text))
|
||||
if (!Miscellaneous.compare(myTextDir, requiredText, notificationText))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "Notification text does not match rule.", 5);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "A required text for a notification trigger was not specified.", 5);
|
||||
|
||||
foundMatch = true;
|
||||
break;
|
||||
@ -871,15 +898,15 @@ public class Rule implements Comparable<Rule>
|
||||
return false;
|
||||
}
|
||||
|
||||
if (myTitle.length() > 0)
|
||||
if (requiredTitle.length() > 0)
|
||||
{
|
||||
if (!Miscellaneous.compare(myTitleDir, title, myTitle))
|
||||
if (!Miscellaneous.compare(myTitleDir, title, requiredTitle))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (myText.length() > 0)
|
||||
if (requiredText.length() > 0)
|
||||
{
|
||||
if (!Miscellaneous.compare(myTextDir, text, myText))
|
||||
if (!Miscellaneous.compare(myTextDir, text, requiredText))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -143,6 +143,7 @@
|
||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||
<activity android:name=".ActivityHelp" />
|
||||
<activity android:name=".ActivityManageActionVibrate" />
|
||||
<activity
|
||||
android:name=".ActivityMainTabLayout"
|
||||
android:launchMode="singleTask">
|
||||
|
@ -224,6 +224,19 @@ public class Rule implements Comparable<Rule>
|
||||
|
||||
return XmlFileInterface.writeFile();
|
||||
}
|
||||
|
||||
public boolean cloneRule(Context context)
|
||||
{
|
||||
Rule newRule = new Rule();
|
||||
newRule.setName(this.getName() + " - clone");
|
||||
newRule.setRuleActive(this.isRuleActive());
|
||||
newRule.setRuleToggle(this.isRuleToggle());
|
||||
|
||||
newRule.setTriggerSet(this.getTriggerSet());
|
||||
newRule.setActionSet(this.getActionSet());
|
||||
|
||||
return newRule.create(context);
|
||||
}
|
||||
|
||||
private boolean checkBeforeSaving(Context context, boolean changeExistingRule)
|
||||
{
|
||||
|
@ -137,6 +137,7 @@
|
||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||
<activity android:name=".ActivityHelp" />
|
||||
<activity android:name=".ActivityManageActionVibrate" />
|
||||
<activity
|
||||
android:name=".ActivityMainTabLayout"
|
||||
android:launchMode="singleTask">
|
||||
|
@ -15,6 +15,7 @@ public class Action
|
||||
{
|
||||
public static final String actionParameter2Split = "ap2split";
|
||||
public static final String intentPairSeperator = "intPairSplit";
|
||||
public static final String vibrateSeparator = ",";
|
||||
|
||||
public enum Action_Enum {
|
||||
setWifi,
|
||||
@ -38,6 +39,7 @@ public class Action
|
||||
playMusic,
|
||||
setScreenBrightness,
|
||||
playSound,
|
||||
vibrate,
|
||||
sendTextMessage;
|
||||
|
||||
public String getFullName(Context context)
|
||||
@ -84,6 +86,8 @@ public class Action
|
||||
return context.getResources().getString(R.string.waitBeforeNextAction);
|
||||
case wakeupDevice:
|
||||
return context.getResources().getString(R.string.wakeupDevice);
|
||||
case vibrate:
|
||||
return context.getResources().getString(R.string.vibrate);
|
||||
case setAirplaneMode:
|
||||
return context.getResources().getString(R.string.airplaneMode);
|
||||
case setDataConnection:
|
||||
@ -361,7 +365,7 @@ 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);
|
||||
@ -377,7 +381,7 @@ public class Action
|
||||
break;
|
||||
case wakeupDevice:
|
||||
Actions.wakeupDevice(Long.parseLong(this.getParameter2()));
|
||||
// wakeupDevice() will create a seperate thread. That'll take some time, we wait 100ms.
|
||||
// wakeupDevice() will create a separate thread. That'll take some time, we wait 100ms.
|
||||
try
|
||||
{
|
||||
Thread.sleep(100);
|
||||
@ -405,6 +409,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;
|
||||
|
@ -3,6 +3,7 @@ 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.bluetooth.BluetoothAdapter;
|
||||
import android.content.ActivityNotFoundException;
|
||||
@ -16,15 +17,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;
|
||||
@ -68,48 +72,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)
|
||||
@ -457,12 +498,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 +626,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();
|
||||
@ -1110,7 +1235,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 +1261,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 +1319,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 +1361,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()
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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());
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -22,6 +22,8 @@ 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;
|
||||
@ -163,7 +165,7 @@ public class ActivityManagePoi extends Activity
|
||||
locationSearchStart = Calendar.getInstance();
|
||||
startTimeout();
|
||||
|
||||
if(!Settings.privacyLocationing)
|
||||
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);
|
||||
|
@ -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()
|
||||
)
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
@ -88,13 +89,12 @@ public class ActivityManageRule extends Activity
|
||||
final static int requestCodeActionStartActivityEdit = 3001;
|
||||
final static int requestCodeTriggerNfcTagAdd = 4000;
|
||||
final static int requestCodeTriggerNfcTagEdit = 4001;
|
||||
final static int requestCodeActionSpeakTextAdd = 5000;
|
||||
final static int requestCodeActionSpeakTextEdit = 1001;
|
||||
final static int requestCodeActionSpeakTextAdd = 5101;
|
||||
final static int requestCodeActionSpeakTextEdit = 5102;
|
||||
final static int requestCodeTriggerBluetoothAdd = 6000;
|
||||
final static int requestCodeTriggerBluetoothEdit = 6001;
|
||||
final static int requestCodeActionScreenBrightnessAdd = 401;
|
||||
final static int requestCodeActionScreenBrightnessEdit = 402;
|
||||
final static int requestCodeActionSendTextMessage = 7001;
|
||||
final static int requestCodeTriggerNotificationAdd = 8000;
|
||||
final static int requestCodeTriggerNfcNotificationEdit = 8001;
|
||||
final static int requestCodeActionPlaySoundAdd = 501;
|
||||
@ -103,6 +103,10 @@ public class ActivityManageRule extends Activity
|
||||
final static int requestCodeTriggerPhoneCallEdit = 602;
|
||||
final static int requestCodeTriggerWifiAdd = 723;
|
||||
final static int requestCodeTriggerWifiEdit = 724;
|
||||
final static int requestCodeActionSendTextMessageAdd = 5001;
|
||||
final static int requestCodeActionSendTextMessageEdit = 5002;
|
||||
final static int requestCodeActionVibrateAdd = 801;
|
||||
final static int requestCodeActionVibrateEdit = 802;
|
||||
|
||||
public static ActivityManageRule getInstance()
|
||||
{
|
||||
@ -117,7 +121,7 @@ public class ActivityManageRule extends Activity
|
||||
{
|
||||
context = this;
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.manage_specific_rule);
|
||||
setContentView(R.layout.activity_manage_specific_rule);
|
||||
|
||||
instance = this;
|
||||
|
||||
@ -228,27 +232,11 @@ public class ActivityManageRule extends Activity
|
||||
Trigger selectedTrigger = (Trigger)triggerListView.getItemAtPosition(arg2);
|
||||
switch(selectedTrigger.getTriggerType())
|
||||
{
|
||||
// case batteryLevel:
|
||||
// break;
|
||||
// case charging:
|
||||
// break;
|
||||
// case noiseLevel:
|
||||
// break;
|
||||
// case pointOfInterest:
|
||||
// break;
|
||||
// case process_started_stopped:
|
||||
// break;
|
||||
// case speed:
|
||||
// break;
|
||||
case timeFrame:
|
||||
ActivityManageTriggerTimeFrame.editedTimeFrameTrigger = selectedTrigger;
|
||||
Intent timeFrameEditor = new Intent(ActivityManageRule.this, ActivityManageTriggerTimeFrame.class);
|
||||
startActivityForResult(timeFrameEditor, requestCodeTriggerTimeframeEdit);
|
||||
break;
|
||||
// case usb_host_connection:
|
||||
// break;
|
||||
// case wifiConnection:
|
||||
// break;
|
||||
case bluetoothConnection:
|
||||
ActivityManageTriggerBluetooth.editedBluetoothTrigger = selectedTrigger;
|
||||
Intent bluetoothEditor = new Intent(ActivityManageRule.this, ActivityManageTriggerBluetooth.class);
|
||||
@ -306,14 +294,6 @@ public class ActivityManageRule extends Activity
|
||||
Action a = (Action)actionListView.getItemAtPosition(arg2);
|
||||
switch(a.getAction())
|
||||
{
|
||||
// case changeSoundProfile:
|
||||
// break;
|
||||
// case disableScreenRotation:
|
||||
// break;
|
||||
// case enableScreenRotation:
|
||||
// break;
|
||||
// case setAirplaneMode:
|
||||
// break;
|
||||
case startOtherActivity:
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionStartActivity.class);
|
||||
ActivityManageActionStartActivity.resultingAction = a;
|
||||
@ -336,15 +316,19 @@ public class ActivityManageRule extends Activity
|
||||
Intent activitySendTextMessageIntent = new Intent(ActivityManageRule.this, ActivityManageActionSendTextMessage.class);
|
||||
ActivityManageActionSendTextMessage.resultingAction = a;
|
||||
activitySendTextMessageIntent.putExtra("edit", true);
|
||||
startActivityForResult(activitySendTextMessageIntent, requestCodeActionSendTextMessage);
|
||||
startActivityForResult(activitySendTextMessageIntent, requestCodeActionSendTextMessageEdit);
|
||||
break;
|
||||
case setScreenBrightness:
|
||||
Intent activityEditScreenBrightnessIntent = new Intent(ActivityManageRule.this, ActivityManageActionBrightnessSetting.class);
|
||||
// ActivityEditTriggerUrl.resultingAction = a;
|
||||
activityEditScreenBrightnessIntent.putExtra("autoBrightness", a.getParameter1());
|
||||
activityEditScreenBrightnessIntent.putExtra("brightnessValue", Integer.parseInt(a.getParameter2()));
|
||||
startActivityForResult(activityEditScreenBrightnessIntent, requestCodeActionScreenBrightnessEdit);
|
||||
break;
|
||||
case vibrate:
|
||||
Intent activityEditVibrateIntent = new Intent(ActivityManageRule.this, ActivityManageActionVibrate.class);
|
||||
activityEditVibrateIntent.putExtra("vibratePattern", a.getParameter2());
|
||||
startActivityForResult(activityEditVibrateIntent, requestCodeActionVibrateEdit);
|
||||
break;
|
||||
case playSound:
|
||||
Intent actionPlaySoundIntent = new Intent(context, ActivityManageActionPlaySound.class);
|
||||
actionPlaySoundIntent.putExtra("edit", true);
|
||||
@ -630,16 +614,16 @@ public class ActivityManageRule extends Activity
|
||||
if(triggerType == Trigger_Enum.nfcTag)
|
||||
{
|
||||
if (NfcReceiver.checkNfcRequirements(ActivityManageRule.this, true))
|
||||
getTriggerParamterDialog(context, booleanChoices).show();
|
||||
getTriggerParameterDialog(context, booleanChoices).show();
|
||||
}
|
||||
else
|
||||
getTriggerParamterDialog(context, booleanChoices).show();
|
||||
getTriggerParameterDialog(context, booleanChoices).show();
|
||||
}
|
||||
});
|
||||
|
||||
return builder.create();
|
||||
}
|
||||
private AlertDialog getTriggerParamterDialog(final Context myContext, final String[] choices)
|
||||
private AlertDialog getTriggerParameterDialog(final Context myContext, final String[] choices)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.selectTypeOfTrigger));
|
||||
@ -686,13 +670,6 @@ public class ActivityManageRule extends Activity
|
||||
String[] choices = (String[]) choicesList.toArray(new String[choicesList.size()]);
|
||||
getTriggerNoiseDialog(myContext, choices).show();
|
||||
}
|
||||
// else if(triggerType.equals(Trigger.Event_Enum.timeFrame))
|
||||
// {
|
||||
// newTrigger.setTriggerType(Trigger.Event_Enum.timeFrame);
|
||||
// ActivityManageTimeFrame.editedTimeFrameTrigger = null;
|
||||
// Intent timeFrameEditor = new Intent(myContext, ActivityManageTimeFrame.class);
|
||||
// startActivityForResult(timeFrameEditor, 2000);
|
||||
// }
|
||||
else if(triggerType.equals(Trigger_Enum.wifiConnection))
|
||||
{
|
||||
newTrigger.setTriggerType(Trigger_Enum.wifiConnection);
|
||||
@ -703,7 +680,6 @@ public class ActivityManageRule extends Activity
|
||||
progressDialog = ProgressDialog.show(myContext, null, getResources().getString(R.string.gettingListOfInstalledApplications), true, false);
|
||||
newTrigger.setTriggerType(Trigger_Enum.process_started_stopped);
|
||||
new GenerateApplicationSelectionsDialogTask().execute(ActivityManageRule.this);
|
||||
// getTriggerRunningProcessDialog1(myContext).show();
|
||||
}
|
||||
else if(triggerType.equals(Trigger_Enum.phoneCall))
|
||||
{
|
||||
@ -1201,6 +1177,7 @@ public class ActivityManageRule extends Activity
|
||||
{
|
||||
ruleToEdit.getTriggerSet().add(newTrigger);
|
||||
|
||||
newTrigger.setTriggerParameter(data.getBooleanExtra("direction", false));
|
||||
newTrigger.setTriggerParameter2(
|
||||
data.getStringExtra("app") + Trigger.triggerParameter2Split +
|
||||
data.getStringExtra("titleDir") + Trigger.triggerParameter2Split +
|
||||
@ -1249,8 +1226,8 @@ public class ActivityManageRule extends Activity
|
||||
{
|
||||
if(resultCode == RESULT_OK)
|
||||
{
|
||||
//add SpeakText
|
||||
ruleToEdit.getActionSet().add(ActivityManageActionSendTextMessage.resultingAction);
|
||||
//edit SpeakText
|
||||
newAction = ActivityManageActionSpeakText.resultingAction;
|
||||
this.refreshActionList();
|
||||
}
|
||||
}
|
||||
@ -1298,6 +1275,25 @@ public class ActivityManageRule extends Activity
|
||||
this.refreshActionList();
|
||||
}
|
||||
}
|
||||
else if(requestCode == requestCodeActionVibrateAdd)
|
||||
{
|
||||
if(resultCode == RESULT_OK)
|
||||
{
|
||||
newAction.setParameter2(data.getStringExtra("vibratePattern"));
|
||||
ruleToEdit.getActionSet().add(newAction);
|
||||
this.refreshActionList();
|
||||
}
|
||||
}
|
||||
else if(requestCode == requestCodeActionVibrateEdit)
|
||||
{
|
||||
if(resultCode == RESULT_OK)
|
||||
{
|
||||
if(data.hasExtra("vibratePattern"))
|
||||
ruleToEdit.getActionSet().get(editIndex).setParameter2(data.getStringExtra("vibratePattern"));
|
||||
|
||||
this.refreshActionList();
|
||||
}
|
||||
}
|
||||
else if(requestCode == requestCodeActionPlaySoundAdd)
|
||||
{
|
||||
if(resultCode == RESULT_OK)
|
||||
@ -1321,17 +1317,25 @@ public class ActivityManageRule extends Activity
|
||||
this.refreshActionList();
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Check with has data been changed or something like that.
|
||||
/*try
|
||||
else if(requestCode == requestCodeActionSendTextMessageAdd)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "ActivityManageSpecificRule", getResources().getString(R.string.noDataChangedReadingAnyway), 4);
|
||||
XmlFileInterface.readFile();
|
||||
if(resultCode == RESULT_OK)
|
||||
{
|
||||
//add SendTextMessage
|
||||
ruleToEdit.getActionSet().add(ActivityManageActionSendTextMessage.resultingAction);
|
||||
this.refreshActionList();
|
||||
}
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
else if(requestCode == requestCodeActionSendTextMessageEdit)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "ActivityManageSpecificRule", getResources().getString(R.string.errorReadingPoisAndRulesFromFile) + ": " + Log.getStackTraceString(e), 5);
|
||||
}*/
|
||||
if(resultCode == RESULT_OK)
|
||||
{
|
||||
//edit SendTextMessage
|
||||
newAction = ActivityManageActionSendTextMessage.resultingAction;
|
||||
//ruleToEdit.getActionSet().add(ActivityManageActionSendTextMessage.resultingAction);
|
||||
this.refreshActionList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected Dialog getActionTypeDialog()
|
||||
@ -1375,10 +1379,12 @@ public class ActivityManageRule extends Activity
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.brightness));
|
||||
else if(types[i].toString().equals(Action_Enum.playSound.toString()))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.sound));
|
||||
else if(types[i].toString().equals(Action_Enum.vibrate.toString()))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.vibrate));
|
||||
else if(types[i].toString().equals(Action_Enum.sendTextMessage.toString()))
|
||||
{
|
||||
// if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageSpecificRule.this, "android.permission.SEND_SMS") && !Miscellaneous.isGooglePlayInstalled(ActivityManageSpecificRule.this))
|
||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, "android.permission.SEND_SMS"))
|
||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, Manifest.permission.SEND_SMS))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.message));
|
||||
}
|
||||
else
|
||||
@ -1419,14 +1425,15 @@ public class ActivityManageRule extends Activity
|
||||
newAction.setAction(Action_Enum.triggerUrl);
|
||||
ActivityManageActionTriggerUrl.resultingAction = null;
|
||||
Intent editTriggerIntent = new Intent(context, ActivityManageActionTriggerUrl.class);
|
||||
startActivityForResult(editTriggerIntent, 1000);
|
||||
startActivityForResult(editTriggerIntent, requestCodeActionTriggerUrlAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setWifi.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setWifi);
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||
Toast.makeText(context, context.getResources().getString(R.string.android10WifiToggleNotice), Toast.LENGTH_LONG).show();
|
||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||
Miscellaneous.messageBox(context.getResources().getString(R.string.app_name), context.getResources().getString(R.string.android10WifiToggleNotice), context).show();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setBluetooth.toString()))
|
||||
{
|
||||
@ -1438,9 +1445,10 @@ public class ActivityManageRule extends Activity
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setUsbTethering.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setUsbTethering);
|
||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||
|
||||
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.GINGERBREAD_MR1)
|
||||
Miscellaneous.messageBox(context.getResources().getString(R.string.warning), context.getResources().getString(R.string.usbTetheringFailForAboveGingerbread), context).show();
|
||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setWifiTethering.toString()))
|
||||
{
|
||||
@ -1466,7 +1474,7 @@ public class ActivityManageRule extends Activity
|
||||
{
|
||||
newAction.setAction(Action_Enum.startOtherActivity);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionStartActivity.class);
|
||||
startActivityForResult(intent, 3000);
|
||||
startActivityForResult(intent, requestCodeActionStartActivityAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.waitBeforeNextAction.toString()))
|
||||
{
|
||||
@ -1500,18 +1508,17 @@ public class ActivityManageRule extends Activity
|
||||
newAction.setAction(Action_Enum.speakText);
|
||||
ActivityManageActionSpeakText.resultingAction = null;
|
||||
Intent editTriggerIntent = new Intent(context, ActivityManageActionSpeakText.class);
|
||||
startActivityForResult(editTriggerIntent, 5000);
|
||||
startActivityForResult(editTriggerIntent, requestCodeActionSpeakTextAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.sendTextMessage.toString()))
|
||||
{
|
||||
// if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageSpecificRule.this, "android.permission.SEND_SMS") && !Miscellaneous.isGooglePlayInstalled(ActivityManageSpecificRule.this))
|
||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, "android.permission.SEND_SMS"))
|
||||
{
|
||||
//launch other activity to enter parameters;
|
||||
newAction.setAction(Action_Enum.sendTextMessage);
|
||||
ActivityManageActionSendTextMessage.resultingAction = null;
|
||||
Intent editTriggerIntent = new Intent(context, ActivityManageActionSendTextMessage.class);
|
||||
startActivityForResult(editTriggerIntent, 5001);
|
||||
startActivityForResult(editTriggerIntent, requestCodeActionSendTextMessageAdd);
|
||||
}
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.playMusic.toString()))
|
||||
@ -1520,6 +1527,12 @@ public class ActivityManageRule extends Activity
|
||||
ruleToEdit.getActionSet().add(newAction);
|
||||
refreshActionList();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.vibrate.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.vibrate);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionVibrate.class);
|
||||
startActivityForResult(intent, requestCodeActionVibrateAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setScreenBrightness.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setScreenBrightness);
|
||||
@ -1637,63 +1650,6 @@ public class ActivityManageRule extends Activity
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
/*private AlertDialog getActionStartActivityDialog1(final Context myContext)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
|
||||
alertDialogBuilder.setTitle(myContext.getResources().getString(R.string.selectApplication));
|
||||
final String[] applicationArray = ActivityManageStartActivity.getApplicationNameListString(ActivityManageSpecificRule.this);
|
||||
alertDialogBuilder.setItems(applicationArray, new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
getActionStartActivityDialog2(myContext, applicationArray[which]).show();
|
||||
}
|
||||
});
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
private AlertDialog getActionStartActivityDialog2(final Context myContext, String applicationName)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
|
||||
alertDialogBuilder.setTitle(myContext.getResources().getString(R.string.selectPackageOfApplication));
|
||||
final String[] packageArray = ActivityManageStartActivity.getPackageListString(ActivityManageSpecificRule.this, applicationName);
|
||||
alertDialogBuilder.setItems(packageArray, new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
getActionStartActivityDialog3(ActivityManageSpecificRule.this, packageArray[which]).show();
|
||||
}
|
||||
});
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
private AlertDialog getActionStartActivityDialog3(final Context myContext, final String packageName)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
|
||||
alertDialogBuilder.setTitle(myContext.getResources().getString(R.string.selectActivityToBeStarted));
|
||||
final String activityArray[] = ActivityManageStartActivity.getActivityListForPackageName(packageName);
|
||||
alertDialogBuilder.setItems(activityArray, new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
ActivityInfo ai = ActivityManageStartActivity.getActivityInfoForPackageNameAndActivityName(packageName, activityArray[which]);
|
||||
// Log.i("Selected", ai.packageName + " / " + ai.name);
|
||||
newAction.setParameter2(ai.packageName + ";" + ai.name);
|
||||
newAction.toString();
|
||||
ruleToEdit.getActionSet().add(newAction);
|
||||
refreshActionList();
|
||||
}
|
||||
});
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
return alertDialog;
|
||||
}*/
|
||||
|
||||
private AlertDialog getActionWaitBeforeNextActionDialog(final Context myContext)
|
||||
{
|
||||
AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);
|
||||
|
@ -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;
|
||||
@ -55,6 +58,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 +132,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 +159,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)
|
||||
{
|
||||
|
@ -3,6 +3,7 @@ package com.jens.automation2;
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
@ -19,6 +20,9 @@ import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
|
||||
import com.jens.automation2.receivers.NotificationListener;
|
||||
|
||||
@ -411,11 +415,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);
|
||||
@ -494,12 +498,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;
|
||||
@ -512,7 +517,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);*/
|
||||
@ -522,16 +528,19 @@ 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 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);
|
||||
|
||||
/*
|
||||
@ -578,30 +587,30 @@ public class ActivityPermissions extends Activity
|
||||
break;
|
||||
case turnUsbTetheringOff:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
// addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case turnUsbTetheringOn:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.CHANGE_NETWORK_STATE, 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.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.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.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.CHANGE_NETWORK_STATE, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case waitBeforeNextAction:
|
||||
@ -609,6 +618,9 @@ public class ActivityPermissions extends Activity
|
||||
case wakeupDevice:
|
||||
addToArrayListUnique(Manifest.permission.WAKE_LOCK, requiredPermissions);
|
||||
break;
|
||||
case playSound:
|
||||
addToArrayListUnique(Manifest.permission.READ_EXTERNAL_STORAGE, requiredPermissions);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -647,7 +659,7 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
for (Action action : rule.getActionSet())
|
||||
{
|
||||
if(action.equals(actionType))
|
||||
if(action.getAction().equals(actionType))
|
||||
addToArrayListUnique(rule.getName(), returnList);
|
||||
}
|
||||
}
|
||||
@ -674,17 +686,14 @@ 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));
|
||||
@ -821,6 +830,10 @@ 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;
|
||||
}
|
||||
|
||||
return usingElements;
|
||||
@ -852,9 +865,7 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -967,8 +978,8 @@ 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())
|
||||
// &&
|
||||
// Miscellaneous.isGooglePlayInstalled(Miscellaneous.getAnyContext())
|
||||
)
|
||||
{
|
||||
requiredPermissions.remove(Manifest.permission.SEND_SMS);
|
||||
@ -986,7 +997,10 @@ 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
|
||||
// Miscellaneous.messageBox(getResources().getString(R.string.warning), getResources().getString(R.string.permissionsRequiredNotAvailable), ActivityPermissions.this).show();
|
||||
}
|
||||
else
|
||||
setHaveAllPermissions();
|
||||
@ -1154,10 +1168,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
|
||||
{
|
||||
@ -1168,6 +1178,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();
|
||||
}
|
||||
|
||||
@ -1324,6 +1342,7 @@ 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);
|
||||
}
|
||||
|
@ -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;
|
||||
@ -211,7 +212,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);
|
||||
@ -333,7 +334,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
|
||||
}
|
||||
|
||||
@ -407,6 +408,14 @@ public class AutomationService extends Service implements OnInitListener
|
||||
}
|
||||
}
|
||||
|
||||
public void cancelNotification()
|
||||
{
|
||||
// stopForeground(false);
|
||||
NotificationManagerCompat.from(AutomationService.this).cancelAll();
|
||||
// NotificationManagerCompat.from(AutomationService.this).cancel(ActivityPermissions.notificationIdPermissions);
|
||||
// NotificationManagerCompat.from(AutomationService.this).cancel(AutomationService.notificationIdRestrictions);
|
||||
}
|
||||
|
||||
protected void checkForMissingBackgroundLocationPermission()
|
||||
{
|
||||
if(Miscellaneous.googleToBlameForLocation(true))
|
||||
@ -421,23 +430,6 @@ public class AutomationService extends Service implements OnInitListener
|
||||
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)
|
||||
@ -631,7 +623,10 @@ public class AutomationService extends Service implements OnInitListener
|
||||
// myNotification.setLatestEventInfo(instance, "Automation", textToDisplay, myPendingIntent);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// {
|
||||
if(notificationBuilder == null)
|
||||
notificationBuilder = createDefaultNotificationBuilder();
|
||||
|
||||
notificationBuilder.setContentText(textToDisplay);
|
||||
notificationBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
||||
|
||||
|
@ -15,6 +15,8 @@ import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.Cursor;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
@ -447,6 +449,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:
|
||||
@ -599,7 +609,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]"))
|
||||
@ -609,7 +622,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);
|
||||
@ -656,6 +672,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.
|
||||
@ -664,9 +698,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;
|
||||
}
|
||||
|
||||
@ -873,6 +911,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();
|
||||
|
||||
@ -974,6 +1013,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);
|
||||
|
||||
|
@ -5,6 +5,7 @@ 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;
|
||||
@ -24,6 +25,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 +85,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;
|
||||
@ -449,6 +473,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 +491,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)
|
||||
|
@ -144,14 +144,14 @@ 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
|
||||
|
@ -60,6 +60,7 @@ public class Settings implements SharedPreferences
|
||||
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;
|
||||
@ -116,6 +117,7 @@ public class Settings implements SharedPreferences
|
||||
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;
|
||||
@ -253,6 +255,7 @@ 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);
|
||||
@ -440,6 +443,9 @@ 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);
|
||||
|
||||
@ -524,6 +530,7 @@ public class Settings implements SharedPreferences
|
||||
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);
|
||||
@ -575,4 +582,4 @@ public class Settings implements SharedPreferences
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -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"))
|
||||
@ -1212,7 +1224,15 @@ 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
|
||||
{
|
||||
|
@ -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())
|
||||
{
|
||||
@ -356,7 +372,7 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
||||
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.findRuleCandidatesBySpeed();
|
||||
for (Rule oneRule : ruleCandidates)
|
||||
{
|
||||
if (oneRule.applies(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();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
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 |
@ -9,6 +9,13 @@
|
||||
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"
|
||||
|
@ -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" />
|
||||
|
@ -52,6 +52,13 @@
|
||||
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" />
|
||||
|
@ -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>
|
@ -475,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>
|
||||
@ -586,4 +586,13 @@
|
||||
<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>
|
||||
</resources>
|
@ -2,14 +2,14 @@
|
||||
<resources>
|
||||
<string name="ruleActivate">Estoy activando regla %1$s</string>
|
||||
<string name="profileActivate">Estoy activando perfil %1$s</string>
|
||||
<string name="ruleActivateToggle">Estoy activando regla %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 regla</string>
|
||||
<string name="poiList">Lista de sitios:</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="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>
|
||||
@ -88,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>
|
||||
@ -131,15 +131,15 @@
|
||||
<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="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>
|
||||
@ -150,31 +150,31 @@
|
||||
<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 llamadas</string>
|
||||
@ -196,27 +196,27 @@
|
||||
<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 en el almacenamiento</string>
|
||||
<string name="apply">acplicar</string>
|
||||
<string name="publishedOn">publicitado el</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="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">Batteria esta cargando</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">Conexión Bluetooth</string>
|
||||
@ -229,14 +229,14 @@
|
||||
<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 el mismo nombre.</string>
|
||||
<string name="errorActivatingProfile">Error activando perfil:</string>
|
||||
<string name="executeRulesAndProfilesWithSingleClickTitle">Activar reglas/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>
|
||||
@ -244,10 +244,10 @@
|
||||
<string name="volumeRingtoneNotifications">Sonido polifónico ý notificaciónes</string>
|
||||
<string name="notificationRingtone">Sonido polifónico para notificaciónes</string>
|
||||
<string name="incomingCallsRingtone">Sonido de llamadas</string>
|
||||
<string name="batteryLevel">NIvel de la bateria</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>
|
||||
@ -258,7 +258,7 @@
|
||||
<string name="phoneDirection">Elija llamada\nentrante o saliente</string>
|
||||
<string name="headphoneSimple">Auriculares</string>
|
||||
<string name="headphoneSelectType">Elija tipo de auriculares</string>
|
||||
<string name="accelerometer">" Acelerómetro"</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>
|
||||
@ -266,12 +266,12 @@
|
||||
<string name="wakeupDevice">Despertar dispositivo</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>
|
||||
@ -294,11 +294,11 @@
|
||||
<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>
|
||||
@ -306,31 +306,31 @@
|
||||
<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 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>
|
||||
@ -357,33 +357,32 @@
|
||||
<string name="satisfactoryAccuracyNetwork">Exactitud necesaria para red en metros.</string>
|
||||
<string name="networkAccuracy">Red exactitud [m]</string>
|
||||
<string name="minimumTimeForLocationUpdates">Tiempo mínimo 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="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 (vía email).</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">Todos las condiciones están y-conectado. La regla solo va a aplicarse cuando todos las condiciones sus aplican. Si quiere O cree otra regla.</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="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="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 máximo 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 reglas 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="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>
|
||||
@ -400,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="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á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="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>
|
||||
@ -428,7 +427,7 @@ Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dis
|
||||
<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 éxito.</string>
|
||||
<string name="nfcTagWriteError">Error escribiendo tag. Esta el tag cerca?</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>
|
||||
@ -485,7 +484,7 @@ Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dis
|
||||
<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>
|
||||
@ -511,18 +510,18 @@ Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dis
|
||||
<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 podria estar en una situación o en un sitio donde tono de llamada estan bien, pero esta vez no fuese oportuno. La función se desactiva automaticamente despues del tiempo configurado. Cliquee el + botton para adicionar mas tiempo. Se puede desactivar la función antes tambien usando el boton interuptor (en consecuencia reactivar cambios de sonido, basados en normas).</string>
|
||||
<string name="helpTextToggable">Normas tienen una configuracion que se llama \\\"reversible\\\". Significa si una norma es ejecutada y despues las mismas condiciones estan, 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 applicación va a hacer lo contrario de la situación actual, por ejemplo desactivar wifi cuando esta activo.</string>
|
||||
<string name="helpTextProcessMonitoring">Si crea una norma con vigilancia del proceso la aplicación va a revisar periodicamente si el proceso esta activo. Puede ajustar la frecuencia en la configuración. Puede relentizar la reacción, pero vigilancia permanente gasta mucha bateria. No hay una broadcast del sistema operativo para este evento.</string>
|
||||
<string name="helpTextEnergySaving">Muchos fabricantes intentan conservar energia en limitando la actividades de segundo plano de otras apps. Desafortunadamente el resultado es que en esas aplicaciones no funcionan por completo. Automation esta entre ellas. Vease <a href="https://dontkillmyapp.com/">esta pagina</a> para determinar como excluir Automation de tales medidas.</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 descargar lo?</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 un posición. El radio minimo sugeri es %1$d m.</string>
|
||||
<string name="locationFoundInaccurate">Solo pude determinar una posición imprecisa. Puede ser va a funcionar poco fiable. El radio minimo sugeri es %1$d m.</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>
|
||||
@ -557,18 +556,42 @@ Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dis
|
||||
<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">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 un limite de 120 segundos..</string>
|
||||
<string name="pleaseGiveBgLocation">En la proxima pantalla por favor vaya a permisos, luego posición. Ahi elija \"Siempre permitir\" para permitir Automation determinar la posición en el fondo.</string>
|
||||
<string name="ConfigurationExportError">Hubo un error durante exportar la configuración.</string>
|
||||
<string name="rulesImportedSuccessfully">Reglas y sitios serán exportado con exito.</string>
|
||||
<string name="rulesImportError">Hubo un error durante importando reglas y sitios.</string>
|
||||
<string name="notAllFilesImported">No pude 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 sobreescribidos.</string>
|
||||
<string name="errorRunningRule">Hubo un error iniciar una regla.</string>
|
||||
<string name="locationEngineDisabledShort">La posición no mas sera determinado en el fondo. Cliquee aqui para averiguar más.</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 per año, no mas.</string>
|
||||
<string name="featureNotInFdroidVersion">Esta characteristica es basado en software libre. Por eso no esta disponsible in la versión F-Droid.</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. PARA 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>
|
||||
</resources>
|
@ -474,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>
|
||||
@ -586,4 +586,5 @@
|
||||
<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>
|
||||
</resources>
|
||||
|
@ -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>
|
@ -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>
|
||||
@ -261,7 +261,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>
|
||||
@ -507,7 +507,7 @@
|
||||
<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>
|
||||
@ -570,7 +570,7 @@
|
||||
<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>
|
||||
@ -602,11 +602,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>
|
||||
@ -631,7 +630,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>
|
||||
@ -671,7 +670,7 @@
|
||||
<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>
|
||||
@ -682,4 +681,25 @@
|
||||
<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 screwd up yet another part of Android, starting with API 30 only the currently visible wifis can be displayed. Not all the ones your device knows.</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.</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="permissionsRequiredNotAvailable">Your rules required permissions which cannot be requested from this installed flavor of Automation.</string>
|
||||
</resources>
|
@ -1,5 +1,6 @@
|
||||
<network-security-config>
|
||||
<base-config>
|
||||
<base-config
|
||||
cleartextTrafficPermitted="true">
|
||||
<trust-anchors>
|
||||
<!-- Trust preinstalled CAs -->
|
||||
<certificates src="system" />
|
||||
|
@ -5,7 +5,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.2.1'
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
4
fastlane/metadata/android/de-DE/changelogs/107.txt
Normal file
4
fastlane/metadata/android/de-DE/changelogs/107.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Übersetzungen aktualisiert.
|
||||
* Neue Aktion: Vibrieren
|
||||
* Geschwindigkeitsberechnung verbessert
|
||||
* Position der Tableiste kann gewählt werden (oben/unten)
|
1
fastlane/metadata/android/de-DE/changelogs/109.txt
Normal file
1
fastlane/metadata/android/de-DE/changelogs/109.txt
Normal file
@ -0,0 +1 @@
|
||||
* Klartext HTTP Datenverkehr für URL-Auslösen-Aktionen ermöglicht.
|
1
fastlane/metadata/android/de-DE/changelogs/110.txt
Normal file
1
fastlane/metadata/android/de-DE/changelogs/110.txt
Normal file
@ -0,0 +1 @@
|
||||
* HTTP Klartext wieder entfernt, hat nicht kompiliert.
|
1
fastlane/metadata/android/de-DE/changelogs/111.txt
Normal file
1
fastlane/metadata/android/de-DE/changelogs/111.txt
Normal file
@ -0,0 +1 @@
|
||||
* Klartext HTTP Datenverkehr für URL-Auslösen-Aktionen ermöglicht.
|
4
fastlane/metadata/android/de-DE/changelogs/112.txt
Normal file
4
fastlane/metadata/android/de-DE/changelogs/112.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Fehler im Benachrichtigungsauslöser behoben
|
||||
* WLAN Liste laden für API > 30 (soweit möglich)
|
||||
* Fehler behoben beim Hinzufügen/Ändern der SMS-senden Aktion
|
||||
* Fehler behoben beim Ändern der Text-sprechen Aktion
|
@ -39,7 +39,7 @@ Mögliche Aktionen:
|
||||
* SMS verschicken
|
||||
* Sounddatei abspielen.
|
||||
|
||||
Es ist ziemlich schwierig diese Anwendung über die vielen verschiedenen Geräte sowie die vielen Änderungen an Android Versionen am Laufen zu halten. Ich kann vieles im Emulator testen, aber eben nicht alles.
|
||||
Es ist ziemlich schwierig diese Anwendung über die vielen verschiedenen Geräte und Android Versionen am Laufen zu halten. Ich kann vieles im Emulator testen, aber eben nicht alles.
|
||||
Wenn also eine bestimmte Funktion nicht so tut wie sie sollte - lassen Sie es mich wissen. Über die Jahre habe ich noch alle Fehler behoben, die mir vernünftig gemeldet wurden. Aber dafür bin ich auf Ihre Mithilfe angewiesen.
|
||||
|
||||
Wenn Sie ein Problem mit der Anwendung haben und mich dazu kontaktieren möchten, updaten Sie bitte vorher auf die neueste Version und schauen Sie, ob Ihr Problem darin auch besteht.
|
||||
|
@ -1 +1 @@
|
||||
Automatisieren Sie Dinge auf Ihrem Ger<EFBFBD>t, indem Sie Regeln anlegen.
|
||||
Automatisieren Sie Dinge auf Ihrem Gerät, indem Sie Regeln anlegen.
|
4
fastlane/metadata/android/en-US/changelogs/107.txt
Normal file
4
fastlane/metadata/android/en-US/changelogs/107.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Translations updated.
|
||||
* New action: Vibrate
|
||||
* Improved speed calculation
|
||||
* Position of tabbar can be chosen (top/bottom)
|
4
fastlane/metadata/android/en-US/changelogs/108.txt
Normal file
4
fastlane/metadata/android/en-US/changelogs/108.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Translations updated.
|
||||
* New action: Vibrate
|
||||
* Improved speed calculation
|
||||
* Position of tab-bar can be chosen (top/bottom)
|
1
fastlane/metadata/android/en-US/changelogs/109.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/109.txt
Normal file
@ -0,0 +1 @@
|
||||
* Allowed cleartext HTTP traffic for rules using triggerUrl action
|
1
fastlane/metadata/android/en-US/changelogs/110.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/110.txt
Normal file
@ -0,0 +1 @@
|
||||
* Removed again, wouldn't compile.
|
1
fastlane/metadata/android/en-US/changelogs/111.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/111.txt
Normal file
@ -0,0 +1 @@
|
||||
* Allowed cleartext HTTP traffic for rules using triggerUrl action
|
4
fastlane/metadata/android/en-US/changelogs/112.txt
Normal file
4
fastlane/metadata/android/en-US/changelogs/112.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Fixed bug in notification trigger.
|
||||
* Load wifi list for API > 30 (as far as possible)
|
||||
* Fixed a bug when adding/editing sendTextMessage action
|
||||
* Fixed a bug when editing speakText action
|
4
fastlane/metadata/android/es-ES/112.txt
Normal file
4
fastlane/metadata/android/es-ES/112.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Error fijo en el gatillo de notificación.
|
||||
* Lista de wifi de carga para API > 30 (en la medida de lo posible)
|
||||
* Arregló un error al añadir/editar sendTextMessage acción
|
||||
* Arregló un error al editar la acción de TalkText
|
4
fastlane/metadata/android/es-ES/changelogs/107.txt
Normal file
4
fastlane/metadata/android/es-ES/changelogs/107.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Traducciones actualizadas.
|
||||
* Nueva acción: Vibrate
|
||||
* Cálculo de velocidad mejorado
|
||||
* Posición de tabbar se puede elegir (top/bottom)
|
1
fastlane/metadata/android/es-ES/changelogs/111.txt
Normal file
1
fastlane/metadata/android/es-ES/changelogs/111.txt
Normal file
@ -0,0 +1 @@
|
||||
* Permitido texto claro HTTP tráfico para reglas usando el gatillo Acción urgente
|
4
fastlane/metadata/android/it-IT/changelogs/107.txt
Normal file
4
fastlane/metadata/android/it-IT/changelogs/107.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Traduzioni aggiornate.
|
||||
* Nuova azione: Vibrate
|
||||
* Calcolo della velocità migliorato
|
||||
* La posizione della barra delle schede può essere scelta (in alto / in basso)
|
1
fastlane/metadata/android/it-IT/changelogs/111.txt
Normal file
1
fastlane/metadata/android/it-IT/changelogs/111.txt
Normal file
@ -0,0 +1 @@
|
||||
* Cleartext http traffico dati per le azioni di trigger URL abilitate.
|
4
fastlane/metadata/android/it-IT/changelogs/112.txt
Normal file
4
fastlane/metadata/android/it-IT/changelogs/112.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Corretto bug nel trigger di notifica.
|
||||
* Carica elenco wifi per API > 30 (per quanto possibile)
|
||||
* Corretto un bug quando si aggiunge / modifica l'azione di sendTextMessage
|
||||
* Corretto un bug quando si modifica l'azione del testo
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||
|
Reference in New Issue
Block a user