Compare commits
21 Commits
d1263b46b6
...
v1.7.2
Author | SHA1 | Date | |
---|---|---|---|
2a067507ae | |||
1c8eec735d | |||
53f46c10da | |||
c5f04afe85 | |||
4d7fa711f9 | |||
4bea2113fa | |||
890260b8eb | |||
230521149f | |||
9a50da550a | |||
941bb3e1af | |||
5653a9c70e | |||
8c6331237d | |||
1bbf04d548 | |||
a2d93d27cb | |||
0463e0aa19 | |||
41cf907be3 | |||
acae282a0d | |||
ebfceee69f | |||
69283c5fea | |||
fff0bde9d8 | |||
f9c76ba951 |
@ -11,8 +11,8 @@ android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.2'
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
versionCode 113
|
||||
versionName "1.6.43"
|
||||
versionCode 116
|
||||
versionName "1.7.2"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
@ -11,8 +11,8 @@
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 113,
|
||||
"versionName": "1.6.43-googlePlay",
|
||||
"versionCode": 116,
|
||||
"versionName": "1.7.2-googlePlay",
|
||||
"outputFile": "app-googlePlayFlavor-release.apk"
|
||||
}
|
||||
],
|
||||
|
@ -65,6 +65,7 @@
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
|
||||
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
@ -121,15 +122,7 @@
|
||||
<receiver android:name=".receivers.PackageReplacedReceiver"
|
||||
android:enabled="true">
|
||||
<intent-filter>
|
||||
<!--<action android:name="android.intent.action.PACKAGE_ADDED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_REPLACED" />
|
||||
<action android:name="android.intent.action.PACKAGE_REMOVED"/>
|
||||
<action android:name="android.intent.action.ACTION_PACKAGE_REPLACED" />-->
|
||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
||||
|
||||
<!--<data
|
||||
android:path="com.jens.automation2"
|
||||
android:scheme="package" />-->
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".receivers.DateTimeListener" />
|
||||
@ -154,6 +147,7 @@
|
||||
<activity android:name=".ActivityDisplayLongMessage" />
|
||||
<activity android:name=".ActivityManageActionSendTextMessage" />
|
||||
<activity android:name=".ActivityManageActionPlaySound" />
|
||||
<activity android:name=".ActivityManageTriggerProfile" />
|
||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||
<activity android:name=".ActivityMaintenance" />
|
||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||
|
@ -12,10 +12,10 @@ import android.widget.Toast;
|
||||
import com.google.android.gms.location.DetectedActivity;
|
||||
import com.jens.automation2.receivers.ActivityDetectionReceiver;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class Rule implements Comparable<Rule>
|
||||
@ -23,9 +23,9 @@ public class Rule implements Comparable<Rule>
|
||||
private static ArrayList<Rule> ruleCollection = new ArrayList<Rule>();
|
||||
public static boolean isAnyRuleActive = false;
|
||||
|
||||
private static ArrayList<Rule> ruleRunHistory = new ArrayList<Rule>();
|
||||
private static List<Rule> ruleRunHistory = new ArrayList<Rule>();
|
||||
|
||||
public static ArrayList<Rule> getRuleRunHistory()
|
||||
public static List<Rule> getRuleRunHistory()
|
||||
{
|
||||
return ruleRunHistory;
|
||||
}
|
||||
@ -833,8 +833,32 @@ public class Rule implements Comparable<Rule>
|
||||
|
||||
return ruleCandidates;
|
||||
}*/
|
||||
|
||||
public static ArrayList<Rule> findRuleCandidatesByTriggerProfile(Profile profile)
|
||||
{
|
||||
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||
|
||||
for(Rule oneRule : ruleCollection)
|
||||
{
|
||||
innerloop:
|
||||
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||
{
|
||||
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.profileActive)
|
||||
{
|
||||
String profileName = oneTrigger.getTriggerParameter2().split(triggerParameter2Split)[0];
|
||||
if(profileName.equals(profile.getName()))
|
||||
{
|
||||
ruleCandidates.add(oneRule);
|
||||
break innerloop; //if the profile is found we don't need to search the other triggers in the same rule
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ruleCandidates;
|
||||
}
|
||||
|
||||
public static ArrayList<Rule> findRuleCandidatesByProfile(Profile profile)
|
||||
public static ArrayList<Rule> findRuleCandidatesByActionProfile(Profile profile)
|
||||
{
|
||||
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||
|
||||
|
@ -51,6 +51,7 @@
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
<!-- <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />-->
|
||||
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.NFC" />
|
||||
@ -62,6 +63,7 @@
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
|
||||
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
@ -118,15 +120,7 @@
|
||||
<receiver android:name=".receivers.PackageReplacedReceiver"
|
||||
android:enabled="true">
|
||||
<intent-filter>
|
||||
<!--<action android:name="android.intent.action.PACKAGE_ADDED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_REPLACED" />
|
||||
<action android:name="android.intent.action.PACKAGE_REMOVED"/>
|
||||
<action android:name="android.intent.action.ACTION_PACKAGE_REPLACED" />-->
|
||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
||||
|
||||
<!--<data
|
||||
android:path="com.jens.automation2"
|
||||
android:scheme="package" />-->
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".receivers.DateTimeListener" />
|
||||
@ -151,6 +145,7 @@
|
||||
<activity android:name=".ActivityDisplayLongMessage" />
|
||||
<activity android:name=".ActivityManageActionSendTextMessage" />
|
||||
<activity android:name=".ActivityManageActionPlaySound" />
|
||||
<activity android:name=".ActivityManageTriggerProfile" />
|
||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||
<activity android:name=".ActivityMaintenance" />
|
||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||
@ -184,6 +179,7 @@
|
||||
</intent-filter>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<meta-data
|
||||
android:name="android.nfc.action.TECH_DISCOVERED"
|
||||
@ -217,7 +213,6 @@
|
||||
|
||||
<activity android:name=".ActivityPermissions" />
|
||||
|
||||
|
||||
<!-- https://developer.android.com/about/versions/pie/android-9.0-changes-28#apache-p-->
|
||||
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
|
||||
|
||||
|
@ -8,10 +8,11 @@ import android.os.AsyncTask;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
import java.sql.Time;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class Rule implements Comparable<Rule>
|
||||
@ -19,9 +20,9 @@ public class Rule implements Comparable<Rule>
|
||||
private static ArrayList<Rule> ruleCollection = new ArrayList<Rule>();
|
||||
public static boolean isAnyRuleActive = false;
|
||||
|
||||
private static ArrayList<Rule> ruleRunHistory = new ArrayList<Rule>();
|
||||
private static List<Rule> ruleRunHistory = new ArrayList<Rule>();
|
||||
|
||||
public static ArrayList<Rule> getRuleRunHistory()
|
||||
public static List<Rule> getRuleRunHistory()
|
||||
{
|
||||
return ruleRunHistory;
|
||||
}
|
||||
@ -805,8 +806,32 @@ public class Rule implements Comparable<Rule>
|
||||
|
||||
return ruleCandidates;
|
||||
}*/
|
||||
|
||||
public static ArrayList<Rule> findRuleCandidatesByTriggerProfile(Profile profile)
|
||||
{
|
||||
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||
|
||||
for(Rule oneRule : ruleCollection)
|
||||
{
|
||||
innerloop:
|
||||
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||
{
|
||||
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.profileActive)
|
||||
{
|
||||
String profileName = oneTrigger.getTriggerParameter2().split(triggerParameter2Split)[0];
|
||||
if(profileName.equals(profile.getName()))
|
||||
{
|
||||
ruleCandidates.add(oneRule);
|
||||
break innerloop; //if the profile is found we don't need to search the other triggers in the same rule
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ruleCandidates;
|
||||
}
|
||||
|
||||
public static ArrayList<Rule> findRuleCandidatesByProfile(Profile profile)
|
||||
public static ArrayList<Rule> findRuleCandidatesByActionProfile(Profile profile)
|
||||
{
|
||||
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||
|
||||
|
@ -64,6 +64,7 @@
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
|
||||
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@ -113,15 +114,7 @@
|
||||
<receiver android:name=".receivers.PackageReplacedReceiver"
|
||||
android:enabled="true">
|
||||
<intent-filter>
|
||||
<!--<action android:name="android.intent.action.PACKAGE_ADDED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_REPLACED" />
|
||||
<action android:name="android.intent.action.PACKAGE_REMOVED"/>
|
||||
<action android:name="android.intent.action.ACTION_PACKAGE_REPLACED" />-->
|
||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
|
||||
|
||||
<!--<data
|
||||
android:path="com.jens.automation2"
|
||||
android:scheme="package" />-->
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".receivers.DateTimeListener" />
|
||||
@ -146,6 +139,7 @@
|
||||
<activity android:name=".ActivityDisplayLongMessage" />
|
||||
<activity android:name=".ActivityManageActionSendTextMessage" />
|
||||
<activity android:name=".ActivityManageActionPlaySound" />
|
||||
<activity android:name=".ActivityManageTriggerProfile" />
|
||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||
<activity android:name=".ActivityMaintenance" />
|
||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||
@ -213,7 +207,6 @@
|
||||
|
||||
<activity android:name=".ActivityPermissions" />
|
||||
|
||||
|
||||
<!-- https://developer.android.com/about/versions/pie/android-9.0-changes-28#apache-p-->
|
||||
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
|
||||
|
||||
|
@ -12,10 +12,10 @@ import android.widget.Toast;
|
||||
import com.google.android.gms.location.DetectedActivity;
|
||||
import com.jens.automation2.receivers.ActivityDetectionReceiver;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class Rule implements Comparable<Rule>
|
||||
@ -23,9 +23,9 @@ public class Rule implements Comparable<Rule>
|
||||
private static ArrayList<Rule> ruleCollection = new ArrayList<Rule>();
|
||||
public static boolean isAnyRuleActive = false;
|
||||
|
||||
private static ArrayList<Rule> ruleRunHistory = new ArrayList<Rule>();
|
||||
private static List<Rule> ruleRunHistory = new ArrayList<Rule>();
|
||||
|
||||
public static ArrayList<Rule> getRuleRunHistory()
|
||||
public static List<Rule> getRuleRunHistory()
|
||||
{
|
||||
return ruleRunHistory;
|
||||
}
|
||||
@ -833,8 +833,32 @@ public class Rule implements Comparable<Rule>
|
||||
|
||||
return ruleCandidates;
|
||||
}*/
|
||||
|
||||
public static ArrayList<Rule> findRuleCandidatesByTriggerProfile(Profile profile)
|
||||
{
|
||||
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||
|
||||
for(Rule oneRule : ruleCollection)
|
||||
{
|
||||
innerloop:
|
||||
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||
{
|
||||
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.profileActive)
|
||||
{
|
||||
String profileName = oneTrigger.getTriggerParameter2().split(triggerParameter2Split)[0];
|
||||
if(profileName.equals(profile.getName()))
|
||||
{
|
||||
ruleCandidates.add(oneRule);
|
||||
break innerloop; //if the profile is found we don't need to search the other triggers in the same rule
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ruleCandidates;
|
||||
}
|
||||
|
||||
public static ArrayList<Rule> findRuleCandidatesByProfile(Profile profile)
|
||||
public static ArrayList<Rule> findRuleCandidatesByActionProfile(Profile profile)
|
||||
{
|
||||
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||
|
||||
|
@ -301,7 +301,7 @@ public class ActivityDetectionReceiver extends IntentService implements Automati
|
||||
* and some activities are hierarchical (ON_FOOT is a generalization of WALKING and RUNNING).
|
||||
*/
|
||||
|
||||
ArrayList<Rule> allRulesWithActivityDetection = Rule.findRuleCandidatesByActivityDetection();
|
||||
ArrayList<Rule> allRulesWithActivityDetection = Rule.findRuleCandidates(Trigger_Enum.activityDetection);
|
||||
for(int i=0; i<allRulesWithActivityDetection.size(); i++)
|
||||
{
|
||||
if(allRulesWithActivityDetection.get(i).applies(Miscellaneous.getAnyContext()))
|
||||
|
@ -153,96 +153,93 @@ public class Action
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder returnString = new StringBuilder();
|
||||
|
||||
if(this.getAction().equals(Action_Enum.setWifi))
|
||||
|
||||
switch(getAction())
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiOff));
|
||||
case setWifi:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiOff));
|
||||
break;
|
||||
case setBluetooth:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothOff));
|
||||
break;
|
||||
case setUsbTethering:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnUsbTetheringOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnUsbTetheringOff));
|
||||
break;
|
||||
case setWifiTethering:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiTetheringOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiTetheringOff));
|
||||
break;
|
||||
case setBluetoothTethering:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothTetheringOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothTetheringOff));
|
||||
break;
|
||||
case setDisplayRotation:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionEnableScreenRotation));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionDisableScreenRotation));
|
||||
break;
|
||||
case setAirplaneMode:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnAirplaneModeOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnAirplaneModeOff));
|
||||
break;
|
||||
case setDataConnection:
|
||||
if (this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSetDataConnectionOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSetDataConnectionOff));
|
||||
break;
|
||||
case startOtherActivity:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.startOtherActivity));
|
||||
break;
|
||||
case triggerUrl:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTriggerUrl));
|
||||
break;
|
||||
case speakText:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSpeakText));
|
||||
break;
|
||||
case playMusic:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionPlayMusic));
|
||||
break;
|
||||
case sendTextMessage:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.sendTextMessage));
|
||||
break;
|
||||
case turnScreenOnOrOff:
|
||||
if (getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.turnScreenOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.turnScreenOff));
|
||||
break;
|
||||
case playSound:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.playSound));
|
||||
break;
|
||||
case changeSoundProfile:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionChangeSoundProfile));
|
||||
break;
|
||||
case waitBeforeNextAction:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.waitBeforeNextAction));
|
||||
break;
|
||||
case setScreenBrightness:
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.setScreenBrightness));
|
||||
break;
|
||||
default:
|
||||
returnString.append(action.toString());
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setBluetooth))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setUsbTethering))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnUsbTetheringOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnUsbTetheringOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setWifiTethering))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiTetheringOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnWifiTetheringOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setBluetoothTethering))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothTetheringOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnBluetoothTetheringOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setDisplayRotation))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionEnableScreenRotation));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionDisableScreenRotation));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setAirplaneMode))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnAirplaneModeOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTurnAirplaneModeOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setDataConnection))
|
||||
{
|
||||
if(this.getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSetDataConnectionOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSetDataConnectionOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.startOtherActivity))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.startOtherActivity));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.triggerUrl))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionTriggerUrl));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.speakText))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionSpeakText));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.playMusic))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionPlayMusic));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.sendTextMessage))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.sendTextMessage));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.turnScreenOnOrOff))
|
||||
{
|
||||
if(getParameter1())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.turnScreenOn));
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.turnScreenOff));
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.playSound))
|
||||
{
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.playSound));
|
||||
}
|
||||
else
|
||||
returnString.append(action.toString());
|
||||
|
||||
if(this.getAction().equals(Action_Enum.triggerUrl))
|
||||
{
|
||||
@ -252,7 +249,7 @@ public class Action
|
||||
returnString.append(": " + components[2]);
|
||||
|
||||
if(parameter1)
|
||||
returnString.append(" using authentication.");
|
||||
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.usingAuthentication) + ".");
|
||||
}
|
||||
else
|
||||
returnString.append(": " + components[0]);
|
||||
@ -266,14 +263,14 @@ public class Action
|
||||
String[] components = parameter2.split(Actions.smsSeparator);
|
||||
if(components.length >= 2)
|
||||
{
|
||||
returnString.append(" to number " + components[0]);
|
||||
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.toNumber) + " " + components[0]);
|
||||
|
||||
returnString.append(". Message: " + components[1]);
|
||||
returnString.append(". " + Miscellaneous.getAnyContext().getResources().getString(R.string.message) + ": " + components[1]);
|
||||
}
|
||||
}
|
||||
else if(this.getAction().equals(Action_Enum.setScreenBrightness))
|
||||
{
|
||||
returnString.append(" to ");
|
||||
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.to) + " ");
|
||||
|
||||
if(parameter1)
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.brightnessAuto));
|
||||
|
@ -687,14 +687,14 @@ public class Actions
|
||||
|
||||
AudioManager myAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
||||
|
||||
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);
|
||||
// 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)
|
||||
|
@ -9,7 +9,6 @@ import com.jens.automation2.R.layout;
|
||||
|
||||
public class ActivityHelp extends Activity
|
||||
{
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
@ -19,5 +18,4 @@ public class ActivityHelp extends Activity
|
||||
TextView tvHelpTextEnergySaving = (TextView) findViewById(R.id.tvHelpTextEnergySaving);
|
||||
tvHelpTextEnergySaving.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -184,8 +184,16 @@ public class ActivityMainProfiles extends ActivityGeneric
|
||||
startActivityForResult(manageSpecificProfileIntent, 2000);
|
||||
break;
|
||||
case 2:
|
||||
if(profile.delete(myAutomationService))
|
||||
updateListView();
|
||||
Rule user = profile.isInUseByRules();
|
||||
if(user == null)
|
||||
{
|
||||
if (profile.delete(ActivityMainProfiles.this))
|
||||
updateListView();
|
||||
else
|
||||
Toast.makeText(ActivityMainProfiles.this, getResources().getString(R.string.profileCouldNotBeDeleted), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
else
|
||||
Toast.makeText(ActivityMainProfiles.this, String.format(getResources().getString(R.string.ruleXIsUsingProfileY), user.getName(), profile.getName()), Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -230,44 +230,89 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
return null;
|
||||
}
|
||||
|
||||
private AlertDialog getActionStartActivityDialog1()
|
||||
private AlertDialog getActionStartActivityDialog1Application()
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.selectApplication));
|
||||
final String[] applicationArray = ActivityManageActionStartActivity.getApplicationNameListString(this);
|
||||
alertDialogBuilder.setItems(applicationArray, new DialogInterface.OnClickListener()
|
||||
{
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
dialog.dismiss();
|
||||
getActionStartActivityDialog2(applicationArray[which]).show();
|
||||
getActionStartActivityDialog2(applicationArray[which]);
|
||||
}
|
||||
});
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
private AlertDialog getActionStartActivityDialog2(String applicationName)
|
||||
private void getActionStartActivityDialog2(String applicationName)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.selectPackageOfApplication));
|
||||
final String[] packageArray = ActivityManageActionStartActivity.getPackageListString(this, applicationName);
|
||||
alertDialogBuilder.setItems(packageArray, new DialogInterface.OnClickListener()
|
||||
{
|
||||
if(packageArray.length > 1)
|
||||
{
|
||||
alertDialogBuilder.setItems(packageArray, new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
getActionStartActivityDialog4ActivityPickMethod(packageArray[which]).show();
|
||||
}
|
||||
});
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
alertDialog.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
getActionStartActivityDialog4ActivityPickMethod(packageArray[0]).show();
|
||||
}
|
||||
}
|
||||
|
||||
private AlertDialog getActionStartActivityDialog4ActivityPickMethod(final String packageName)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
alertDialogBuilder.setMessage(getResources().getString(R.string.launcherOrManualExplanation));
|
||||
alertDialogBuilder.setPositiveButton(getResources().getString(R.string.takeLauncherActivity), new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
getActionStartActivityDialog3(packageArray[which]).show();
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.hint), getResources().getString(R.string.chooseActivityHint), ActivityManageActionStartActivity.this).show();
|
||||
|
||||
// Pick the launcher automatically
|
||||
Intent launchIntent = getPackageManager().getLaunchIntentForPackage(packageName);
|
||||
if (launchIntent != null)
|
||||
{
|
||||
ActivityInfo ai = ActivityManageActionStartActivity.getActivityInfoForPackageNameAndActivityName(packageName, launchIntent.getComponent().getClassName());
|
||||
etPackageName.setText(ai.packageName);
|
||||
etActivityOrActionPath.setText(ai.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
getActionStartActivityDialog5Activity(packageName).show();
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.hint), getResources().getString(R.string.launcherNotFound) + Miscellaneous.lineSeparator + getResources().getString(R.string.chooseActivityHint), ActivityManageActionStartActivity.this).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
alertDialogBuilder.setNegativeButton(getResources().getString(R.string.pickActivityManually), new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
getActionStartActivityDialog5Activity(packageName).show();
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.hint), getResources().getString(R.string.chooseActivityHint), ActivityManageActionStartActivity.this).show();
|
||||
}
|
||||
});
|
||||
|
||||
final String activityArray[] = ActivityManageActionStartActivity.getActivityListForPackageName(packageName);
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
private AlertDialog getActionStartActivityDialog3(final String packageName)
|
||||
|
||||
private AlertDialog getActionStartActivityDialog5Activity(final String packageName)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.selectActivityToBeStarted));
|
||||
@ -283,7 +328,6 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
}
|
||||
});
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
@ -598,7 +642,6 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
}
|
||||
});
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
@ -615,9 +658,7 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
protected void onPostExecute(Void result)
|
||||
{
|
||||
progressDialog.dismiss();
|
||||
getActionStartActivityDialog1().show();
|
||||
getActionStartActivityDialog1Application().show();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -3,7 +3,6 @@ package com.jens.automation2;
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
@ -14,6 +13,7 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.InputType;
|
||||
import android.text.util.Linkify;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
@ -50,34 +50,35 @@ public class ActivityManageRule extends Activity
|
||||
{
|
||||
final static String activityDetectionClassPath = "com.jens.automation2.receivers.ActivityDetectionReceiver";
|
||||
public final static String intentNameTriggerParameter1 = "triggerParameter1";
|
||||
public final static String intentNameTriggerParameter2 = "triggerParameter2";
|
||||
public final static String intentNameActionParameter1 = "actionParameter1";
|
||||
public final static String intentNameActionParameter2 = "actionParameter2";
|
||||
|
||||
public Context context;
|
||||
private Button cmdTriggerAdd, cmdActionAdd, cmdSaveRule;
|
||||
private ListView triggerListView, actionListView;
|
||||
private EditText etRuleName;
|
||||
private CheckBox chkRuleActive, chkRuleToggle;
|
||||
private static ActivityManageRule instance = null;
|
||||
Button cmdTriggerAdd, cmdActionAdd, cmdSaveRule;
|
||||
ListView triggerListView, actionListView;
|
||||
EditText etRuleName;
|
||||
CheckBox chkRuleActive, chkRuleToggle;
|
||||
static ActivityManageRule instance = null;
|
||||
ImageView imageHelpButton;
|
||||
|
||||
private static ProgressDialog progressDialog = null;
|
||||
static ProgressDialog progressDialog = null;
|
||||
|
||||
private static Trigger_Enum triggerType;
|
||||
private static boolean triggerParameter;
|
||||
private static PointOfInterest triggerPoi;
|
||||
private static String triggerProcess;
|
||||
private static int triggerBattery;
|
||||
private static double triggerSpeed;
|
||||
private static double triggerNoise;
|
||||
private static TimeFrame triggerTimeFrame;
|
||||
private static String triggerWifiName;
|
||||
static Trigger_Enum triggerType;
|
||||
static boolean triggerParameter;
|
||||
static PointOfInterest triggerPoi;
|
||||
static String triggerProcess;
|
||||
static int triggerBattery;
|
||||
static double triggerSpeed;
|
||||
static double triggerNoise;
|
||||
static TimeFrame triggerTimeFrame;
|
||||
static String triggerWifiName;
|
||||
|
||||
private static Rule ruleToEdit;
|
||||
private static boolean newRule;
|
||||
static Rule ruleToEdit;
|
||||
static boolean newRule;
|
||||
|
||||
private static Trigger newTrigger;
|
||||
private static Action newAction;
|
||||
static Trigger newTrigger;
|
||||
static Action newAction;
|
||||
|
||||
ArrayAdapter<Trigger> triggerListViewAdapter;
|
||||
ArrayAdapter<Action> actionListViewAdapter;
|
||||
@ -106,6 +107,8 @@ public class ActivityManageRule extends Activity
|
||||
final static int requestCodeActionPlaySoundEdit = 502;
|
||||
final static int requestCodeTriggerPhoneCallAdd = 601;
|
||||
final static int requestCodeTriggerPhoneCallEdit = 602;
|
||||
final static int requestCodeTriggerProfileAdd = 603;
|
||||
final static int requestCodeTriggerProfileEdit = 604;
|
||||
final static int requestCodeTriggerWifiAdd = 723;
|
||||
final static int requestCodeTriggerWifiEdit = 724;
|
||||
final static int requestCodeActionSendTextMessageAdd = 5001;
|
||||
@ -271,11 +274,17 @@ public class ActivityManageRule extends Activity
|
||||
phoneCallEditor.putExtra("edit", true);
|
||||
startActivityForResult(phoneCallEditor, requestCodeTriggerPhoneCallEdit);
|
||||
break;
|
||||
case profileActive:
|
||||
Intent profileActiveEditor = new Intent(ActivityManageRule.this, ActivityManageTriggerProfile.class);
|
||||
profileActiveEditor.putExtra(ActivityManageRule.intentNameTriggerParameter1, selectedTrigger.getTriggerParameter());
|
||||
profileActiveEditor.putExtra(ActivityManageRule.intentNameTriggerParameter2, selectedTrigger.getTriggerParameter2());
|
||||
startActivityForResult(profileActiveEditor, requestCodeTriggerProfileEdit);
|
||||
break;
|
||||
case wifiConnection:
|
||||
Intent wifiEditor = new Intent(ActivityManageRule.this, ActivityManageTriggerWifi.class);
|
||||
wifiEditor.putExtra("edit", true);
|
||||
wifiEditor.putExtra("wifiState", selectedTrigger.getTriggerParameter());
|
||||
wifiEditor.putExtra("wifiName", selectedTrigger.getTriggerParameter2());
|
||||
wifiEditor.putExtra(ActivityManageTriggerWifi.intentNameWifiState, selectedTrigger.getTriggerParameter());
|
||||
wifiEditor.putExtra(ActivityManageTriggerWifi.intentNameWifiName, selectedTrigger.getTriggerParameter2());
|
||||
startActivityForResult(wifiEditor, requestCodeTriggerWifiEdit);
|
||||
break;
|
||||
case deviceOrientation:
|
||||
@ -285,7 +294,7 @@ public class ActivityManageRule extends Activity
|
||||
startActivityForResult(devicePositionEditor, requestCodeTriggerDeviceOrientationEdit);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -496,6 +505,8 @@ public class ActivityManageRule extends Activity
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.notification));
|
||||
else if(types[i].toString().equals(Trigger_Enum.deviceOrientation.toString()))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.smartphone));
|
||||
else if(types[i].toString().equals(Trigger_Enum.profileActive.toString()))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.sound));
|
||||
else
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.placeholder));
|
||||
}
|
||||
@ -568,7 +579,6 @@ public class ActivityManageRule extends Activity
|
||||
Intent wifiTriggerEditor = new Intent(myContext, ActivityManageTriggerWifi.class);
|
||||
startActivityForResult(wifiTriggerEditor, requestCodeTriggerWifiAdd);
|
||||
return;
|
||||
// booleanChoices = new String[]{getResources().getString(R.string.started), getResources().getString(R.string.stopped)};
|
||||
}
|
||||
else if(triggerType == Trigger_Enum.deviceOrientation)
|
||||
{
|
||||
@ -576,10 +586,7 @@ public class ActivityManageRule extends Activity
|
||||
Intent devicePositionTriggerEditor = new Intent(myContext, ActivityManageTriggerDeviceOrientation.class);
|
||||
startActivityForResult(devicePositionTriggerEditor, requestCodeTriggerDeviceOrientationAdd);
|
||||
return;
|
||||
// booleanChoices = new String[]{getResources().getString(R.string.started), getResources().getString(R.string.stopped)};
|
||||
}
|
||||
// else if(triggerType == Trigger_Enum.wifiConnection)
|
||||
// booleanChoices = new String[]{getResources().getString(R.string.connected), getResources().getString(R.string.disconnected)};
|
||||
else if(triggerType == Trigger_Enum.process_started_stopped)
|
||||
booleanChoices = new String[]{getResources().getString(R.string.started), getResources().getString(R.string.stopped)};
|
||||
else if(triggerType == Trigger_Enum.notification)
|
||||
@ -599,7 +606,21 @@ public class ActivityManageRule extends Activity
|
||||
Intent phoneTriggerEditor = new Intent(myContext, ActivityManageTriggerPhoneCall.class);
|
||||
startActivityForResult(phoneTriggerEditor, requestCodeTriggerPhoneCallAdd);
|
||||
return;
|
||||
// booleanChoices = new String[]{getResources().getString(R.string.started), getResources().getString(R.string.stopped)};
|
||||
}
|
||||
else if(triggerType == Trigger_Enum.profileActive)
|
||||
{
|
||||
if(Profile.getProfileCollection().size() > 0)
|
||||
{
|
||||
newTrigger.setTriggerType(Trigger_Enum.profileActive);
|
||||
Intent profileTriggerEditor = new Intent(myContext, ActivityManageTriggerProfile.class);
|
||||
startActivityForResult(profileTriggerEditor, requestCodeTriggerProfileAdd);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Toast.makeText(context, getResources().getString(R.string.noProfilesCreateOneFirst), Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(triggerType == Trigger_Enum.activityDetection)
|
||||
{
|
||||
@ -622,7 +643,7 @@ public class ActivityManageRule extends Activity
|
||||
}
|
||||
catch (IllegalAccessException | InvocationTargetException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
Miscellaneous.logEvent("w", "ActivityDetection", "Either play services are not available or the ActivityDetection classes are not. " + Log.getStackTraceString(e), 4);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1030,7 +1051,6 @@ public class ActivityManageRule extends Activity
|
||||
@Override
|
||||
protected String[] doInBackground(ActivityManageRule... params)
|
||||
{
|
||||
// Looper.prepare();
|
||||
final String[] applicationArray = ActivityManageActionStartActivity.getApplicationNameListString(params[0]);
|
||||
return applicationArray;
|
||||
}
|
||||
@ -1166,8 +1186,8 @@ public class ActivityManageRule extends Activity
|
||||
{
|
||||
if(resultCode == RESULT_OK)
|
||||
{
|
||||
newTrigger.setTriggerParameter(data.getBooleanExtra("wifiState", false));
|
||||
newTrigger.setTriggerParameter2(data.getStringExtra("wifiName"));
|
||||
newTrigger.setTriggerParameter(data.getBooleanExtra(ActivityManageTriggerWifi.intentNameWifiState, false));
|
||||
newTrigger.setTriggerParameter2(data.getStringExtra(ActivityManageTriggerWifi.intentNameWifiName));
|
||||
newTrigger.setParentRule(ruleToEdit);
|
||||
ruleToEdit.getTriggerSet().add(newTrigger);
|
||||
this.refreshTriggerList();
|
||||
@ -1179,8 +1199,8 @@ public class ActivityManageRule extends Activity
|
||||
{
|
||||
Trigger editedTrigger = new Trigger();
|
||||
editedTrigger.setTriggerType(Trigger_Enum.wifiConnection);
|
||||
editedTrigger.setTriggerParameter(data.getBooleanExtra("wifiState", false));
|
||||
editedTrigger.setTriggerParameter2(data.getStringExtra("wifiName"));
|
||||
editedTrigger.setTriggerParameter(data.getBooleanExtra(ActivityManageTriggerWifi.intentNameWifiState, false));
|
||||
editedTrigger.setTriggerParameter2(data.getStringExtra(ActivityManageTriggerWifi.intentNameWifiName));
|
||||
editedTrigger.setParentRule(ruleToEdit);
|
||||
ruleToEdit.getTriggerSet().set(editIndex, editedTrigger);
|
||||
this.refreshTriggerList();
|
||||
@ -1228,13 +1248,13 @@ public class ActivityManageRule extends Activity
|
||||
{
|
||||
ruleToEdit.getTriggerSet().add(newTrigger);
|
||||
|
||||
newTrigger.setTriggerParameter(data.getBooleanExtra("direction", false));
|
||||
newTrigger.setTriggerParameter(data.getBooleanExtra(ActivityManageTriggerNotification.intentNameNotificationDirection, false));
|
||||
newTrigger.setTriggerParameter2(
|
||||
data.getStringExtra("app") + Trigger.triggerParameter2Split +
|
||||
data.getStringExtra("titleDir") + Trigger.triggerParameter2Split +
|
||||
data.getStringExtra("title") + Trigger.triggerParameter2Split +
|
||||
data.getStringExtra("textDir") + Trigger.triggerParameter2Split +
|
||||
data.getStringExtra("text")
|
||||
data.getStringExtra(ActivityManageTriggerNotification.intentNameNotificationApp) + Trigger.triggerParameter2Split +
|
||||
data.getStringExtra(ActivityManageTriggerNotification.intentNameNotificationTitleDir) + Trigger.triggerParameter2Split +
|
||||
data.getStringExtra(ActivityManageTriggerNotification.intentNameNotificationTitle) + Trigger.triggerParameter2Split +
|
||||
data.getStringExtra(ActivityManageTriggerNotification.intentNameNotificationTextDir) + Trigger.triggerParameter2Split +
|
||||
data.getStringExtra(ActivityManageTriggerNotification.intentNameNotificationText)
|
||||
);
|
||||
newTrigger.setParentRule(ruleToEdit);
|
||||
this.refreshTriggerList();
|
||||
@ -1428,6 +1448,30 @@ public class ActivityManageRule extends Activity
|
||||
this.refreshTriggerList();
|
||||
}
|
||||
}
|
||||
else if(requestCode == requestCodeTriggerProfileAdd)
|
||||
{
|
||||
if(resultCode == RESULT_OK)
|
||||
{
|
||||
newTrigger.setTriggerParameter(data.getBooleanExtra(ActivityManageRule.intentNameTriggerParameter1, true));
|
||||
newTrigger.setTriggerParameter2(data.getStringExtra(ActivityManageRule.intentNameTriggerParameter2));
|
||||
newTrigger.setParentRule(ruleToEdit);
|
||||
ruleToEdit.getTriggerSet().add(newTrigger);
|
||||
this.refreshTriggerList();
|
||||
}
|
||||
}
|
||||
else if(requestCode == requestCodeTriggerProfileEdit)
|
||||
{
|
||||
if(resultCode == RESULT_OK)
|
||||
{
|
||||
Trigger editedTrigger = new Trigger();
|
||||
editedTrigger.setTriggerType(Trigger_Enum.profileActive);
|
||||
editedTrigger.setTriggerParameter(data.getBooleanExtra(ActivityManageRule.intentNameTriggerParameter1, true));
|
||||
editedTrigger.setTriggerParameter2(data.getStringExtra(ActivityManageRule.intentNameTriggerParameter2));
|
||||
editedTrigger.setParentRule(ruleToEdit);
|
||||
ruleToEdit.getTriggerSet().set(editIndex, editedTrigger);
|
||||
this.refreshTriggerList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected AlertDialog getActionTypeDialog()
|
||||
|
@ -43,7 +43,7 @@ public class ActivityManageTriggerDeviceOrientation extends Activity
|
||||
{
|
||||
desiredAzimuth = Float.parseFloat(etDesiredAzimuth.getText().toString());
|
||||
desiredAzimuthTolerance = Float.parseFloat(etDesiredAzimuthTolerance.getText().toString());
|
||||
if (Math.abs(azimuth) <= Math.abs(desiredAzimuth - desiredAzimuthTolerance) || Math.abs(azimuth) <= desiredAzimuth + desiredAzimuthTolerance)
|
||||
if (desiredAzimuthTolerance == 180 || (desiredAzimuth - desiredAzimuthTolerance <= azimuth && azimuth <= desiredAzimuth + desiredAzimuthTolerance))
|
||||
{
|
||||
tvAppliesAzimuth.setText(getResources().getString(R.string.yes));
|
||||
tvAppliesAzimuth.setTextColor(Color.GREEN);
|
||||
@ -63,7 +63,7 @@ public class ActivityManageTriggerDeviceOrientation extends Activity
|
||||
{
|
||||
desiredPitch = Float.parseFloat(etDesiredPitch.getText().toString());
|
||||
desiredPitchTolerance = Float.parseFloat(etDesiredPitchTolerance.getText().toString());
|
||||
if (Math.abs(pitch) <= Math.abs(desiredPitch - desiredPitchTolerance) || Math.abs(pitch) <= desiredPitch + desiredPitchTolerance)
|
||||
if (desiredPitchTolerance == 180 || (desiredPitch - desiredPitchTolerance <= pitch && pitch <= desiredPitch + desiredPitchTolerance))
|
||||
{
|
||||
tvAppliesPitch.setText(getResources().getString(R.string.yes));
|
||||
tvAppliesPitch.setTextColor(Color.GREEN);
|
||||
@ -83,7 +83,7 @@ public class ActivityManageTriggerDeviceOrientation extends Activity
|
||||
{
|
||||
desiredRoll = Float.parseFloat(etDesiredRoll.getText().toString());
|
||||
desiredRollTolerance = Float.parseFloat(etDesiredRollTolerance.getText().toString());
|
||||
if (Math.abs(roll) <= Math.abs(desiredRoll - desiredRollTolerance) || Math.abs(roll) <= desiredRoll + desiredRollTolerance)
|
||||
if (desiredRollTolerance == 180 || (desiredRoll - desiredRollTolerance <= roll && roll <= desiredRoll + desiredRollTolerance))
|
||||
{
|
||||
tvAppliesRoll.setText(getResources().getString(R.string.yes));
|
||||
tvAppliesRoll.setTextColor(Color.GREEN);
|
||||
@ -159,14 +159,16 @@ public class ActivityManageTriggerDeviceOrientation extends Activity
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
// Round the values. Too long decimals will destroy the layout
|
||||
|
||||
if(!StringUtils.isEmpty(currentAzimuth.getText()))
|
||||
etDesiredAzimuth.setText(currentAzimuth.getText());
|
||||
etDesiredAzimuth.setText(String.valueOf(Math.round(Float.parseFloat(currentAzimuth.getText().toString()))));
|
||||
|
||||
if(!StringUtils.isEmpty(currentPitch.getText()))
|
||||
etDesiredPitch.setText(currentPitch.getText());
|
||||
etDesiredPitch.setText(String.valueOf(Math.round(Float.parseFloat(currentPitch.getText().toString()))));
|
||||
|
||||
if(!StringUtils.isEmpty(currentRoll.getText()))
|
||||
etDesiredRoll.setText(currentRoll.getText());
|
||||
etDesiredRoll.setText(String.valueOf(Math.round(Float.parseFloat(currentRoll.getText().toString()))));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -31,6 +31,13 @@ import static com.jens.automation2.Trigger.triggerParameter2Split;
|
||||
|
||||
public class ActivityManageTriggerNotification extends Activity
|
||||
{
|
||||
public static final String intentNameNotificationApp = "app";
|
||||
public static final String intentNameNotificationTitleDir = "titleDir";
|
||||
public static final String intentNameNotificationTitle = "title";
|
||||
public static final String intentNameNotificationTextDir = "textDir";
|
||||
public static final String intentNameNotificationText = "text";
|
||||
public static final String intentNameNotificationDirection = "direction";
|
||||
|
||||
public static Trigger editedNotificationTrigger;
|
||||
boolean edit = false;
|
||||
ProgressDialog progressDialog = null;
|
||||
@ -323,12 +330,12 @@ public class ActivityManageTriggerNotification extends Activity
|
||||
else
|
||||
{
|
||||
Intent data = new Intent();
|
||||
data.putExtra("direction", chkNotificationDirection.isChecked());
|
||||
data.putExtra("app", app);
|
||||
data.putExtra("titleDir", titleDir);
|
||||
data.putExtra("title", title);
|
||||
data.putExtra("textDir", textDir);
|
||||
data.putExtra("text", text);
|
||||
data.putExtra(intentNameNotificationDirection, chkNotificationDirection.isChecked());
|
||||
data.putExtra(intentNameNotificationApp, app);
|
||||
data.putExtra(intentNameNotificationTitleDir, titleDir);
|
||||
data.putExtra(intentNameNotificationTitle, title);
|
||||
data.putExtra(intentNameNotificationTextDir, textDir);
|
||||
data.putExtra(intentNameNotificationText, text);
|
||||
ActivityManageTriggerNotification.this.setResult(RESULT_OK, data);
|
||||
}
|
||||
|
||||
@ -395,4 +402,4 @@ public class ActivityManageTriggerNotification extends Activity
|
||||
getActionStartActivityDialog1().show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ActivityManageTriggerProfile extends Activity
|
||||
{
|
||||
public static final String profileFieldName = "profileName";
|
||||
|
||||
boolean editMode = false;
|
||||
|
||||
Button bSaveTriggerProfile;
|
||||
Spinner spinnerProfiles;
|
||||
CheckBox chkProfileActive, chkProfileCheckSettings;
|
||||
|
||||
ArrayAdapter<Profile> profileSpinnerAdapter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_manage_trigger_profile);
|
||||
|
||||
bSaveTriggerProfile = (Button)findViewById(R.id.bSaveTriggerProfile);
|
||||
spinnerProfiles = (Spinner)findViewById(R.id.spinnerProfiles);
|
||||
chkProfileActive = (CheckBox)findViewById(R.id.chkProfileActive);
|
||||
chkProfileCheckSettings = (CheckBox)findViewById(R.id.chkProfileCheckSettings);
|
||||
|
||||
try
|
||||
{
|
||||
profileSpinnerAdapter = new ArrayAdapter<Profile>(this, R.layout.text_view_for_poi_listview_mediumtextsize, Profile.getProfileCollection());
|
||||
loadProfileItems();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("w", "ActivityManageTriggerProfile", Log.getStackTraceString(e), 1);
|
||||
}
|
||||
|
||||
if(getIntent().hasExtra(ActivityManageRule.intentNameTriggerParameter2))
|
||||
{
|
||||
editMode = true;
|
||||
|
||||
boolean active = getIntent().getBooleanExtra(ActivityManageRule.intentNameTriggerParameter1, true);
|
||||
chkProfileActive.setChecked(active);
|
||||
|
||||
try
|
||||
{
|
||||
String values[] = getIntent().getStringExtra(ActivityManageRule.intentNameTriggerParameter2).split(Trigger.triggerParameter2Split);
|
||||
if(values.length >= 2)
|
||||
{
|
||||
boolean checkSettings = Boolean.parseBoolean(values[0]);
|
||||
chkProfileCheckSettings.setChecked(checkSettings);
|
||||
|
||||
String profileName = values[0];
|
||||
|
||||
List<Profile> profileList = Profile.getProfileCollection();
|
||||
for(int i = 0; i < profileList.size(); i++)
|
||||
{
|
||||
if(profileList.get(i).getName().equals(profileName))
|
||||
{
|
||||
spinnerProfiles.setSelection(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Toast.makeText(ActivityManageTriggerProfile.this, getResources().getString(R.string.triggerWrong), Toast.LENGTH_SHORT).show();
|
||||
Miscellaneous.logEvent("e", "ActivityManageTriggerProfile", "There\'s something wrong with parameters. Content: " + getIntent().getStringExtra(ActivityManageRule.intentNameActionParameter2) + ", " + Log.getStackTraceString(e), 1);
|
||||
}
|
||||
}
|
||||
|
||||
bSaveTriggerProfile.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
Intent returnData = new Intent();
|
||||
returnData.putExtra(ActivityManageRule.intentNameTriggerParameter1, chkProfileActive.isChecked());
|
||||
returnData.putExtra(ActivityManageRule.intentNameTriggerParameter2,
|
||||
spinnerProfiles.getSelectedItem().toString() + Trigger.triggerParameter2Split +
|
||||
chkProfileCheckSettings.isChecked());
|
||||
|
||||
setResult(RESULT_OK, returnData);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void loadProfileItems()
|
||||
{
|
||||
try
|
||||
{
|
||||
if(spinnerProfiles.getAdapter() == null)
|
||||
spinnerProfiles.setAdapter(profileSpinnerAdapter);
|
||||
|
||||
profileSpinnerAdapter.notifyDataSetChanged();
|
||||
}
|
||||
catch(NullPointerException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
@ -35,6 +35,9 @@ import java.util.List;
|
||||
|
||||
public class ActivityManageTriggerWifi extends Activity
|
||||
{
|
||||
public final static String intentNameWifiState = "wifiState";
|
||||
public final static String intentNameWifiName = "wifiName";
|
||||
|
||||
RadioButton rbTriggerWifiConnected, rbTriggerWifiDisconnected;
|
||||
EditText etTriggerWifiName;
|
||||
Spinner spinnerWifiList;
|
||||
|
@ -3,7 +3,6 @@ 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.app.admin.DevicePolicyManager;
|
||||
import android.content.ComponentName;
|
||||
@ -16,14 +15,13 @@ import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.PowerManager;
|
||||
import android.provider.Settings;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
|
||||
import com.jens.automation2.receivers.NotificationListener;
|
||||
|
||||
@ -48,6 +46,7 @@ public class ActivityPermissions extends Activity
|
||||
private static final int requestCodeForPermissionsBackgroundLocation = 12045;
|
||||
private static final int requestCodeForPermissionsNotifications = 12046;
|
||||
private static final int requestCodeForPermissionsDeviceAdmin = 12047;
|
||||
private static final int requestCodeForPermissionsBatteryOptimization = 12048;
|
||||
protected String[] specificPermissionsToRequest = null;
|
||||
|
||||
public static String intentExtraName = "permissionsToBeRequested";
|
||||
@ -288,6 +287,12 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
return haveDeviceAdmin();
|
||||
}
|
||||
else if (s.equals(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS))
|
||||
{
|
||||
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
String packageName = context.getApplicationContext().getPackageName();
|
||||
return pm.isIgnoringBatteryOptimizations(packageName);
|
||||
}
|
||||
else
|
||||
{
|
||||
int res = context.checkCallingOrSelfPermission(s);
|
||||
@ -301,8 +306,7 @@ public class ActivityPermissions extends Activity
|
||||
public static boolean haveDeviceAdmin()
|
||||
{
|
||||
DevicePolicyManager deviceManger = (DevicePolicyManager)Miscellaneous.getAnyContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
|
||||
// ComponentName compName = new ComponentName(ActivityPermissions.getInstance(), DeviceAdmin.class ) ;
|
||||
ComponentName compName = new ComponentName(Miscellaneous.getAnyContext(), DeviceAdmin.class) ;
|
||||
ComponentName compName = new ComponentName(Miscellaneous.getAnyContext(), DeviceAdmin.class);
|
||||
boolean active = deviceManger.isAdminActive(compName);
|
||||
return active;
|
||||
}
|
||||
@ -311,11 +315,7 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
if(!haveDeviceAdmin())
|
||||
{
|
||||
// deviceManger.removeActiveAdmin(compName);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
DevicePolicyManager deviceManger = (DevicePolicyManager)Miscellaneous.getAnyContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
|
||||
// DevicePolicyManager deviceManger = (DevicePolicyManager)Miscellaneous.getAnyContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
|
||||
ComponentName compName = new ComponentName(ActivityPermissions.getInstance(), DeviceAdmin.class) ;
|
||||
|
||||
Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN );
|
||||
@ -341,20 +341,18 @@ public class ActivityPermissions extends Activity
|
||||
addToArrayListUnique("android.permission.RECEIVE_BOOT_COMPLETED", requiredPermissions);
|
||||
*/
|
||||
|
||||
// if (!havePermission(ActivityPermissions.writeExternalStoragePermissionName, workingContext))
|
||||
// addToArrayListUnique(ActivityPermissions.writeExternalStoragePermissionName, requiredPermissions);
|
||||
|
||||
if(!havePermission(Manifest.permission.WRITE_SETTINGS, workingContext))
|
||||
{
|
||||
for (Profile profile : Profile.getProfileCollection())
|
||||
{
|
||||
if (profile.changeIncomingCallsRingtone)
|
||||
{
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!havePermission(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, workingContext))
|
||||
addToArrayListUnique(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, requiredPermissions);
|
||||
|
||||
if (!onlyGeneral)
|
||||
{
|
||||
for (Rule rule : Rule.getRuleCollection())
|
||||
@ -366,9 +364,9 @@ public class ActivityPermissions extends Activity
|
||||
|
||||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
||
|
||||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
||
|
||||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_COARSE_LOCATION)
|
||||
singlePermission.equalsIgnoreCase(Manifest.permission.ACCESS_COARSE_LOCATION)
|
||||
)
|
||||
{
|
||||
if (!Miscellaneous.googleToBlameForLocation(true))
|
||||
@ -859,6 +857,9 @@ public class ActivityPermissions extends Activity
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnScreenOnOrOff))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
break;
|
||||
case Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS:
|
||||
usingElements.add(getResources().getString(R.string.recommendedForBetterReliability));
|
||||
break;
|
||||
}
|
||||
|
||||
return usingElements;
|
||||
@ -885,6 +886,7 @@ public class ActivityPermissions extends Activity
|
||||
requestPermissions(cachedPermissionsToRequest, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (requestCode == requestCodeForPermissionsDeviceAdmin)
|
||||
{
|
||||
NotificationManager mNotificationManager = (NotificationManager) ActivityPermissions.this.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
@ -905,6 +907,10 @@ public class ActivityPermissions extends Activity
|
||||
if (requestCode == requestCodeForPermissionsNotifications)
|
||||
if(havePermission(Manifest.permission.BIND_NOTIFICATION_LISTENER_SERVICE, ActivityPermissions.this))
|
||||
requestPermissions(cachedPermissionsToRequest, true);
|
||||
|
||||
if (requestCode == requestCodeForPermissionsBatteryOptimization)
|
||||
if(havePermission(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS, ActivityPermissions.this))
|
||||
requestPermissions(cachedPermissionsToRequest, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -974,10 +980,20 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
requiredPermissions.remove(s);
|
||||
cachedPermissionsToRequest = requiredPermissions;
|
||||
Intent intent = new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS");
|
||||
Intent intent = new Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS);
|
||||
startActivityForResult(intent, requestCodeForPermissionsNotifications);
|
||||
return;
|
||||
}
|
||||
else if(s.equals(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS))
|
||||
{
|
||||
requiredPermissions.remove(s);
|
||||
cachedPermissionsToRequest = requiredPermissions;
|
||||
String packageName = getApplicationContext().getPackageName();
|
||||
Intent intent = new Intent(android.provider.Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
|
||||
intent.setData(Uri.parse("package:" + packageName));
|
||||
startActivityForResult(intent, requestCodeForPermissionsBatteryOptimization);
|
||||
return;
|
||||
}
|
||||
else if (s.equalsIgnoreCase(Manifest.permission.ACCESS_BACKGROUND_LOCATION) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||
{
|
||||
AlertDialog dialog = Miscellaneous.messageBox(getResources().getString(R.string.readLocation), getResources().getString(R.string.pleaseGiveBgLocation), ActivityPermissions.this);
|
||||
|
@ -216,7 +216,15 @@ public class Miscellaneous extends Service
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public static int boolToInt(boolean input)
|
||||
{
|
||||
if(input)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent arg0)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
@ -1065,6 +1073,23 @@ public class Miscellaneous extends Service
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String explode(String glue, String[] inputArray)
|
||||
{
|
||||
if(inputArray != null)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (String s : inputArray)
|
||||
builder.append(s + glue);
|
||||
|
||||
if (builder.length() > 0)
|
||||
builder.delete(builder.length() - glue.length(), builder.length());
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
public static boolean isGooglePlayInstalled(Context context)
|
||||
{
|
||||
// return false;
|
||||
|
@ -23,7 +23,7 @@ import java.util.Map;
|
||||
public class News
|
||||
{
|
||||
Calendar publishDate;
|
||||
String applicablePlattform;
|
||||
String applicablePlatform;
|
||||
Map<String,NewsTranslation> translations = new HashMap<>();
|
||||
|
||||
public static class NewsTranslation
|
||||
@ -151,9 +151,9 @@ public class News
|
||||
String publishDateString = neEl.getElementsByTagName("publishDate").item(0).getTextContent();
|
||||
newsEntry.setPublishDate(Miscellaneous.calendarFromLong(Long.parseLong(publishDateString) * 1000));
|
||||
|
||||
newsEntry.setApplicablePlattform(neEl.getElementsByTagName("applicablePlattforms").item(0).getTextContent());
|
||||
newsEntry.setApplicablePlatform(neEl.getElementsByTagName("applicablePlattforms").item(0).getTextContent());
|
||||
|
||||
if(newsEntry.getApplicablePlattform().equalsIgnoreCase("all") || newsEntry.getApplicablePlattform().equalsIgnoreCase(BuildConfig.FLAVOR))
|
||||
if(newsEntry.getApplicablePlatform().equalsIgnoreCase("all") || newsEntry.getApplicablePlatform().equalsIgnoreCase(BuildConfig.FLAVOR))
|
||||
returnList.add(newsEntry);
|
||||
}
|
||||
}
|
||||
@ -199,14 +199,14 @@ public class News
|
||||
this.publishDate = publishDate;
|
||||
}
|
||||
|
||||
public String getApplicablePlattform()
|
||||
public String getApplicablePlatform()
|
||||
{
|
||||
return applicablePlattform;
|
||||
return applicablePlatform;
|
||||
}
|
||||
|
||||
public void setApplicablePlattform(String applicablePlattform)
|
||||
public void setApplicablePlatform(String applicablePlatform)
|
||||
{
|
||||
this.applicablePlattform = applicablePlattform;
|
||||
this.applicablePlatform = applicablePlatform;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.app.NotificationManager;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.media.AudioManager;
|
||||
@ -14,10 +15,12 @@ import com.jens.automation2.Action.Action_Enum;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Profile implements Comparable<Profile>
|
||||
{
|
||||
protected static ArrayList<Profile> profileCollection = new ArrayList<Profile>();
|
||||
protected static List<Profile> profileCollection = new ArrayList<Profile>();
|
||||
protected static List<Profile> profileActivationHistory = new ArrayList<>();
|
||||
|
||||
protected String name;
|
||||
protected String oldName;
|
||||
@ -267,7 +270,7 @@ public class Profile implements Comparable<Profile>
|
||||
return hapticFeedback;
|
||||
}
|
||||
|
||||
public static ArrayList<Profile> getProfileCollection()
|
||||
public static List<Profile> getProfileCollection()
|
||||
{
|
||||
return profileCollection;
|
||||
}
|
||||
@ -288,18 +291,12 @@ public class Profile implements Comparable<Profile>
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean delete(AutomationService myAutomationService)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean applyRingTone(File ringtoneFile, int ringtoneType, Context context)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile", "Request to set ringtone to " + ringtoneFile.getAbsolutePath(), 3);
|
||||
|
||||
if(!ringtoneFile.exists() | !ringtoneFile.canRead())
|
||||
if(!ringtoneFile.exists() || !ringtoneFile.canRead())
|
||||
{
|
||||
String message = "Ringtone file does not exist or cannot read it: " + ringtoneFile.getAbsolutePath();
|
||||
Miscellaneous.logEvent("i", "Profile", message, 3);
|
||||
@ -390,11 +387,23 @@ public class Profile implements Comparable<Profile>
|
||||
}
|
||||
|
||||
// Check if rules reference this profile
|
||||
ArrayList<Rule> rulesThatReferenceMe = Rule.findRuleCandidatesByProfile(this);
|
||||
ArrayList<Rule> rulesThatReferenceMe = Rule.findRuleCandidatesByActionProfile(this);
|
||||
if(rulesThatReferenceMe.size() > 0)
|
||||
{
|
||||
for(Rule oneRule : rulesThatReferenceMe)
|
||||
{
|
||||
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||
{
|
||||
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.profileActive)
|
||||
{
|
||||
String[] parts = oneTrigger.getTriggerParameter2().split(Trigger.triggerParameter2Split);
|
||||
parts[0] = this.name;
|
||||
|
||||
oneTrigger.setTriggerParameter2(Miscellaneous.explode(Trigger.triggerParameter2Split, parts));
|
||||
// We don't need to save the file. This will happen anyway in PointOfInterest.writePoisToFile() below.
|
||||
}
|
||||
}
|
||||
|
||||
for(Action oneAction : oneRule.getActionSet())
|
||||
{
|
||||
if(oneAction.getAction() == Action_Enum.changeSoundProfile)
|
||||
@ -423,19 +432,50 @@ public class Profile implements Comparable<Profile>
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean delete()
|
||||
{
|
||||
for(int i = 0; i< Profile.getProfileCollection().size(); i++)
|
||||
public Rule isInUseByRules()
|
||||
{
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.profileActive))
|
||||
{
|
||||
if(Profile.getProfileCollection().get(i).getName().equals(this.getName()))
|
||||
for (Rule rule : Rule.findRuleCandidatesByTriggerProfile(this))
|
||||
{
|
||||
Profile.getProfileCollection().remove(0);
|
||||
|
||||
// write to file
|
||||
return XmlFileInterface.writeFile();
|
||||
return rule;
|
||||
}
|
||||
}
|
||||
|
||||
else if(Rule.isAnyRuleUsing(Action_Enum.changeSoundProfile))
|
||||
{
|
||||
for (Rule rule : Rule.findRuleCandidatesByActionProfile(this))
|
||||
{
|
||||
return rule;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean delete(Context context)
|
||||
{
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.profileActive))
|
||||
{
|
||||
for (Rule rule : Rule.findRuleCandidatesByTriggerProfile(this))
|
||||
{
|
||||
Toast.makeText(context, String.format(context.getResources().getString(R.string.ruleXIsUsingProfileY), rule.getName(), this.getName()), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if(Rule.isAnyRuleUsing(Action_Enum.changeSoundProfile))
|
||||
{
|
||||
for (Rule rule : Rule.findRuleCandidatesByActionProfile(this))
|
||||
{
|
||||
Toast.makeText(context, String.format(context.getResources().getString(R.string.ruleXIsUsingProfileY), rule.getName(), this.getName()), Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
profileCollection.remove(this);
|
||||
return XmlFileInterface.writeFile();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -463,6 +503,8 @@ public class Profile implements Comparable<Profile>
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile " + this.getName(), String.format(context.getResources().getString(R.string.profileActivate), this.getName()), 3);
|
||||
|
||||
profileActivationHistory.add(this);
|
||||
|
||||
AutomationService.getInstance().checkLockSoundChangesTimeElapsed();
|
||||
|
||||
if(AutomationService.getInstance().getLockSoundChangesEnd() == null)
|
||||
@ -534,6 +576,20 @@ public class Profile implements Comparable<Profile>
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Profile " + this.getName(), context.getResources().getString(R.string.errorActivatingProfile) + " " + Log.getStackTraceString(e), 1);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI", "Checking for applicable rule after profile " + this.getName() + " has been activated.", 2);
|
||||
List<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.profileActive);
|
||||
for(int i=0; i<ruleCandidates.size(); i++)
|
||||
{
|
||||
if(ruleCandidates.get(i).haveEnoughPermissions() && ruleCandidates.get(i).getsGreenLight(AutomationService.getInstance()))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "POI", "Rule " + ruleCandidates.get(i).getName() + " applies after " + this.getName() + " has been activated.", 2);
|
||||
ruleCandidates.get(i).activate(AutomationService.getInstance(), false);
|
||||
}
|
||||
}
|
||||
Miscellaneous.logEvent("i", "POI", "Done checking for applicable rule after profile " + this.getName() + " has been activated.", 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -541,6 +597,104 @@ public class Profile implements Comparable<Profile>
|
||||
}
|
||||
}
|
||||
|
||||
public boolean areMySettingsCurrentlyActive(Context context)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Profile " + this.getName(), "Checking if profile's settings are currently active.", 3);
|
||||
|
||||
try
|
||||
{
|
||||
AudioManager am = (AudioManager) Miscellaneous.getAnyContext().getSystemService(Context.AUDIO_SERVICE);
|
||||
NotificationManager mNotificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
if(changeSoundMode)
|
||||
{
|
||||
if(am.getRingerMode() != soundMode)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeDndMode && Build.VERSION.SDK_INT >= 23)
|
||||
{
|
||||
if(mNotificationManager.getCurrentInterruptionFilter() != dndMode)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeVolumeMusicVideoGameMedia)
|
||||
{
|
||||
if(am.getStreamVolume(AudioManager.STREAM_MUSIC) != volumeMusic)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeVolumeNotifications)
|
||||
{
|
||||
if(am.getStreamVolume(AudioManager.STREAM_NOTIFICATION) != volumeNotifications)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeVolumeAlarms)
|
||||
{
|
||||
if(am.getStreamVolume(AudioManager.STREAM_ALARM) != volumeAlarms)
|
||||
return false;
|
||||
}
|
||||
|
||||
// if(changeIncomingCallsRingtone)
|
||||
// {
|
||||
// if (incomingCallsRingtone != null)
|
||||
// {
|
||||
// applyRingTone(incomingCallsRingtone, RingtoneManager.TYPE_RINGTONE, context);
|
||||
// }
|
||||
// }
|
||||
|
||||
if(changeVibrateWhenRinging)
|
||||
{
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||
{
|
||||
int currentSetting = android.provider.Settings.System.getInt(context.getContentResolver(), "vibrate_when_ringing");
|
||||
if(currentSetting != Miscellaneous.boolToInt(vibrateWhenRinging))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
int currentSetting = am.getVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER);
|
||||
if(currentSetting != Miscellaneous.boolToInt(vibrateWhenRinging))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// if(changeNotificationRingtone)
|
||||
// if(notificationRingtone != null)
|
||||
// applyRingTone(notificationRingtone, RingtoneManager.TYPE_NOTIFICATION, context);
|
||||
|
||||
if(changeScreenLockUnlockSound)
|
||||
{
|
||||
int currentSetting = android.provider.Settings.System.getInt(context.getContentResolver(), "lockscreen_sounds_enabled");
|
||||
if(currentSetting != Miscellaneous.boolToInt(screenLockUnlockSound))
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeAudibleSelection)
|
||||
{
|
||||
int currentSetting = android.provider.Settings.System.getInt(context.getContentResolver(), android.provider.Settings.System.SOUND_EFFECTS_ENABLED);
|
||||
if(currentSetting != Miscellaneous.boolToInt(audibleSelection))
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeHapticFeedback)
|
||||
{
|
||||
int currentSetting = android.provider.Settings.System.getInt(context.getContentResolver(), android.provider.Settings.System.HAPTIC_FEEDBACK_ENABLED);
|
||||
if(currentSetting != Miscellaneous.boolToInt(hapticFeedback))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Profile " + this.getName(), "Error while checking if profile settings are currently active. " + Log.getStackTraceString(e), 1);
|
||||
}
|
||||
|
||||
Miscellaneous.logEvent("i", "Profile " + this.getName(), "This profile's settings are currently active.", 4);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
@ -117,6 +117,10 @@ public class Trigger
|
||||
if(!getParentRule().checkActivityDetection(this))
|
||||
result = false;
|
||||
break;
|
||||
case profileActive:
|
||||
if(!checkProfileActive())
|
||||
result = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -273,6 +277,43 @@ public class Trigger
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean checkProfileActive()
|
||||
{
|
||||
String demandedProfileName = getTriggerParameter2().split(Trigger.triggerParameter2Split)[0];
|
||||
boolean checkSettings = Boolean.parseBoolean(getTriggerParameter2().split(Trigger.triggerParameter2Split)[1]);
|
||||
|
||||
if(checkSettings)
|
||||
{
|
||||
Profile profile = Profile.getByName(demandedProfileName);
|
||||
return profile.areMySettingsCurrentlyActive(Miscellaneous.getAnyContext());
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
Profile lastProfile = null;
|
||||
|
||||
if (Profile.profileActivationHistory.size() > 0)
|
||||
{
|
||||
lastProfile = Profile.profileActivationHistory.get(Profile.profileActivationHistory.size() - 1);
|
||||
|
||||
if (getTriggerParameter())
|
||||
return demandedProfileName.equals(lastProfile.getName());
|
||||
else
|
||||
return !demandedProfileName.equals(lastProfile.getName());
|
||||
}
|
||||
else
|
||||
return !getTriggerParameter();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("w", "Trigger", "Error checking profile trigger.", 4);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean checkDeviceOrientation()
|
||||
{
|
||||
String deviceOrientationPieces[] = getTriggerParameter2().split(Trigger.triggerParameter2Split);
|
||||
@ -288,13 +329,7 @@ public class Trigger
|
||||
|
||||
if(desiredAzimuthTolerance < 180)
|
||||
{
|
||||
if (
|
||||
!(
|
||||
Math.abs(currentAzimuth) <= Math.abs(desiredAzimuth - desiredAzimuthTolerance)
|
||||
||
|
||||
Math.abs(currentAzimuth) <= desiredAzimuth + desiredAzimuthTolerance
|
||||
)
|
||||
)
|
||||
if (!(desiredAzimuth - desiredAzimuthTolerance <= currentAzimuth && currentAzimuth <= desiredAzimuth + desiredAzimuthTolerance))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "DeviceOrientation", "Azimuth outside of tolerance area.", 5);
|
||||
if (getTriggerParameter())
|
||||
@ -306,15 +341,7 @@ public class Trigger
|
||||
|
||||
if(desiredPitchTolerance < 180)
|
||||
{
|
||||
if (
|
||||
!(
|
||||
(
|
||||
Math.abs(currentPitch) <= Math.abs(desiredPitch - desiredPitchTolerance)
|
||||
||
|
||||
Math.abs(currentPitch) <= desiredPitch + desiredPitchTolerance
|
||||
)
|
||||
)
|
||||
)
|
||||
if (!(desiredPitch - desiredPitchTolerance <= currentPitch && currentPitch <= desiredPitch + desiredPitchTolerance))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "DeviceOrientation", "Pitch outside of tolerance area.", 5);
|
||||
if (getTriggerParameter())
|
||||
@ -326,15 +353,7 @@ public class Trigger
|
||||
|
||||
if(desiredRollTolerance < 180)
|
||||
{
|
||||
if (
|
||||
!(
|
||||
(
|
||||
Math.abs(currentRoll) <= Math.abs(desiredRoll - desiredRollTolerance)
|
||||
||
|
||||
Math.abs(currentRoll) <= desiredRoll + desiredRollTolerance
|
||||
)
|
||||
)
|
||||
)
|
||||
if (!(desiredRoll - desiredRollTolerance <= currentRoll && currentRoll <= desiredRoll + desiredRollTolerance))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "DeviceOrientation", "Roll outside of tolerance area.", 5);
|
||||
if (getTriggerParameter())
|
||||
@ -986,7 +1005,7 @@ public class Trigger
|
||||
*/
|
||||
|
||||
public enum Trigger_Enum {
|
||||
pointOfInterest, timeFrame, charging, batteryLevel, usb_host_connection, speed, noiseLevel, wifiConnection, process_started_stopped, airplaneMode, roaming, nfcTag, activityDetection, bluetoothConnection, headsetPlugged, notification, deviceOrientation, phoneCall; //phoneCall always needs to be at the very end because of Google's shitty so called privacy
|
||||
pointOfInterest, timeFrame, charging, batteryLevel, usb_host_connection, speed, noiseLevel, wifiConnection, process_started_stopped, airplaneMode, roaming, nfcTag, activityDetection, bluetoothConnection, headsetPlugged, notification, deviceOrientation, profileActive, phoneCall; //phoneCall always needs to be at the very end because of Google's shitty so called privacy
|
||||
|
||||
public String getFullName(Context context)
|
||||
{
|
||||
@ -1028,6 +1047,8 @@ public class Trigger
|
||||
return context.getResources().getString(R.string.notification);
|
||||
case deviceOrientation:
|
||||
return context.getResources().getString(R.string.deviceOrientation);
|
||||
case profileActive:
|
||||
return context.getResources().getString(R.string.profile);
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
@ -1261,11 +1282,11 @@ public class Trigger
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.leaving) + " ");
|
||||
|
||||
String repeat = ", no repetition";
|
||||
String repeat = ", " + Miscellaneous.getAnyContext().getResources().getString(R.string.noRepetition);
|
||||
if(this.getTimeFrame().getRepetition() > 0)
|
||||
repeat = ", " + String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.repeatEveryXsecondsWithVariable), String.valueOf(this.getTimeFrame().getRepetition()));
|
||||
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.triggerTimeFrame) + ": " + this.getTimeFrame().getTriggerTimeStart().toString() + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.until) + " " + this.getTimeFrame().getTriggerTimeStop().toString() + " on days " + this.getTimeFrame().getDayList().toString() + repeat);
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.triggerTimeFrame) + ": " + this.getTimeFrame().getTriggerTimeStart().toString() + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.until) + " " + this.getTimeFrame().getTriggerTimeStop().toString() + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.onDays) + " " + this.getTimeFrame().getDayList().toString() + repeat);
|
||||
break;
|
||||
case speed:
|
||||
if(getTriggerParameter())
|
||||
@ -1310,11 +1331,11 @@ public class Trigger
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.airplaneMode));
|
||||
break;
|
||||
case roaming:
|
||||
if(getTriggerParameter())
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.activated) + " ");
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.deactivated) + " ");
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.roaming));
|
||||
if(getTriggerParameter())
|
||||
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.activated));
|
||||
else
|
||||
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.deactivated));
|
||||
break;
|
||||
case phoneCall:
|
||||
String[] elements = triggerParameter2.split(triggerParameter2Split);
|
||||
@ -1346,24 +1367,9 @@ public class Trigger
|
||||
else if(elements[0].equals(Trigger.triggerPhoneCallStateStopped))
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.stopped));
|
||||
|
||||
// returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.phoneCall));
|
||||
// if(phoneNumber != null && !phoneNumber.equals("any"))
|
||||
// returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.with) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.number) + " " + phoneNumber);
|
||||
// else
|
||||
// returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.with) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.anyNumber));
|
||||
//
|
||||
// if(getTriggerParameter())
|
||||
// returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.started));
|
||||
// else
|
||||
// returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.stopped));
|
||||
break;
|
||||
case nfcTag:
|
||||
// This type doesn't have an activate/deactivate equivalent
|
||||
// if(getTriggerParameter())
|
||||
// returnString += Miscellaneous.getAnyContext().getResources().getString(R.string.activated) + " ";
|
||||
// else
|
||||
// returnString += Miscellaneous.getAnyContext().getResources().getString(R.string.deactivated) + " ";
|
||||
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.closeTo) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.nfcTag) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.withLabel) + " " + this.getNfcTagId());
|
||||
break;
|
||||
case activityDetection:
|
||||
@ -1373,21 +1379,7 @@ public class Trigger
|
||||
if (ActivityPermissions.isPermissionDeclaratedInManifest(Miscellaneous.getAnyContext(), "com.google.android.gms.permission.ACTIVITY_RECOGNITION"))
|
||||
{
|
||||
// This type doesn't have an activate/deactivate equivalent, at least not yet.
|
||||
// try
|
||||
// {
|
||||
returnString.append(Miscellaneous.runMethodReflective(ActivityManageRule.activityDetectionClassPath, "getDescription", new Object[]{getActivityDetectionType()}));
|
||||
// for(Method method : activityDetection.getMethods())
|
||||
// {
|
||||
// if(method.getName().equalsIgnoreCase("getDescription"))
|
||||
// returnString.append(method.invoke());
|
||||
//// returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.detectedActivity) + " " + activityDetection.getDescription(getActivityDetectionType()));
|
||||
// }
|
||||
// }
|
||||
// catch (ClassNotFoundException | IllegalAccessException | InvocationTargetException e)
|
||||
// {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
|
||||
}
|
||||
else
|
||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.featureNotInFdroidVersion));
|
||||
@ -1449,7 +1441,7 @@ public class Trigger
|
||||
type = Miscellaneous.getAnyContext().getResources().getString(R.string.headphoneAny);
|
||||
break;
|
||||
default:
|
||||
type = "not set";
|
||||
type = Miscellaneous.getAnyContext().getResources().getString(R.string.notSet);
|
||||
break;
|
||||
}
|
||||
if(getTriggerParameter())
|
||||
@ -1500,6 +1492,12 @@ public class Trigger
|
||||
case deviceOrientation:
|
||||
returnString.append(Miscellaneous.getAnyContext().getString(R.string.deviceIsInCertainOrientation));
|
||||
break;
|
||||
case profileActive:
|
||||
if(triggerParameter)
|
||||
returnString.append(String.format(Miscellaneous.getAnyContext().getString(R.string.profileActive), getTriggerParameter2().split(Trigger.triggerParameter2Split)[0]));
|
||||
else
|
||||
returnString.append(String.format(Miscellaneous.getAnyContext().getString(R.string.profileNotActive), getTriggerParameter2().split(Trigger.triggerParameter2Split)[0]));
|
||||
break;
|
||||
default:
|
||||
returnString.append("error");
|
||||
break;
|
||||
|
@ -14,29 +14,18 @@ public class PackageReplacedReceiver extends BroadcastReceiver
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent)
|
||||
{
|
||||
// Toast.makeText(context, "package replaced", Toast.LENGTH_LONG).show();
|
||||
// int intentUid = intent.getExtras().getInt("android.intent.extra.UID"); // userid of the application that has just been updated
|
||||
// int myUid = android.os.Process.myUid(); // userid of this application
|
||||
//
|
||||
// boolean replacing = intent.getBooleanExtra(Intent.EXTRA_REPLACING, false);
|
||||
|
||||
// if(intentUid == myUid)
|
||||
// {
|
||||
Settings.readFromPersistentStorage(context);
|
||||
Settings.readFromPersistentStorage(context);
|
||||
|
||||
Miscellaneous.logEvent("i", context.getResources().getString(R.string.applicationHasBeenUpdated), context.getResources().getString(R.string.applicationHasBeenUpdated), 2);
|
||||
if(hasServiceBeenRunning() && Settings.startServiceAfterAppUpdate)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Service", context.getResources().getString(R.string.logStartingServiceAfterAppUpdate), 1);
|
||||
AutomationService.startAutomationService(context, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Service", context.getResources().getString(R.string.logNotStartingServiceAfterAppUpdate), 2);
|
||||
}
|
||||
// }
|
||||
// else
|
||||
// Miscellaneous.logEvent("i", "Service", "Some other app has been updated.", 5);
|
||||
Miscellaneous.logEvent("i", context.getResources().getString(R.string.applicationHasBeenUpdated), context.getResources().getString(R.string.applicationHasBeenUpdated), 2);
|
||||
if(hasServiceBeenRunning() && Settings.startServiceAfterAppUpdate)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Service", context.getResources().getString(R.string.logStartingServiceAfterAppUpdate), 1);
|
||||
AutomationService.startAutomationService(context, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Service", context.getResources().getString(R.string.logNotStartingServiceAfterAppUpdate), 2);
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean hasServiceBeenRunning()
|
||||
|
BIN
app/src/main/res/drawable/arrow_azimuth.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable/arrow_pitch.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
app/src/main/res/drawable/arrow_roll.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
@ -22,7 +22,14 @@
|
||||
|
||||
<TableRow
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<ImageView
|
||||
android:layout_marginRight="@dimen/default_margin"
|
||||
android:src="@drawable/arrow_azimuth"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/orientationAzimuth"
|
||||
@ -39,7 +46,14 @@
|
||||
|
||||
<TableRow
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<ImageView
|
||||
android:layout_marginRight="@dimen/default_margin"
|
||||
android:src="@drawable/arrow_pitch"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/orientationPitch"
|
||||
@ -56,7 +70,14 @@
|
||||
|
||||
<TableRow
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<ImageView
|
||||
android:layout_marginRight="@dimen/default_margin"
|
||||
android:src="@drawable/arrow_roll"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:text="@string/orientationRoll"
|
||||
|
100
app/src/main/res/layout/activity_manage_trigger_profile.xml
Normal file
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/default_margin"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:shrinkColumns="1"
|
||||
android:stretchColumns="1" >
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView
|
||||
android:text="@string/profile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinnerProfiles"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<View
|
||||
android:layout_span="2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@android:color/darker_gray" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView
|
||||
android:text="@string/needsToBeActive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/chkProfileActive"
|
||||
android:checked="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<View
|
||||
android:layout_span="2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@android:color/darker_gray" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView
|
||||
android:text="@string/checkSettings"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/chkProfileCheckSettings"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow>
|
||||
|
||||
<TextView
|
||||
android:layout_span="2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/profileTriggerCheckSettings" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bSaveTriggerProfile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_margin"
|
||||
android:text="@string/save" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
@ -356,7 +356,7 @@
|
||||
<string name="selectConnectionOption">Wählen Sie eine Verbindungsoption.</string>
|
||||
<string name="triggerHeadsetPlugged">Headset Verbindung</string>
|
||||
<string name="actionPlayMusic">Musikplayer öffnen</string>
|
||||
<string name="headsetConnected">Headset (type: %1$s) verbunden</string>
|
||||
<string name="headsetConnected">Headset (Art: %1$s) verbunden</string>
|
||||
<string name="headsetDisconnected">Headset (type: %1$s) getrennt</string>
|
||||
<string name="headphoneSimple">Kopfhörer</string>
|
||||
<string name="headphoneMicrophone">Mikrofon</string>
|
||||
@ -630,7 +630,7 @@
|
||||
<string name="deviceOrientationTimeAcceptIntervalTitle">Signal Häufigkeit</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalSummary">Neue Signale nur alle x Millisekunden akzeptieren</string>
|
||||
<string name="deviceOrientationSettings">Geräteausrichtungseinstellungen</string>
|
||||
<string name="explanationDeviceOrientationDirection">Wenn das Häkchen gesetzt ist, bedeutet das, daß das Geräte in der angegebenen Ausrichtung sein muß. Wenn es nicht gesetzt ist, führt jede andere Ausrichtung zu einem positiven Ergebnis.</string>
|
||||
<string name="explanationDeviceOrientationDirection">Wenn das Häkchen gesetzt ist, bedeutet das, daß das Gerät in der angegebenen Ausrichtung sein muß. Wenn es nicht gesetzt ist, führt jede andere Ausrichtung zu einem positiven Ergebnis.</string>
|
||||
<string name="deviceOrientationExplanation">Wenn Sie Ihr Gerät bewegen, werden die Zahlen unten aktualisiert. Was Sie hier sehen können, ist die momentane Ausrichtung Ihres Geräts, gemessen in Grad. Wenn das Gerät in der gewünschten Ausrichtung ist, klicken Sie den \"übernehmen\" Knopf, um die Werte in die \"gewünscht\" Felder zu übertragen.\nWeil es sehr unwahrscheinlich ist, daß Sie diese exakte Ausrichtung jemals wieder erreichen, müssen Sie Toleranzen eingeben. Dies ist der Winkel in Grad, der in jede Richtung noch akzeptiert wird. 15° entsprechen somit einem Gesamtwinkel von 30°, 15 in jede Richtung.\nWenn Ihnen nur eine bestimmte Achse wichtig ist, können Sie eine Toleranz von 180° für die anderen beiden Richtungen angeben.</string>
|
||||
<string name="actionSetBluetoothTethering">Bluetooth Tethering</string>
|
||||
<string name="actionTurnBluetoothTetheringOn">Bluetooth Tethering einschalten</string>
|
||||
@ -638,4 +638,25 @@
|
||||
<string name="enterRepetitionTime">Sie müssen eine positive Ganzzahl als Wiederholungszeit eingeben.</string>
|
||||
<string name="btTetheringNotice">Diese Funktion funktioniert bestätigt bis einschließlich Android 8.0. Ab einer höheren Version funktioniert sie nicht mehr, aber ich ich kann mangels physischer Geräte nicht sagen, aber welcher genau. Unter Android 11 funktioniert es definitiv nicht mehr. Wenn Sie eine Version dazwischen haben, lassen Sie mich bitte wissen, ob es funktioniert oder nicht.</string>
|
||||
<string name="triggerWrong">Mit diesem Auslöser stimmt etwas nicht. Er konnte nicht korrekt geladen werden.</string>
|
||||
<string name="android.permission.BIND_DEVICE_ADMIN">Geräte Administrator</string>
|
||||
<string name="deviceAdminNote">Geräte Administrator Rechte werden für mindestens 1 Regel benötigt, die Sie angelegt haben.</string>
|
||||
<string name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS">Von der Akku-Optimierung ausschließen</string>
|
||||
<string name="recommendedForBetterReliability">Empfohlen für bessere Zuverlässigkeit</string>
|
||||
<string name="needsToBeActive">Muß aktiv sein</string>
|
||||
<string name="checkSettings">Einstellungen überprüfen</string>
|
||||
<string name="profileActive">Profil %1$s ist aktiv</string>
|
||||
<string name="profileNotActive">Profil %1$s ist nicht aktiv</string>
|
||||
<string name="profileTriggerCheckSettings">Wenn dieses Häkchen nicht gesetzt ist, wird nur geprüft, ob das ausgewählte Profil zuletzt aktiviert wurde. Es ist egal, ob Audio-Einstellungen von außerhalb verändert wurden.\nWenn das Häkchen aber gesetzt ist, müssen die aktuellen Audio-Einstellungen auch wirklich genau so gesetzt sein, wie im Profil definiert. ACHTUNG: Der Klingelton selbst kann derzeit noch nicht überprüft werden.</string>
|
||||
<string name="profileCouldNotBeDeleted">Profil konnte nicht gelöscht werden.</string>
|
||||
<string name="ruleXIsUsingProfileY">Dieses Profil kann nicht gelöscht werden. Regel %s$1 verwendet noch Profil %s$2.</string>
|
||||
<string name="noRepetition">keine Wiederholung</string>
|
||||
<string name="usingAuthentication">mit Authentifizierung</string>
|
||||
<string name="toNumber">zu Nummer</string>
|
||||
<string name="message">Nachricht</string>
|
||||
<string name="onDays">an Tagen</string>
|
||||
<string name="notSet">nicht gesetzt</string>
|
||||
<string name="takeLauncherActivity">Automatisch auswählen</string>
|
||||
<string name="pickActivityManually">Manuell auswählen</string>
|
||||
<string name="launcherOrManualExplanation">Einfacher Modus: Automation kann versuchen, die Start-Activity des Zielprogramms automatisch zu finden.\nAlternativ können Sie die gewünschte Activity auch manuell auswählen.\nWelche Variante möchten Sie?</string>
|
||||
<string name="launcherNotFound">Eine Start-Activity dieser Anwendung konnte nicht gefunden werden. Sie müssen manuell eine auswählen.</string>
|
||||
</resources>
|
@ -605,4 +605,57 @@
|
||||
<string name="actionSetBluetoothTethering">Enrutador Bluetooth</string>
|
||||
<string name="actionTurnBluetoothTetheringOn">activar enrutador Bluetooth</string>
|
||||
<string name="actionTurnBluetoothTetheringOff">desactivar enrutador Bluetooth</string>
|
||||
<string name="miscellaneous">Misceláneo</string>
|
||||
<string name="dndOff">No interrumpir apagado</string>
|
||||
<string name="dndPriority">Permitir notificaciones prioritarias</string>
|
||||
<string name="dndAlarms">Permitir alarmas</string>
|
||||
<string name="dndNothing">Permitir nada</string>
|
||||
<string name="unknown">desconocido</string>
|
||||
<string name="orientation">Orientación</string>
|
||||
<string name="turnScreenOnOrOff">Activar o desactivar pantalla</string>
|
||||
<string name="mustApply">Debe aplicar</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalTitle">Frecuencia de señal</string>
|
||||
<string name="deviceOrientationSettings">Configuración del orientación del dispositivo</string>
|
||||
<string name="android.permission.BIND_DEVICE_ADMIN">Administrador del dispositivo</string>
|
||||
<string name="orientationRoll">Rotación:</string>
|
||||
<string name="orientationPitch">Inclinación:</string>
|
||||
<string name="wouldCurrentlyApply">¿Se aplicaría actualmente?</string>
|
||||
<string name="repeatEveryXseconds">Repetir cada x segundos</string>
|
||||
<string name="repeatEveryXsecondsWithVariable">repetir cada %1$s segundos</string>
|
||||
<string name="permissionsRequiredNotAvailable">Sus reglas requerían permisos que no se pueden solicitar a este tipo instalado de Automation.</string>
|
||||
<string name="automationNotificationsIgnored">Si no elige una aplicación específica, sino que elige \"Cualquier aplicación\", las notificaciones de Automatización se ignorarán para evitar bucles.</string>
|
||||
<string name="enterRepetitionTime">Debe insertar un valor positivo no decimal para el tiempo de repetición.</string>
|
||||
<string name="elementSkipped">No se pudo leer un elemento del archivo de configuración. El archivoo puede haber sido creado por una versión más reciente del programa.</string>
|
||||
<string name="enterValidNumbersIntoAllFields">Introduzca números válidos en todos los campos.</string>
|
||||
<string name="toleranceOf180OnlyAllowedIn2Fields">Se permite una tolerancia de 180 solo para 2 campos de tolerancia, no para todos los 3. De lo contrario, el disparador SIEMPRE se aplicaría.</string>
|
||||
<string name="triggerWrong">Hay algo mal con este condición. No se pudo cargar correctamente.</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalSummary">Aceptar nuevas señales de movimiento cada x milisegundos</string>
|
||||
<string name="deviceAdminNote">Se requieren permisos de administrador de dispositivo para al mens 1 reglas que haya creado.</string>
|
||||
<string name="dndRemarks">El ajuste fino (como permitir llamadas telefónicas, elegir números específicos, etc.) solo se puede hacer desde la configuración del sistema.</string>
|
||||
<string name="btTetheringNotice">Se confirma que esta función funcionará hasta Android 8.0. A partir de alguna versión superior deja de funcionar, pero debido a la falta de dispositivos físicos no puedo decir cuál es. En Android 11 definitivamente ya no funciona. Si tiene una versión intermedia, hágamelo saber si está funcionando o no.</string>
|
||||
<string name="deviceIsInCertainOrientation">el dispositivo esta en una orientación determinada</string>
|
||||
<string name="explanationDeviceOrientationDirection">Si la casilla de verificación está marcada, significa que el dispositivo debe estar en la orientación que especifique. Si no está marcado, cualquier orientación que NO coincida con sus criterios servirá.</string>
|
||||
<string name="silentTriggersDnd">OBSERVACIÓN: El modo silencioso a menudo activa No-Interrumpir en dispositivos más nuevos. Si eso sucede en su dispositivo, le recomiendo usar el modo normal en su lugar y reducir todos los volúmenes a cero.</string>
|
||||
<string name="wifiApi30">Porque Google arruinó otra parte de Android, a partir de API 30 solo se puede mostrar los wifi actualmente visibles, ya no todos que su positivo tiene conectados.</string>
|
||||
<string name="smsDialogNotice">Si no ha utilizado una acción de envío de sms en este programa antes, Android puede mostrar un diálogo de confirmación adicional, pidiéndole que permita el envío de mensajes. Debe seleccionar la casilla de verificación \"permitir siempre\" y confirmar si desea que esta acción funcione en segundo plano. Se recomienda ejecutar esta regla manualmente una vez para provocar este diálogo de confirmación.</string>
|
||||
<string name="deviceOrientationExplanation">Cuando mueva su dispositivo, los siguientes números se actualizarán. Lo que puede ver allí, es la orientación actual de su dispositivo medida en grados. Si está en la orientación deseada, haga clic en el botón Aplicar para copiar los valores actuales en los campos deseados. Debido a que alcanzar esta orientación exacta nunca más es muy poco probable, también deba ingresar a una tolerancia. Esta es la cantidad de grados a los que la orientación puede desviarse en cualquier dirección. 15° resultará en un ángulo total de 30°, 15° en todas las direcciones. Si solo le importa un eje específico, especifique una tolerancia de 180° para los otros dos.</string>
|
||||
<string name="profileNotActive">el perfil %1$s no está activo</string>
|
||||
<string name="profileActive">el perfil %1$s está activo</string>
|
||||
<string name="checkSettings">Comprobar la configuración</string>
|
||||
<string name="needsToBeActive">Necesita estar activo</string>
|
||||
<string name="recommendedForBetterReliability">Recomendado para una mejor fiabilidad</string>
|
||||
<string name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS">Excluir de la optimización de la batería</string>
|
||||
<string name="profileTriggerCheckSettings">Si esta casilla de verificación no está desactivada, solo se marcará si el perfil seleccionado ha sido el último en activarse. No importa si alguna configuración relacionada con el audio se ha cambiado externamente.\nSin embargo, si la casilla de verificación está habilitada, la configuración de audio actual realmente debe ser como se define en el perfil. CUIDADO: La comprobación del archivo de tono de llamada no es compatible actualmente, todavía.</string>
|
||||
<string name="ruleXIsUsingProfileY">No se puede eliminar este perfil. La regla %s$1 hace referencia al perfil %s$2.</string>
|
||||
<string name="profileCouldNotBeDeleted">No se pudo eliminar el perfil.</string>
|
||||
<string name="noRepetition">sin repetición</string>
|
||||
<string name="usingAuthentication">uso de la autenticación</string>
|
||||
<string name="toNumber">a número</string>
|
||||
<string name="message">mensaje</string>
|
||||
<string name="onDays">en días</string>
|
||||
<string name="notSet">no configurado</string>
|
||||
<string name="takeLauncherActivity">Buscar automaticamente</string>
|
||||
<string name="pickActivityManually">Eligir manualmente</string>
|
||||
<string name="launcherOrManualExplanation">Modo facil: Automation puede probar identifcar el launcher activity del programa automaticamente.\nAlternativamente puede eligir una de las activities del programa manualmente.\nCual variante queria?</string>
|
||||
<string name="launcherNotFound">No se puede encontrar una launcher activity. Tiene que elegir una manualmente.</string>
|
||||
</resources>
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:ns1="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="ConfigurationExportError">C\'è stato un errore durante l\'esportazione della configurazione.</string>
|
||||
<string name="accelerometer">Accelerometro</string>
|
||||
@ -230,7 +230,7 @@
|
||||
<string name="helpTextRules">Una regola sarà eseguita quando tutti i suoi eventi risultano veri. Basta che solo un evento non sia eseguito e la regola non si attiverà. Per eseguire una regola in base a diversi eventi individuali, è sufficiente creare regole specifiche per ogni set di eventi.</string>
|
||||
<string name="helpTextSound">Nello schermo principale puoi bloccare temporaneamente i cambi ai suoni per evitare l\'esecuzione di regole che facciano cambi alle attività sonore. Per esempio, potresti essere in una situatione o in un luogo dove normalmente ascoltare il suono di una suoneria è ok, ma in questa occasione bisognerebbe evitarlo. Questa funzione si disattiverà automaticamente non appena sia trascorso il tempo selezionato. Fai Click sul bottone + per raggiungere la quantità di tempo desiderata. Una volta attiva, questa si può disattivare nuovamente usando il pulsante di attivazione (e in questo modo, si riattiveranno le regole basate su cambi sonori).</string>
|
||||
<string name="helpTextTimeFrame">Se si specifica una regola con un intervallo temporale si hanno due scelte. È possibile scegliere se si desidera attivare la regola all\'interno o all\'esterno dell\'intervallo di tempo. In entrambi i casi l\'azione verrà eseguita una sola volta. Quindi, se si crea una regola che imposta il profilo su vibrazione nell\'intervallo temporale xyz, il telefono, passato allo stato vibrazione, rimarrà definitivamente in tale stato anche dopo lo scadere dell\'intervallo di tempo. Se si desidera che ciò avvenga è necessario specificare un\'altra regola con un altro periodo di tempo.</string>
|
||||
<string name="helpTextToggable">Le regole hanno un segno di spunta chiamato "Reversibile". Ciò significa che, se una regola viene eseguita al verificarsi di un evento e poi quest\'ultimo si verifica una seconda volta, il comando della regola verrà eseguito una ulteriore volta in modalità inversa, se possibile. Attualmente questo avverrà solo in combinazione con i tag NFC. Se li si tocca due volte la regola associata invertirà la situazione attuale. Per esempio una regola “Reversibile” può disattivare il WiFi se attivo e viceversa attivarlo se non attivo.</string>
|
||||
<string name="helpTextToggable">Le regole hanno un segno di spunta chiamato "Reversibile". Ciò significa che, se una regola viene eseguita al verificarsi di un evento e poi quest\'ultimo si verifica una seconda volta, il comando della regola verrà eseguito una ulteriore volta in modalità inversa, se possibile. Attualmente questo avverrà solo in combinazione con etichette NFC. Se le si tocca due volte la regola associata invertirà la situazione attuale. Per esempio una regola “Reversibile” può disattivare il WiFi se attivo e viceversa attivarlo se non attivo.</string>
|
||||
<string name="helpTitleEnergySaving">Risparmio energetico</string>
|
||||
<string name="hint">Suggerimento</string>
|
||||
<string name="httpAcceptAllCertificatesSummary">Salta il controllo dei certificati SSL (si consiglia di non attivarlo)</string>
|
||||
@ -293,24 +293,24 @@
|
||||
<string name="newNfcId">Scrivi un nuovo ID NFC</string>
|
||||
<string name="newThreadRules">Nuova discussione</string>
|
||||
<string name="newsOptIn">Vuoi ricevere delle notizie su questa app (solo quelle importanti) nella schermata principale? Queste vengono scaricate dal sito web dello sviluppatore. Non ci sarà nessuna notifica intrusiva, solo un testo nella schermata principale quando apri l\'app.</string>
|
||||
<string name="nfcApplyTagToRule">Applicazione del tag alla regola</string>
|
||||
<string name="nfcBringTagIntoRange">Portare un tag NFC nel campo d\'azione.</string>
|
||||
<string name="nfcBringTagIntoRangeToRead">Avvicina il TAG da leggere.</string>
|
||||
<string name="nfcEnterValidIdentifier">Inserire un nome valido per il tag (come "Porta d\'ingresso di casa").</string>
|
||||
<string name="nfcApplyTagToRule">Applicazione della etichetta alla regola</string>
|
||||
<string name="nfcBringTagIntoRange">Portare una etichetta NFC nel campo d\'azione.</string>
|
||||
<string name="nfcBringTagIntoRangeToRead">Avvicina la etichetta da leggere.</string>
|
||||
<string name="nfcEnterValidIdentifier">Inserire un nome valido per l\'etichetta (come "Porta d\'ingresso di casa").</string>
|
||||
<string name="nfcNoNdefIntentBut">Nessun intento NFC NDEF, ma</string>
|
||||
<string name="nfcNoTag">Nessun tag rilevato.</string>
|
||||
<string name="nfcNoTag">Nessuna etichetta rilevata.</string>
|
||||
<string name="nfcNotSupportedInThisAndroidVersionYet">NFC non ancora supportato in questa versione di Android.</string>
|
||||
<string name="nfcReadTag">Lettura ID dal tag</string>
|
||||
<string name="nfcTag">Tag NFC</string>
|
||||
<string name="nfcTagDataNotUsable">Dati del tag non leggibili, si prega di riscriverli.</string>
|
||||
<string name="nfcTagDiscovered">Tag rilevato</string>
|
||||
<string name="nfcTagFoundWithText">Trovato Tag con testo:</string>
|
||||
<string name="nfcTagReadSuccessfully">Tag letto con successo.</string>
|
||||
<string name="nfcTagWriteError">Errore di scrittura sul tag. È sufficientemente vicino?</string>
|
||||
<string name="nfcTagWrittenSuccessfully">Scrittura Tag eseguita con successo.</string>
|
||||
<string name="nfcReadTag">Lettura ID dall\'etichetta</string>
|
||||
<string name="nfcTag">Etichetta NFC</string>
|
||||
<string name="nfcTagDataNotUsable">Dati dell\'etichetta non leggibili, si prega di riscriverli.</string>
|
||||
<string name="nfcTagDiscovered">Etichetta rilevata</string>
|
||||
<string name="nfcTagFoundWithText">Trovata etichetta con testo:</string>
|
||||
<string name="nfcTagReadSuccessfully">Etichetta letta con successo.</string>
|
||||
<string name="nfcTagWriteError">Errore di scrittura dell\'etichetta. È sufficientemente vicina?</string>
|
||||
<string name="nfcTagWrittenSuccessfully">Scrittura dell\'etichetta eseguita con successo.</string>
|
||||
<string name="nfcUnsupportedEncoding">Codifica non supportata:</string>
|
||||
<string name="nfcValueNotSuitable">Valore memorizzato non adatto.</string>
|
||||
<string name="nfcWriteTag">Scrittura tag</string>
|
||||
<string name="nfcWriteTag">Scrittura etichetta</string>
|
||||
<string name="no">No</string>
|
||||
<string name="noApplicableFilesFoundInDirectory">Nessun file adatto è stato trovato in quella directory.</string>
|
||||
<string name="noChangeSelectedProfileDoesntMakeSense">Nessun cambiamento selezionato. Questo profilo non ha senso.</string>
|
||||
@ -517,7 +517,7 @@
|
||||
<string name="to">a</string>
|
||||
<string name="toggableRules">Regole \"Reversibili\"</string>
|
||||
<string name="toggle">reversibile</string>
|
||||
<string name="toggleNotAllowed">La reversibilità al momento è disponibile solo per le regole che hanno come evento un tag NFC. Consulta l\'aiuto per i dettagli.</string>
|
||||
<string name="toggleNotAllowed">La reversibilità al momento è disponibile solo per le regole che hanno come evento una etichetta NFC. Consulta l\'aiuto per i dettagli.</string>
|
||||
<string name="toggleRule">Regola Reversibile</string>
|
||||
<string name="toggling">Attivando</string>
|
||||
<string name="triggerCharging">Batteria sotto carica</string>
|
||||
@ -538,7 +538,7 @@
|
||||
<string name="urlTooShort">L\'url deve avere almeno 10 caratteri.</string>
|
||||
<string name="usbTetheringFailForAboveGingerbread">Questo molto probabilmente non funzionerà dato che sei su una versione superiore ad Android 2.3. Tuttavia è possibile utilizzare la connessione wifi tethering per attivare la regola.</string>
|
||||
<string name="useAuthentication">Usa l\'autenticazione</string>
|
||||
<string name="useExistingTag">Utilizzo di un tag NFC esistente</string>
|
||||
<string name="useExistingTag">Utilizzo di una etichetta NFC esistente</string>
|
||||
<string name="useTextToSpeechOnNormalSummary">Usa TextToSpeech nel modo normale</string>
|
||||
<string name="useTextToSpeechOnNormalTitle">TTS in modo normale</string>
|
||||
<string name="useTextToSpeechOnSilentSummary">Usa TextToSpeech nel modo silenzioso</string>
|
||||
@ -596,4 +596,67 @@
|
||||
<string name="actionTurnBluetoothTetheringOff">spegnere Bluetooth Tethering</string>
|
||||
<string name="vibrate">Vibrare</string>
|
||||
<string name="test">Provare</string>
|
||||
<string name="VibrateExplanation">Inserisci una durata per la vibrazione, seguita da una virgola e poi la durata di una pausa. Si possono concatenare tutte le vibrazioni che si vogliono. Per esempio, lo schema 100,500,500,1000,100 farà vibrare il dispositivo per 100ms, aspetterà 500ms, vibrerà 500ms, aspetterà 1000ms e vibrerà 100ms. Se pensi che una vibrazione non venga eseguita, prova ad aumentare la pausa precedente.</string>
|
||||
<string name="pleaseEnterValidVibrationPattern">Si prega di inserire uno schema di vibrazione valido.</string>
|
||||
<string name="top">Superiore</string>
|
||||
<string name="bottom">Inferiore</string>
|
||||
<string name="tabsPlacement">Posizione della barra delle schede</string>
|
||||
<string name="tabsPlacementSummary">Scegli dove posizionare la barra delle schede.</string>
|
||||
<string name="wifiApi30">Dato che Google ha rovinato un\'altra parte ancora di Android, a partire con le API 30, solo le reti wifi attualmente visibili possono essere visualizzate, non tutte quelle a cui il tuo dispositivo si è collegato.</string>
|
||||
<string name="smsDialogNotice">Se non hai mai usato una azione \"invia-sms\" prima, Android potrebbe visualizzare una finestra di conferma addizionale, chiedendo di permettere l\'invio di messaggi. Dovrai mettere il segno di spunta su \"permetti sempre"\ e confermare se vuoi che questa attività funzioni in secondo piano. Si raccomanda l\'esecuzione manuale la prima volta solo per far apparire questa finestra.</string>
|
||||
<string name="silentTriggersDnd">ATTENZIONE: La modalità silenziosa spesso attiva quella \"non disturbare\" sui dispositivi più nuovi. Se questo avviene sul tuo, ti raccomando di usare la modalità normale invece di abbassare tutti i volumi a zero.</string>
|
||||
<string name="miscellaneous">Altro</string>
|
||||
<string name="dndOff">Spegni \"Non disturbare\"</string>
|
||||
<string name="dndPriority">Permetti notifiche prioritarie</string>
|
||||
<string name="dndAlarms">Permetti allarmi</string>
|
||||
<string name="dndNothing">Non permettere nulla</string>
|
||||
<string name="dndRemarks">La configurazione dettagliata (come il permesso di fare chiamate, scegliere numeri specifici, etc.) può solo essere effettuata dalle impostazioni di sistema.</string>
|
||||
<string name="permissionsRequiredNotAvailable">Le tue regole hanno bisogno di permessi che non possono essere richiesti da questa versione di Automation.</string>
|
||||
<string name="automationNotificationsIgnored">Se non scegli una applicazione specifica, ma scegli \"Qualsiasi applicazione\", le notifiche provenienti da Automation saranno ignorate per evitare che vada in ripetizione.</string>
|
||||
<string name="repeatEveryXseconds">Ripeti ogni x secondi</string>
|
||||
<string name="repeatEveryXsecondsWithVariable">ripeti ogni %1$s secondi</string>
|
||||
<string name="enterRepetitionTime">Devi inserire un valore positivo e non decimale per il tempo di ripetizione.</string>
|
||||
<string name="elementSkipped">Un elemento del file di configurazione non può essere letto. Il file potrebbe essere stato create da una versione più recente del programma.</string>
|
||||
<string name="donate">Donazioni</string>
|
||||
<string name="btTetheringNotice">È stato confermato che questa caratteristica funziona fino ad Android 8.0. Da qualche versione superiore ha cessato di funzionare, ma dato che non ho sufficienti dispositivi fisici, non posso identificare quale sia. Su Android 11 sicuramente non funziona più. Se hai una versione intermedia, per favore fammi sapere se funziona per il tuo dispositivo, o no. </string>
|
||||
<string name="notice">Avviso</string>
|
||||
<string name="orientationPitch">Inclinazione:</string>
|
||||
<string name="orientationRoll">Rotazione:</string>
|
||||
<string name="enterValidNumbersIntoAllFields">Inserire un numero valido in tutti i campi.</string>
|
||||
<string name="deviceOrientationExplanation">When you move your device the below numbers will update. What you can see there, is the current orientation of your device measured in degrees. If it is in the desired orientation, click the apply button to copy the current values to the desired fields.\nBecause reaching this exact orientation ever again is highly unlikely you must also enter a tolerance. The is amount of degrees to which the orientation can deviate in either direction. 15° will result in a total angle of 30°, 15° in every direction.\nIf you only care about one specific axis, specify a tolerance of 180° for the two other ones.</string>
|
||||
<string name="wouldCurrentlyApply">Si applica attualmente?</string>
|
||||
<string name="deviceIsInCertainOrientation">il dispositivo si trova in una certa orientazione</string>
|
||||
<string name="toleranceOf180OnlyAllowedIn2Fields">Una tolleranza di 180 è permessa solo per 2 campi di tolleranza, non tutti e tre. Altrimenti l\'attività si applicherebbe SEMPRE.</string>
|
||||
<string name="unknown">sconosciuto</string>
|
||||
<string name="orientation">Orientazione</string>
|
||||
<string name="triggerWrong">C\'è qualcosa di errato con questo evento. Non può essere caricato correttamente.</string>
|
||||
<string name="turnScreenOnOrOff">Accendi/Spegni lo schermo</string>
|
||||
<string name="turnScreenOn">accendi lo schermo</string>
|
||||
<string name="turnScreenOff">spegni lo schermo</string>
|
||||
<string name="mustApply">Si deve applicare</string>
|
||||
<string name="explanationDeviceOrientationDirection">Se la casella di controllo è spuntata, significa che il dispositivo deve essere nell\'orientamento specificato. Se non è spuntata, qualsiasi orientamento che NON corrisponde ai tuoi criteri andrà bene. </string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalTitle">Frequenza del segnale</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalSummary">Accetta nuovi segnali di movimento ogni x millisecondi </string>
|
||||
<string name="deviceOrientationSettings">Impostazioni di orientamento del dispositivo</string>
|
||||
<string name="android.permission.BIND_DEVICE_ADMIN">Amministrazione dispositivo</string>
|
||||
<string name="deviceAdminNote">I permessi di amministratore del dispositivo sono necessari per almeno 1 delle regole che hai creato.</string>
|
||||
<string name="profileTriggerCheckSettings">Se questa casella di controllo non è disabilitata, verrà selezionata solo se il profilo selezionato è stato l\'ultimo ad essere attivato. Non importa se le impostazioni relative all\'audio sono state modificate esternamente.\nTuttavia, se la casella di controllo è abilitata, le impostazioni audio correnti devono essere definite nel profilo. ATTENZIONE: il controllo del file della suoneria non è ancora supportato.</string>
|
||||
<string name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS">Escludere dall\'ottimizzazione della batteria</string>
|
||||
<string name="recommendedForBetterReliability">Consigliato per una migliore affidabilità</string>
|
||||
<string name="needsToBeActive">Deve essere attivo</string>
|
||||
<string name="checkSettings">Controlla le impostazioni</string>
|
||||
<string name="profileActive">profilo %1$s è attivo</string>
|
||||
<string name="profileNotActive">profilo %1$s non attivo</string>
|
||||
<string name="ruleXIsUsingProfileY">Impossibile eliminare questo profilo. La regola %s$1 fa riferimento al profilo %s$2.</string>
|
||||
<string name="profileCouldNotBeDeleted">Impossibile eliminare il profilo.</string>
|
||||
<string name="noRepetition">nessuna ripetizione</string>
|
||||
<string name="usingAuthentication">utilizzo dell\'autenticazione</string>
|
||||
<string name="toNumber">al numero</string>
|
||||
<string name="message">messaggio</string>
|
||||
<string name="onDays">nei giorni</string>
|
||||
<string name="notSet">non impostato</string>
|
||||
<string name="takeLauncherActivity">Trova automaticamente</string>
|
||||
<string name="pickActivityManually">Scegli manualmente</string>
|
||||
<string name="launcherOrManualExplanation">Modalità semplice: l\'automazione può provare a identificare l\'attività di avvio del programma desiderato.\nIn alternativa puoi anche scegliere manualmente una delle attività dell\'applicazione.\nCosa vorresti?</string>
|
||||
<string name="launcherNotFound">Impossibile identificare un\'attività di avvio di questa app. Dovrai sceglierne uno manualmente.</string>
|
||||
</resources>
|
||||
|
@ -609,4 +609,52 @@
|
||||
<string name="enterRepetitionTime">Je moet een positieve niet-decimale waarde invoeren voor de herhalingstijd.</string>
|
||||
<string name="elementSkipped">Een element van het configuratiebestand kon niet worden gelezen. Mogelijk is het bestand gemaakt in een nieuwere programmaversie.</string>
|
||||
<string name="donate">Doneren</string>
|
||||
<string name="unknown">onbekend</string>
|
||||
<string name="orientation">Oriëntatie</string>
|
||||
<string name="turnScreenOnOrOff">Scherm in- of uitschakelen</string>
|
||||
<string name="turnScreenOn">scherm inschakelen</string>
|
||||
<string name="turnScreenOff">scherm uitschakelen</string>
|
||||
<string name="mustApply">Moet van toepassing zijn</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalTitle">Signaalfrequentie</string>
|
||||
<string name="deviceOrientationSettings">Instellingen voor apparaatstand</string>
|
||||
<string name="android.permission.BIND_DEVICE_ADMIN">Apparaatbeheerder</string>
|
||||
<string name="deviceAdminNote">Apparaatbeheerdersmachtigingen vereist voor ten minste 1 regel die u hebt gemaakt.</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalSummary">Accepteer elke x milliseconden nieuwe bewegingssignalen</string>
|
||||
<string name="explanationDeviceOrientationDirection">Als het selectievakje is aangevinkt, betekent dit dat het apparaat zich in de door u opgegeven richting moet bevinden. Als het niet is gecontroleerd, is elke oriëntatie die NIET aan uw criteria voldoet voldoende.</string>
|
||||
<string name="triggerWrong">Er is iets mis met deze trigger. Het kan niet correct worden geladen.</string>
|
||||
<string name="orientationAzimuth">Azimut:</string>
|
||||
<string name="orientationPitch">Pitch:</string>
|
||||
<string name="orientationRoll">Rollen:</string>
|
||||
<string name="enterValidNumbersIntoAllFields">Voer geldige nummers in alle velden in.</string>
|
||||
<string name="deviceOrientation">Apparaat oriëntatie</string>
|
||||
<string name="notice">Bemerken</string>
|
||||
<string name="tolerance">Tolerantie (0-180)</string>
|
||||
<string name="actionSetBluetoothTethering">Bluetooth Tethering</string>
|
||||
<string name="enterPhoneNumberAndText">Voer een telefoonnummer en een sms in.</string>
|
||||
<string name="actionTurnBluetoothTetheringOn">Schakel Bluetooth Tethering in</string>
|
||||
<string name="actionTurnBluetoothTetheringOff">Schakel Bluetooth Tethering uit</string>
|
||||
<string name="deviceIsInCertainOrientation">het apparaat zich in een bepaalde richting bevindt</string>
|
||||
<string name="wouldCurrentlyApply">Zou momenteel van toepassing zijn?</string>
|
||||
<string name="btTetheringNotice">Deze functie werkt naar verluidt tot Android 8.0. Vanaf een hogere versie werkt het niet meer, maar door een gebrek aan fysieke apparaten kan ik niet zeggen welke dat is. Op Android 11 werkt het absoluut niet meer. Als je een versie tussendoor hebt, laat het me dan weten of het werkt of niet.</string>
|
||||
<string name="deviceOrientationExplanation">Wanneer u uw apparaat verplaatst, worden de onderstaande nummers bijgewerkt. Wat je daar kunt zien, is de huidige oriëntatie van je apparaat gemeten in graden. Als het zich in de gewenste richting bevindt, klikt u op de knop Toepassen om de huidige waarden naar de gewenste velden te kopiëren.\nOmdat het zeer onwaarschijnlijk is dat u deze exacte oriëntatie ooit nog bereikt, moet u ook een tolerantie invoeren. Dit is het aantal graden waarin de oriëntatie in beide richtingen kan afwijken. 15° resulteert in een totale hoek van 30°, 15° in elke richting.\nAls u slechts om één specifieke as geeft, geef dan een tolerantie van 180° op voor de twee andere.</string>
|
||||
<string name="toleranceOf180OnlyAllowedIn2Fields">Een tolerantie van 180 is alleen toegestaan voor 2 tolerantievelden, niet alle 3. Anders zou de trigger ALTIJD van toepassing zijn.</string>
|
||||
<string name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS">Uitsluiten van batterijoptimalisatie</string>
|
||||
<string name="recommendedForBetterReliability">Aanbevolen voor een betere betrouwbaarheid</string>
|
||||
<string name="needsToBeActive">Moet actief zijn</string>
|
||||
<string name="checkSettings">Instellingen controleren</string>
|
||||
<string name="profileActive">profile %1$s is actief</string>
|
||||
<string name="profileNotActive">profile %1$s is niet actief</string>
|
||||
<string name="profileTriggerCheckSettings">Als dit selectievakje niet is uitgeschakeld, wordt het alleen aangevinkt als het geselecteerde profiel het laatste is dat is geactiveerd. Het maakt niet uit of audiogerelateerde instellingen extern zijn gewijzigd.\nAls het selectievakje echter is ingeschakeld, moeten de huidige audio-instellingen echt worden gedefinieerd in het profiel. PAS OP: Het controleren van het beltoonbestand wordt momenteel nog niet ondersteund.</string>
|
||||
<string name="ruleXIsUsingProfileY">Kan dit profiel niet verwijderen. Regel %s$1 verwijst naar het profiel %s$2.</string>
|
||||
<string name="profileCouldNotBeDeleted">Profiel kan niet worden verwijderd.</string>
|
||||
<string name="noRepetition">geen herhaling</string>
|
||||
<string name="usingAuthentication">authenticatie gebruiken</string>
|
||||
<string name="toNumber">naar nummer</string>
|
||||
<string name="message">Bericht</string>
|
||||
<string name="onDays">op dagen</string>
|
||||
<string name="notSet">niet ingesteld</string>
|
||||
<string name="takeLauncherActivity">Automatisch zoeken</string>
|
||||
<string name="pickActivityManually">Handmatig kiezen</string>
|
||||
<string name="launcherNotFound">Een launcher-activiteit van deze app kon niet worden geïdentificeerd. U moet er handmatig een kiezen.</string>
|
||||
<string name="launcherOrManualExplanation">Eenvoudige modus: Automatisering kan proberen de opstartactiviteit van het gewenste programma te identificeren.\nU kunt ook handmatig een van de activiteiten van de toepassing kiezen.\nWat wil je?</string>
|
||||
</resources>
|
||||
|
@ -694,7 +694,6 @@
|
||||
<string name="tabsPlacement">Position of tab bar</string>
|
||||
<string name="tabsPlacementSummary">Choose where the tabs bar should be placed.</string>
|
||||
<string name="wifiApi30">Because Google screwed up yet another part of Android, starting with API 30 only the currently visible wifis can be displayed, not all the ones your device has connected to anymore.</string>
|
||||
<string name="smsDialogNotice">If you have not used a send-sms action in this program before, Android may show an additional confirmation dialog, asking you to allow sending messages. You need to select the \"always allow\" checkbox and confirm if you want this action to work in the background. It\'s advised to run this rule manually once to provoke this confirmation dialog.</string>
|
||||
<string name="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>
|
||||
@ -704,11 +703,10 @@
|
||||
<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>
|
||||
<string name="automationNotificationsIgnored">If you do not choose a specific app, but choose \"Any app\", notifications from Automation will be ignored to avoid loops.</string>
|
||||
<string name="repeatEveryXseconds">Repeat every x seconds</string>
|
||||
<string name="repeatEveryXsecondsWithVariable">repeat every %1$s seconds</string>
|
||||
<string name="enterRepetitionTime">You need to enter a positive non-decimal value for reptition time.</string>
|
||||
<string name="enterRepetitionTime">You need to enter a positive non-decimal value for repetition time.</string>
|
||||
<string name="elementSkipped">An element of the configuration file could not be read. The file may have been created by a newer program version.</string>
|
||||
<string name="donate">Donate</string>
|
||||
<string name="btTetheringNotice">This feature is confirmed to work up until Android 8.0. From some higher version upwards it ceases to work, but due to a lack of physical devices I cannot tell which one that is. On Android 11 it definitely ain\'t working anymore. If you have a version in between please let me know if it\'s working or not.</string>
|
||||
@ -719,7 +717,7 @@
|
||||
<string name="orientationPitch">Pitch:</string>
|
||||
<string name="orientationRoll">Roll:</string>
|
||||
<string name="enterValidNumbersIntoAllFields">Enter valid numbers in all fields.</string>
|
||||
<string name="deviceOrientationExplanation">When you move your device the below numbers will update. What you can see there, is the current orientation of your device measured in degrees. If it is in the desired orientation, click the apply button to copy the current values to the desired fields.\nBecause reaching this exact orientation ever again is highly unlikely you must also enter a tolerance. The is amount of degrees to which the orientation can deviate in either direction. 15° will result in a total angle of 30°, 15° in every direction.\nIf you only care about one specific axis, specify a tolerance of 180° for the two other ones.</string>
|
||||
<string name="deviceOrientationExplanation">When you move your device the below numbers will update. What you can see there, is the current orientation of your device measured in degrees. If it is in the desired orientation, click the apply button to copy the current values to the desired fields. Because reaching this exact orientation ever again is highly unlikely you must also enter a tolerance. This is amount of degrees to which the orientation can deviate in either direction. 15° will result in a total angle of 30°, 15° in every direction. If you only care about one specific axis, specify a tolerance of 180° for the two other ones.</string>
|
||||
<string name="wouldCurrentlyApply">Would currently apply?</string>
|
||||
<string name="deviceIsInCertainOrientation">the device is in a certain orientation</string>
|
||||
<string name="toleranceOf180OnlyAllowedIn2Fields">A tolerance of 180 is allowed for 2 tolerance fields only, not all 3. Otherwise the trigger would ALWAYS apply.</string>
|
||||
@ -730,10 +728,31 @@
|
||||
<string name="turnScreenOn">turn screen on</string>
|
||||
<string name="turnScreenOff">turn screen off</string>
|
||||
<string name="mustApply">Must apply</string>
|
||||
<string name="explanationDeviceOrientationDirection">If the checkbox is checked that means the device has to be in the orientation you specify. If it\'s not checked, any orientation that does NOT match your criteria will do.</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalTitle">Signal frequency</string>
|
||||
<string name="deviceOrientationTimeAcceptIntervalSummary">Accept new movement signals every x milliseconds</string>
|
||||
<string name="deviceOrientationSettings">Device orientation settings</string>
|
||||
<string name="android.permission.BIND_DEVICE_ADMIN">Device administrator</string>
|
||||
<string name="deviceAdminNote">Device administrator permissions required for at least 1 rule you created.</string>
|
||||
<string name="explanationDeviceOrientationDirection">If the checkbox is checked that means the device has to be in the orientation you specify. If it\'s not checked, any orientation that does NOT match your criteria will do.</string>
|
||||
<string name="permissionsRequiredNotAvailable">Your rules required permissions which cannot be requested from this installed flavor of Automation.</string>
|
||||
<string name="smsDialogNotice">If you have not used a send-sms action in this program before, Android may show an additional confirmation dialog, asking you to allow sending messages. You need to select the \"always allow\" checkbox and confirm if you want this action to work in the background. It\'s advised to run this rule manually once to provoke this confirmation dialog.</string>
|
||||
<string name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS">Exclude from battery optimization</string>
|
||||
<string name="recommendedForBetterReliability">Recommended for better reliability</string>
|
||||
<string name="needsToBeActive">Needs to be active</string>
|
||||
<string name="checkSettings">Check settings</string>
|
||||
<string name="profileActive">profile %1$s is active</string>
|
||||
<string name="profileNotActive">profile %1$s is not active</string>
|
||||
<string name="profileTriggerCheckSettings">If this checkbox is not disabled, it will only be checked if the selected profile has been the last one to be activated. It doesn\'t matter if any audio related settings have been changed externally. However if the checkbox is enabled, the current audio settings really need to be like defined in the profile. BEWARE: Checking the ringtone file is currently not supported, yet.</string>
|
||||
<string name="ruleXIsUsingProfileY">Cannot delete this profile. Rule %s$1 is referencing profile %s$2.</string>
|
||||
<string name="profileCouldNotBeDeleted">Profile could not be deleted.</string>
|
||||
<string name="noRepetition">no repetition</string>
|
||||
<string name="usingAuthentication">using authentication</string>
|
||||
<string name="toNumber">to number</string>
|
||||
<string name="message">message</string>
|
||||
<string name="onDays">on days</string>
|
||||
<string name="notSet">not set</string>
|
||||
<string name="takeLauncherActivity">Find automatically</string>
|
||||
<string name="pickActivityManually">Choose manually</string>
|
||||
<string name="launcherOrManualExplanation">Easy mode: Automation can try to identify the launcher activity of the desired program automatically. Alternatively you can also pick one of the application\'s activities manually. What would you like?</string>
|
||||
<string name="launcherNotFound">A launcher activity of this app could not be identified. You will have to pick one manually.</string>
|
||||
</resources>
|
16
fastlane/metadata/android/de-DE/changelogs/114.txt
Normal file
@ -0,0 +1,16 @@
|
||||
LESEN SIE DAS!!
|
||||
Regeln werden jetzt ein wenig anders ausgeführt - Das könnte einen Einfluß auf Ihre Regeln haben.
|
||||
Als simple Lösung, um mehrere Ausführungen der selben Regel zu verhindern, wurde bisher nie die selbe 2 mal hintereinander ausgeführt. Das wird jetzt gründlicher geprüft. Die Bedingungen einer Regel werden überwacht. Wenigstens eine davon muß zwischenzeitlich NICHT zugetroffen haben, um eine weitere Ausführung der Regel zu gestatten.
|
||||
|
||||
Details:
|
||||
* Behoben: Endlosschleife im Benachrichtigungs-Auslöser
|
||||
* Behoben: Absturz beim Editieren eines WLAN Auslösers
|
||||
* Behoben: Object wurden nach dem Import nicht richtig neu geladen
|
||||
* Behoben: Negative Koordinatenwerte für Positionen erlaubt (waren unabsichtlich nicht erlaubt)
|
||||
* Behoben: Sehr einfacher Fix dafür, daß die Aktionsliste im Dunklen Modus nicht überall lesbar waren (hat nur ganz wenige Chinesische Geräte betroffen). Das bedeutet noch keine vollständige Unterstützung für den Dunklen Modus.
|
||||
* Behoben: Fehler beim Editieren von Bildschirm einschalten (Gerät aufwecken)
|
||||
* Behoben: Fehler beim Editieren der Text-sprechen Aktion
|
||||
* Neue Funktion: Zeitauslöser kann nun regelmäßig zutreffen (einfache Variante)
|
||||
* Neue Funktion: Bluetooth tethering (funktioniert nicht auf höheren Android Versionen)
|
||||
* Neue Funktion: Geräteausrichtung als Auslöser
|
||||
* Neue Übersetzung: Niederländisch (Dank geht an eine anonyme Person)
|
1
fastlane/metadata/android/de-DE/changelogs/115.txt
Normal file
@ -0,0 +1 @@
|
||||
* Behoben: Stumm-Modus konnte nicht geschaltet werden.
|
4
fastlane/metadata/android/de-DE/changelogs/116.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Neue Berechtigung: Ausschluss von der Batterieoptimierung
|
||||
* Neuer Auslöser: Profile können als Auslöser verwendet werden
|
||||
* Behoben: Fehler im Geräteausrichtungs-Auslöser
|
||||
* Aktion "App starten" etwas vereinfacht
|
16
fastlane/metadata/android/en-US/changelogs/114.txt
Normal file
@ -0,0 +1,16 @@
|
||||
READ THIS!!
|
||||
Behavior change in relation to rule execution - This may have an impact on your existing rules
|
||||
As a cheap avoidance of multiple executions in the past the same rule would not be executed twice in a row. That is now performed more thoroughly. A rule's triggers are being monitored. At least one of them has to NOT apply to allow a further execution of the rule.
|
||||
|
||||
Details:
|
||||
* Fixed: Infinite loop in notification trigger.
|
||||
* Fixed: Crash when editing a wifi trigger
|
||||
* Fixed: Objects not refreshing after config import
|
||||
* Fixed: Enabled negative location coordinates (used to be forbidden unintentionally)
|
||||
* Fixed: Very simple fix where trigger and action list was not readable in Dark Mode (affected only few Chinese devices). This is no full support of Dark Mode, yet.
|
||||
* Fixed: Bug in Turn screen on (wake up device)
|
||||
* Fixed: Bug when adding speakText action
|
||||
* New feature: Time trigger can now operate reoccurring (simple)
|
||||
* New feature: Toggle Bluetooth tethering (not working on higher Android versions)
|
||||
* New feature: Device orientation trigger
|
||||
* New translation: Dutch (credits go to anonymous)
|
1
fastlane/metadata/android/en-US/changelogs/115.txt
Normal file
@ -0,0 +1 @@
|
||||
* Fixed: Silent mode did not set on newer phones.
|
4
fastlane/metadata/android/en-US/changelogs/116.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* New permission requested: Exclusion from battery optimization
|
||||
* New trigger: Profiles can be used as trigger
|
||||
* Fixed: Bug in orientation trigger
|
||||
* "Start app" action simplified a bit
|
1
fastlane/metadata/android/en-US/changelogs/117.txt
Normal file
@ -0,0 +1 @@
|
||||
* New action: Create notification
|
16
fastlane/metadata/android/es-ES/changelogs/114.txt
Normal file
@ -0,0 +1,16 @@
|
||||
¡¡LEE ESTO!!
|
||||
Cambio de comportamiento en relación con la ejecución de reglas: esto puede tener un impacto en las reglas existentes
|
||||
Como una evitación barata de múltiples ejecuciones en el pasado, la misma regla no se ejecutaría dos veces seguidas. Eso ahora se realiza más a fondo. Los desencadenantes de una regla están siendo monitoreados. Al menos uno de ellos tiene que NO aplicar para permitir una mayor ejecución de la regla.
|
||||
|
||||
Detalles:
|
||||
* Corregido: Bucle infinito en el disparador de notificaciones.
|
||||
* Corregido: Bloqueo al editar un disparador wifi
|
||||
* Corregido: Los objetos no se actualizan después de la importación de la configuración
|
||||
* Corregido: Coordenadas de ubicación negativas habilitadas (solían prohibirse involuntariamente)
|
||||
* Corregido: Solución muy simple donde el disparador y la lista de acciones no eran legibles en modo oscuro (afectaba solo a unos pocos dispositivos chinos). Esto no es un soporte completo del Modo Oscuro, todavía.
|
||||
* Corregido: Error en la pantalla de encendido (activar dispositivo)
|
||||
* Corregido: Error al agregar la acción speakText
|
||||
* Nueva característica: el disparador de tiempo ahora puede funcionar de forma recurrente (simple)
|
||||
* Nueva característica: Alternar la conexión Bluetooth (no funciona en versiones superiores de Android)
|
||||
* Nueva característica: disparador de orientación del dispositivo
|
||||
* Nueva traducción: holandés (los créditos van a anónimos)
|
1
fastlane/metadata/android/es-ES/changelogs/115.txt
Normal file
@ -0,0 +1 @@
|
||||
* Corregido: El modo silencioso no se configuró en los teléfonos más nuevos.
|
4
fastlane/metadata/android/es-ES/changelogs/116.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Nuevo permiso solicitado: Exclusión de la optimización de la batería
|
||||
* Nuevo disparador: los perfiles se pueden utilizar como disparador
|
||||
* Corregido: Error en el disparador de orientación
|
||||
* La acción "Iniciar aplicación" se simplificó un poco
|
13
fastlane/metadata/android/it-IT/changelogs/114.txt
Normal file
@ -0,0 +1,13 @@
|
||||
LEGGI QUESTO!! Modifica del comportamento in relazione all'esecuzione delle regole - Ciò può avere un impatto sulle regole esistenti
|
||||
Come evitamento economico di esecuzioni multiple in passato, la stessa regola non sarebbe stata eseguita due volte di seguito. Questo viene ora eseguito in modo più approfondito. I trigger di una regola vengono monitorati. Almeno uno di essi NON deve applicarsi per consentire un'ulteriore esecuzione della regola.
|
||||
|
||||
Dettagli: * Risolto: ciclo infinito nel trigger di notifica. * Risolto: Crash durante la modifica di un trigger wifi
|
||||
* Risolto: oggetti non aggiornati dopo l'importazione della configurazione
|
||||
* Risolto: abilitate le coordinate di posizione negativa (utilizzate per essere vietate involontariamente)
|
||||
* Risolto: correzione molto semplice in cui l'elenco dei trigger e delle azioni non era leggibile in modalità oscura (interessava solo pochi dispositivi cinesi). Questo non è ancora il pieno supporto della modalità oscura.
|
||||
* Risolto: Bug in Accendi schermo (dispositivo di riattivazione)
|
||||
* Risolto: Bug durante l'aggiunta dell'azione speakText
|
||||
* Nuova funzione: il trigger temporale può ora funzionare ricorrendo (semplice)
|
||||
* Nuova funzione: Attiva/disattiva il tethering Bluetooth (non funziona su versioni Android superiori)
|
||||
* Nuova funzione: trigger di orientamento del dispositivo
|
||||
* Nuova traduzione: olandese (i crediti vanno a anonimo)
|
1
fastlane/metadata/android/it-IT/changelogs/115.txt
Normal file
@ -0,0 +1 @@
|
||||
* Risolto: la modalità silenziosa non è stata impostata sui telefoni più recenti.
|
4
fastlane/metadata/android/it-IT/changelogs/116.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Nuova autorizzazione richiesta: esclusione dall'ottimizzazione della batteria
|
||||
* Nuovo trigger: i profili possono essere utilizzati come trigger
|
||||
* Risolto: Bug nel trigger di orientamento
|
||||
* Azione "Start app" semplificata un po '
|
85
fastlane/metadata/android/it-IT/full_description.txt
Normal file
@ -0,0 +1,85 @@
|
||||
Crea regole composte da eventi ed azioni. Un buon esempio sarebbe una regola come "Silenzia il telefono in ufficio".
|
||||
|
||||
Ecco la lista di eventi ed azioni supportate:
|
||||
|
||||
Eventi supportati:
|
||||
* Posizione
|
||||
* Data/Ora
|
||||
* Stato di carica
|
||||
* Livello batteria
|
||||
* Connessione USB con il computer attiva
|
||||
* Velocità attuale
|
||||
* Rumore di fondo (solo fino ad Android 7)
|
||||
* Connessione Wifi
|
||||
* Altre applicazioni in esecuzione
|
||||
* Modalità volo
|
||||
* Stato del roaming
|
||||
* Etichetta NFC
|
||||
* Connessione Bluetooth
|
||||
* Auriculari connessi
|
||||
* Chiamata in esecuzione
|
||||
* Notificazione di un altra applicazione
|
||||
* Orientamento del dispositivo (giroscopio)
|
||||
|
||||
Azioni supportate:
|
||||
* Cambia lo stato del wifi
|
||||
* Cambia lo stato del bluetooth
|
||||
* Controlla il tethering USB
|
||||
* Controlla il tethering wifi
|
||||
* Controlla il tethering Bluetooth
|
||||
* Controlla la rotazione automatica dello schermo
|
||||
* Effettua una richiesta HTTP
|
||||
* Cambia suoneria/opzioni sonore
|
||||
* Avvia un'altra applicazione
|
||||
* Aspetta (fra azioni)
|
||||
* Attiva o disattiva lo schermo
|
||||
* Controlla modalità volo
|
||||
* Controlla la connessione dati
|
||||
* Pronuncia testo
|
||||
* Apri il lettore musicale
|
||||
* Cambia la luminosità dello schermo
|
||||
* Manda un messaggio di testo
|
||||
* Esegui un file musicale
|
||||
|
||||
È piuttosto difficile mantere questa applicazione funzionante su tutti gli hardware esistenti ed includendo tutti i cambi che Android riceve fra una versione e l'altra. Posso effettuare tests nell'emulatore, ma non sarà possibile trovare tutti gli errori.
|
||||
Pertanto, se una certa funzione non funziona sul tuo dispositivo - fammelo sapere. Nel corso degli anni ho potuto risolvere tutti gli errori che sono stati riportati in maniera ragionevole. Infatti, per questo, dipendo dalle informazioni condivise.
|
||||
|
||||
Se hai un problema e stai pensando di contattarmi, per favore:
|
||||
- assicurati di aggiornare l'applicazione all'ultima versione e controlla se il problema continua.
|
||||
- controlla questa lista di problemi conosciuti: https://server47.de/automation/index.php#knownProblems
|
||||
|
||||
Donativi sono sicuramente una buona forma di motivarmi, ma non l'unica :-)
|
||||
* Se vuoi darmi il tuo supporto, puoi anche lasciare una rassegna positiva su Google Play (https://play.google.com/store/apps/details?id=com.jens.automation2).
|
||||
* Inoltre, ho sempre bisogno di aiuto per tradurre l'applicazione.
|
||||
Inglese, Tedesco e un po' di Spagnolo son parte delle mie abilità. Ma per tutte le altre, apprezzo molto ogni aiuto.
|
||||
|
||||
Una spiegazione di tutti i permessi si trova qui:
|
||||
https://server47.de/automation/permissions_en.html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1
fastlane/metadata/android/it-IT/short_description.txt
Normal file
@ -0,0 +1 @@
|
||||
Automatizza attività sul tuo dispositivo tramite la creazione di regole.
|
1
fastlane/metadata/android/nl-NL/changelogs/115.txt
Normal file
@ -0,0 +1 @@
|
||||
* Opgelost: Stille modus is niet ingesteld op nieuwere telefoons.
|
4
fastlane/metadata/android/nl-NL/changelogs/116.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Nieuwe toestemming gevraagd: Uitsluiting van batterij optimalisatie
|
||||
* Nieuwe trigger: Profielen kunnen worden gebruikt als trigger
|
||||
* Opgelost: Bug in oriëntatie trigger
|
||||
* "Start app" actie een beetje vereenvoudigd
|
BIN
fastlane/metadata/android/nl-NL/images/icon.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
fastlane/metadata/android/nl-NL/images/phoneScreenshots/1.png
Normal file
After Width: | Height: | Size: 195 KiB |
BIN
fastlane/metadata/android/nl-NL/images/phoneScreenshots/2.png
Normal file
After Width: | Height: | Size: 110 KiB |
BIN
fastlane/metadata/android/nl-NL/images/phoneScreenshots/3.png
Normal file
After Width: | Height: | Size: 146 KiB |
BIN
fastlane/metadata/android/nl-NL/images/phoneScreenshots/4.png
Normal file
After Width: | Height: | Size: 110 KiB |