Compare commits
No commits in common. "e76f9f69db80943ffa15236705fa246f499d854c" and "2e3e829abbdf4f82c629b98e620300609ce0a8dc" have entirely different histories.
e76f9f69db
...
2e3e829abb
@ -8,11 +8,11 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.jens.automation2"
|
applicationId "com.jens.automation2"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
compileSdkVersion 31
|
compileSdkVersion 29
|
||||||
buildToolsVersion '29.0.2'
|
buildToolsVersion '29.0.2'
|
||||||
useLibrary 'org.apache.http.legacy'
|
useLibrary 'org.apache.http.legacy'
|
||||||
versionCode 118
|
versionCode 117
|
||||||
versionName "1.7.4"
|
versionName "1.7.3"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@ -60,7 +60,6 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.jetbrains:annotations:15.0'
|
|
||||||
googlePlayFlavorImplementation 'com.google.firebase:firebase-appindexing:20.0.0'
|
googlePlayFlavorImplementation 'com.google.firebase:firebase-appindexing:20.0.0'
|
||||||
googlePlayFlavorImplementation 'com.google.android.gms:play-services-location:18.0.0'
|
googlePlayFlavorImplementation 'com.google.android.gms:play-services-location:18.0.0'
|
||||||
|
|
||||||
@ -72,9 +71,9 @@ dependencies {
|
|||||||
|
|
||||||
//implementation "androidx.security:security-crypto:1.0.0"
|
//implementation "androidx.security:security-crypto:1.0.0"
|
||||||
//implementation "androidx.security:security-identity-credential:1.0.0-alpha02"
|
//implementation "androidx.security:security-identity-credential:1.0.0-alpha02"
|
||||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||||
implementation 'com.google.android.material:material:1.3.0'
|
implementation 'com.google.android.material:material:1.3.0'
|
||||||
testImplementation 'junit:junit:4.+'
|
testImplementation 'junit:junit:4.+'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||||
}
|
}
|
@ -11,8 +11,8 @@
|
|||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 116,
|
"versionCode": 117,
|
||||||
"versionName": "1.7.2-googlePlay",
|
"versionName": "1.7.3-googlePlay",
|
||||||
"outputFile": "app-googlePlayFlavor-release.apk"
|
"outputFile": "app-googlePlayFlavor-release.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -147,17 +147,14 @@
|
|||||||
<activity android:name=".ActivityDisplayLongMessage" />
|
<activity android:name=".ActivityDisplayLongMessage" />
|
||||||
<activity android:name=".ActivityManageActionSendTextMessage" />
|
<activity android:name=".ActivityManageActionSendTextMessage" />
|
||||||
<activity android:name=".ActivityManageActionPlaySound" />
|
<activity android:name=".ActivityManageActionPlaySound" />
|
||||||
<activity android:name=".ActivityManageActionCloseNotification" />
|
|
||||||
<activity android:name=".ActivityManageTriggerProfile" />
|
<activity android:name=".ActivityManageTriggerProfile" />
|
||||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||||
<activity android:name=".ActivityControlCenter" />
|
<activity android:name=".ActivityMaintenance" />
|
||||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||||
<activity android:name=".ActivityManageActionCreateNotification" />
|
|
||||||
<activity android:name=".ActivityManageTriggerDeviceOrientation" />
|
<activity android:name=".ActivityManageTriggerDeviceOrientation" />
|
||||||
<activity android:name=".ActivityHelp" />
|
<activity android:name=".ActivityHelp" />
|
||||||
<activity android:name=".ActivityManageActionVibrate" />
|
<activity android:name=".ActivityManageActionVibrate" />
|
||||||
<activity android:name=".ActivityManageActionControlMedia" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ActivityMainTabLayout"
|
android:name=".ActivityMainTabLayout"
|
||||||
android:launchMode="singleTask">
|
android:launchMode="singleTask">
|
||||||
|
@ -556,7 +556,7 @@ public class Rule implements Comparable<Rule>
|
|||||||
innerloop:
|
innerloop:
|
||||||
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||||
{
|
{
|
||||||
if(oneTrigger.getTriggerType().equals(triggerType))
|
if(oneTrigger.getTriggerType() == triggerType)
|
||||||
{
|
{
|
||||||
ruleCandidates.add(oneRule);
|
ruleCandidates.add(oneRule);
|
||||||
break innerloop; // we don't need to check the other triggers in the same rule
|
break innerloop; // we don't need to check the other triggers in the same rule
|
||||||
@ -567,26 +567,6 @@ public class Rule implements Comparable<Rule>
|
|||||||
return ruleCandidates;
|
return ruleCandidates;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ArrayList<Rule> findRuleCandidates(Action.Action_Enum actionType)
|
|
||||||
{
|
|
||||||
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
|
||||||
|
|
||||||
for(Rule oneRule : ruleCollection)
|
|
||||||
{
|
|
||||||
innerloop:
|
|
||||||
for(Action oneAction : oneRule.getActionSet())
|
|
||||||
{
|
|
||||||
if(oneAction.getAction().equals(actionType))
|
|
||||||
{
|
|
||||||
ruleCandidates.add(oneRule);
|
|
||||||
break innerloop; // we don't need to check the other actions in the same rule
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ruleCandidates;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ArrayList<Rule> findRuleCandidatesByPoi(PointOfInterest searchPoi, boolean triggerParameter)
|
public static ArrayList<Rule> findRuleCandidatesByPoi(PointOfInterest searchPoi, boolean triggerParameter)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "RuleSearch", "Searching for rules referencing POI " + searchPoi.getName() + ". Total size of ruleset: " + String.valueOf(ruleCollection.size()), 4);
|
Miscellaneous.logEvent("i", "RuleSearch", "Searching for rules referencing POI " + searchPoi.getName() + ". Total size of ruleset: " + String.valueOf(ruleCollection.size()), 4);
|
||||||
@ -628,6 +608,186 @@ public class Rule implements Comparable<Rule>
|
|||||||
return ruleCandidates;
|
return ruleCandidates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*public static ArrayList<Rule> findRuleCandidatesByTimeFrame(TimeFrame searchTimeFrame, boolean triggerParameter)
|
||||||
|
{
|
||||||
|
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||||
|
|
||||||
|
for(int i=0; i<ruleCollection.size(); i++)
|
||||||
|
{
|
||||||
|
innerloop:
|
||||||
|
for(int j=0; j<ruleCollection.get(i).getTriggerSet().size(); j++)
|
||||||
|
{
|
||||||
|
if(ruleCollection.get(i).getTriggerSet().get(j).getTriggerType() == Trigger.Trigger_Enum.timeFrame)
|
||||||
|
{
|
||||||
|
if(ruleCollection.get(i).getTriggerSet().get(j).getTimeFrame().equals(searchTimeFrame) && ruleCollection.get(i).getTriggerSet().get(j).getTriggerParameter() == triggerParameter)
|
||||||
|
{
|
||||||
|
ruleCandidates.add(ruleCollection.get(i));
|
||||||
|
break innerloop; //if the poi is found we don't need to search the other triggers in the same rule
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ruleCandidates;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/*public static ArrayList<Rule> findRuleCandidatesByTime(Time searchTime)
|
||||||
|
{
|
||||||
|
Miscellaneous.logEvent("i", "RuleSearch", "Searching for rules with TimeFrame with time " + searchTime.toString() + ". RuleCollection-Size: " + String.valueOf(ruleCollection.size()), 3);;
|
||||||
|
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||||
|
|
||||||
|
for(Rule oneRule : ruleCollection)
|
||||||
|
{
|
||||||
|
innerloop:
|
||||||
|
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.timeFrame)
|
||||||
|
{
|
||||||
|
Miscellaneous.logEvent("i", "RuleSearch", "Searching interval: " + oneTrigger.getTimeFrame().getTriggerTimeStart().toString() + " to " + oneTrigger.getTimeFrame().getTriggerTimeStop().toString(), 5);
|
||||||
|
Miscellaneous.logEvent("i", "RuleSearch", "interval start: " + String.valueOf(oneTrigger.getTimeFrame().getTriggerTimeStart().getTime()), 5);
|
||||||
|
Miscellaneous.logEvent("i", "RuleSearch", "search time: " + String.valueOf(searchTime.getTime()), 5);
|
||||||
|
Miscellaneous.logEvent("i", "RuleSearch", "interval stop: " + String.valueOf(oneTrigger.getTimeFrame().getTriggerTimeStop().getTime()), 5);
|
||||||
|
|
||||||
|
if(oneTrigger.getTimeFrame().getTriggerTimeStart().getTime() > oneTrigger.getTimeFrame().getTriggerTimeStop().getTime())
|
||||||
|
{
|
||||||
|
Miscellaneous.logEvent("i", "Timeframe search", "Rule (" + oneRule.getName() + ") stretches over midnight.", 5);
|
||||||
|
if(oneTrigger.getTimeFrame().getTriggerTimeStart().getTime() <= searchTime.getTime() || searchTime.getTime() <= oneTrigger.getTimeFrame().getTriggerTimeStop().getTime()+20000) //add 20 seconds because of delay
|
||||||
|
{
|
||||||
|
ruleCandidates.add(oneRule);
|
||||||
|
break innerloop; //if the poi is found we don't need to search the other triggers in the same rule
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(oneTrigger.getTimeFrame().getTriggerTimeStart().getTime() <= searchTime.getTime() && searchTime.getTime() <= oneTrigger.getTimeFrame().getTriggerTimeStop().getTime()+20000) //add 20 seconds because of delay
|
||||||
|
{
|
||||||
|
Miscellaneous.logEvent("i", "RuleSearch", "Rule found (" + oneRule.getName() + ") with TimeFrame with time " + searchTime.toString(), 3);
|
||||||
|
ruleCandidates.add(oneRule);
|
||||||
|
break innerloop; //if the poi is found we don't need to search the other triggers in the same rule
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Miscellaneous.logEvent("i", "RuleSearch", String.valueOf(ruleCandidates.size()) + " Rule(s) found with TimeFrame with time " + searchTime.toString(), 3);
|
||||||
|
|
||||||
|
return ruleCandidates;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/*public static ArrayList<Rule> findRuleCandidatesByCharging(boolean triggerParameter)
|
||||||
|
{
|
||||||
|
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||||
|
|
||||||
|
for(Rule oneRule : ruleCollection)
|
||||||
|
{
|
||||||
|
innerloop:
|
||||||
|
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.charging)
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerParameter() == triggerParameter)
|
||||||
|
{
|
||||||
|
ruleCandidates.add(oneRule);
|
||||||
|
break innerloop; //if the poi is found we don't need to search the other triggers in the same rule
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ruleCandidates;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/*public static ArrayList<Rule> findRuleCandidatesByUsbHost(boolean triggerParameter)
|
||||||
|
{
|
||||||
|
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||||
|
|
||||||
|
for(Rule oneRule : ruleCollection)
|
||||||
|
{
|
||||||
|
innerloop:
|
||||||
|
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.usb_host_connection)
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerParameter() == triggerParameter)
|
||||||
|
{
|
||||||
|
ruleCandidates.add(oneRule);
|
||||||
|
break innerloop; //if the poi is found we don't need to search the other triggers in the same rule
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ruleCandidates;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/*public static ArrayList<Rule> findRuleCandidatesByAirplaneMode(boolean triggerParameter)
|
||||||
|
{
|
||||||
|
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||||
|
|
||||||
|
for(Rule oneRule : ruleCollection)
|
||||||
|
{
|
||||||
|
innerloop:
|
||||||
|
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.airplaneMode)
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerParameter() == triggerParameter)
|
||||||
|
{
|
||||||
|
ruleCandidates.add(oneRule);
|
||||||
|
break innerloop; //we don't need to search the other triggers in the same rule
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ruleCandidates;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/*public static ArrayList<Rule> findRuleCandidatesByRoaming(boolean triggerParameter)
|
||||||
|
{
|
||||||
|
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||||
|
|
||||||
|
for(Rule oneRule : ruleCollection)
|
||||||
|
{
|
||||||
|
innerloop:
|
||||||
|
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.roaming)
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerParameter() == triggerParameter)
|
||||||
|
{
|
||||||
|
ruleCandidates.add(oneRule);
|
||||||
|
break innerloop; //we don't need to search the other triggers in the same rule
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ruleCandidates;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/*public static ArrayList<Rule> findRuleCandidatesByPhoneCall(String direction)
|
||||||
|
{
|
||||||
|
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||||
|
|
||||||
|
for(Rule oneRule : ruleCollection)
|
||||||
|
{
|
||||||
|
innerloop:
|
||||||
|
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.phoneCall)
|
||||||
|
{
|
||||||
|
String[] elements = oneTrigger.getTriggerParameter2().split(triggerParameter2Split);
|
||||||
|
if(elements[1].equals(Trigger.triggerPhoneCallDirectionAny) || elements[1].equals(direction))
|
||||||
|
{
|
||||||
|
ruleCandidates.add(oneRule);
|
||||||
|
break innerloop; //we don't need to search the other triggers in the same rule
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ruleCandidates;
|
||||||
|
}*/
|
||||||
|
|
||||||
public static ArrayList<Rule> findRuleCandidatesByPoi(PointOfInterest searchPoi)
|
public static ArrayList<Rule> findRuleCandidatesByPoi(PointOfInterest searchPoi)
|
||||||
{
|
{
|
||||||
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||||
@ -651,6 +811,29 @@ public class Rule implements Comparable<Rule>
|
|||||||
return ruleCandidates;
|
return ruleCandidates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*public static ArrayList<Rule> findRuleCandidatesByHeadphoneJack(boolean triggerParameter)
|
||||||
|
{
|
||||||
|
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||||
|
|
||||||
|
for(Rule oneRule : ruleCollection)
|
||||||
|
{
|
||||||
|
innerloop:
|
||||||
|
for(Trigger oneTrigger : oneRule.getTriggerSet())
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerType() == Trigger.Trigger_Enum.headsetPlugged)
|
||||||
|
{
|
||||||
|
if(oneTrigger.getTriggerParameter() == triggerParameter)
|
||||||
|
{
|
||||||
|
ruleCandidates.add(oneRule);
|
||||||
|
break innerloop; //we don't need to search the other triggers in the same rule
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ruleCandidates;
|
||||||
|
}*/
|
||||||
|
|
||||||
public static ArrayList<Rule> findRuleCandidatesByTriggerProfile(Profile profile)
|
public static ArrayList<Rule> findRuleCandidatesByTriggerProfile(Profile profile)
|
||||||
{
|
{
|
||||||
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
ArrayList<Rule> ruleCandidates = new ArrayList<Rule>();
|
||||||
|
@ -145,17 +145,14 @@
|
|||||||
<activity android:name=".ActivityDisplayLongMessage" />
|
<activity android:name=".ActivityDisplayLongMessage" />
|
||||||
<activity android:name=".ActivityManageActionSendTextMessage" />
|
<activity android:name=".ActivityManageActionSendTextMessage" />
|
||||||
<activity android:name=".ActivityManageActionPlaySound" />
|
<activity android:name=".ActivityManageActionPlaySound" />
|
||||||
<activity android:name=".ActivityManageActionCloseNotification" />
|
|
||||||
<activity android:name=".ActivityManageTriggerProfile" />
|
<activity android:name=".ActivityManageTriggerProfile" />
|
||||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||||
<activity android:name=".ActivityControlCenter" />
|
<activity android:name=".ActivityMaintenance" />
|
||||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||||
<activity android:name=".ActivityManageActionCreateNotification" />
|
|
||||||
<activity android:name=".ActivityManageTriggerDeviceOrientation" />
|
<activity android:name=".ActivityManageTriggerDeviceOrientation" />
|
||||||
<activity android:name=".ActivityHelp" />
|
<activity android:name=".ActivityHelp" />
|
||||||
<activity android:name=".ActivityManageActionVibrate" />
|
<activity android:name=".ActivityManageActionVibrate" />
|
||||||
<activity android:name=".ActivityManageActionControlMedia" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ActivityMainTabLayout"
|
android:name=".ActivityMainTabLayout"
|
||||||
android:launchMode="singleTask">
|
android:launchMode="singleTask">
|
||||||
|
@ -139,17 +139,14 @@
|
|||||||
<activity android:name=".ActivityDisplayLongMessage" />
|
<activity android:name=".ActivityDisplayLongMessage" />
|
||||||
<activity android:name=".ActivityManageActionSendTextMessage" />
|
<activity android:name=".ActivityManageActionSendTextMessage" />
|
||||||
<activity android:name=".ActivityManageActionPlaySound" />
|
<activity android:name=".ActivityManageActionPlaySound" />
|
||||||
<activity android:name=".ActivityManageActionCloseNotification" />
|
|
||||||
<activity android:name=".ActivityManageTriggerProfile" />
|
<activity android:name=".ActivityManageTriggerProfile" />
|
||||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||||
<activity android:name=".ActivityControlCenter" />
|
<activity android:name=".ActivityMaintenance" />
|
||||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||||
<activity android:name=".ActivityManageActionCreateNotification" />
|
|
||||||
<activity android:name=".ActivityManageTriggerDeviceOrientation" />
|
<activity android:name=".ActivityManageTriggerDeviceOrientation" />
|
||||||
<activity android:name=".ActivityHelp" />
|
<activity android:name=".ActivityHelp" />
|
||||||
<activity android:name=".ActivityManageActionVibrate" />
|
<activity android:name=".ActivityManageActionVibrate" />
|
||||||
<activity android:name=".ActivityManageActionControlMedia" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ActivityMainTabLayout"
|
android:name=".ActivityMainTabLayout"
|
||||||
android:launchMode="singleTask">
|
android:launchMode="singleTask">
|
||||||
|
@ -2,7 +2,6 @@ package com.jens.automation2;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Build;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@ -18,7 +17,7 @@ public class Action
|
|||||||
Rule parentRule = null;
|
Rule parentRule = null;
|
||||||
|
|
||||||
public static final String actionParameter2Split = "ap2split";
|
public static final String actionParameter2Split = "ap2split";
|
||||||
public static final String intentPairSeparator = "intPairSplit";
|
public static final String intentPairSeperator = "intPairSplit";
|
||||||
public static final String vibrateSeparator = ",";
|
public static final String vibrateSeparator = ",";
|
||||||
|
|
||||||
public enum Action_Enum {
|
public enum Action_Enum {
|
||||||
@ -42,12 +41,9 @@ public class Action
|
|||||||
setDataConnection,
|
setDataConnection,
|
||||||
speakText,
|
speakText,
|
||||||
playMusic,
|
playMusic,
|
||||||
controlMediaPlayback,
|
|
||||||
setScreenBrightness,
|
setScreenBrightness,
|
||||||
playSound,
|
playSound,
|
||||||
vibrate,
|
vibrate,
|
||||||
createNotification,
|
|
||||||
closeNotification,
|
|
||||||
sendTextMessage;
|
sendTextMessage;
|
||||||
|
|
||||||
public String getFullName(Context context)
|
public String getFullName(Context context)
|
||||||
@ -106,18 +102,12 @@ public class Action
|
|||||||
return context.getResources().getString(R.string.actionSpeakText);
|
return context.getResources().getString(R.string.actionSpeakText);
|
||||||
case playMusic:
|
case playMusic:
|
||||||
return context.getResources().getString(R.string.actionPlayMusic);
|
return context.getResources().getString(R.string.actionPlayMusic);
|
||||||
case controlMediaPlayback:
|
|
||||||
return context.getResources().getString(R.string.actionMediaControl);
|
|
||||||
case playSound:
|
case playSound:
|
||||||
return context.getResources().getString(R.string.playSound);
|
return context.getResources().getString(R.string.playSound);
|
||||||
case sendTextMessage:
|
case sendTextMessage:
|
||||||
return context.getResources().getString(R.string.sendTextMessage);
|
return context.getResources().getString(R.string.sendTextMessage);
|
||||||
case setScreenBrightness:
|
case setScreenBrightness:
|
||||||
return context.getResources().getString(R.string.setScreenBrightness);
|
return context.getResources().getString(R.string.setScreenBrightness);
|
||||||
case createNotification:
|
|
||||||
return context.getResources().getString(R.string.createNotification);
|
|
||||||
case closeNotification:
|
|
||||||
return context.getResources().getString(R.string.closeNotifications);
|
|
||||||
default:
|
default:
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
@ -164,8 +154,6 @@ public class Action
|
|||||||
{
|
{
|
||||||
StringBuilder returnString = new StringBuilder();
|
StringBuilder returnString = new StringBuilder();
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
switch(getAction())
|
switch(getAction())
|
||||||
{
|
{
|
||||||
case setWifi:
|
case setWifi:
|
||||||
@ -228,9 +216,6 @@ public class Action
|
|||||||
case playMusic:
|
case playMusic:
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionPlayMusic));
|
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionPlayMusic));
|
||||||
break;
|
break;
|
||||||
case controlMediaPlayback:
|
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.actionMediaControl));
|
|
||||||
break;
|
|
||||||
case sendTextMessage:
|
case sendTextMessage:
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.sendTextMessage));
|
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.sendTextMessage));
|
||||||
break;
|
break;
|
||||||
@ -252,12 +237,6 @@ public class Action
|
|||||||
case setScreenBrightness:
|
case setScreenBrightness:
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.setScreenBrightness));
|
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.setScreenBrightness));
|
||||||
break;
|
break;
|
||||||
case createNotification:
|
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.createNotification));
|
|
||||||
break;
|
|
||||||
case closeNotification:
|
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.closeNotifications));
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
returnString.append(action.toString());
|
returnString.append(action.toString());
|
||||||
}
|
}
|
||||||
@ -277,7 +256,7 @@ public class Action
|
|||||||
}
|
}
|
||||||
else if(this.getAction().equals(Action_Enum.startOtherActivity))
|
else if(this.getAction().equals(Action_Enum.startOtherActivity))
|
||||||
{
|
{
|
||||||
returnString.append(": " + parameter2.replace(Action.intentPairSeparator, "/"));
|
returnString.append(": " + parameter2.replace(Action.intentPairSeperator, "/"));
|
||||||
}
|
}
|
||||||
else if(this.getAction().equals(Action_Enum.sendTextMessage))
|
else if(this.getAction().equals(Action_Enum.sendTextMessage))
|
||||||
{
|
{
|
||||||
@ -300,58 +279,9 @@ public class Action
|
|||||||
|
|
||||||
returnString.append(" / " + Integer.parseInt(parameter2) + "%");
|
returnString.append(" / " + Integer.parseInt(parameter2) + "%");
|
||||||
}
|
}
|
||||||
else if (this.getAction().equals(Action_Enum.closeNotification))
|
|
||||||
{
|
|
||||||
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.from) + " ");
|
|
||||||
|
|
||||||
String parts[] = this.getParameter2().split(Action.actionParameter2Split);
|
|
||||||
if (parts[0].equals(Trigger.anyAppString))
|
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.anyApp));
|
|
||||||
else
|
else
|
||||||
returnString.append(parts[0]);
|
if (parameter2 != null && parameter2.length() > 0)
|
||||||
|
returnString.append(": " + parameter2);
|
||||||
if (!StringUtils.isBlank(parts[2]))
|
|
||||||
returnString.append(", " + Miscellaneous.getAnyContext().getResources().getString(R.string.ifString) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.title) + " " + Trigger.getMatchString(parts[1]) + " " + parts[2]);
|
|
||||||
|
|
||||||
if (parts.length > 4 && !StringUtils.isBlank(parts[4]))
|
|
||||||
returnString.append(", " + Miscellaneous.getAnyContext().getResources().getString(R.string.ifString) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.text) + " " + Trigger.getMatchString(parts[3]) + " " + parts[4]);
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(this.getAction().equals(Action_Enum.controlMediaPlayback))
|
|
||||||
{
|
|
||||||
returnString.append(": ");
|
|
||||||
|
|
||||||
switch (this.getParameter2())
|
|
||||||
{
|
|
||||||
case "0":
|
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.playPause));
|
|
||||||
break;
|
|
||||||
case "1":
|
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.play));
|
|
||||||
break;
|
|
||||||
case "2":
|
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.pause));
|
|
||||||
break;
|
|
||||||
case "3":
|
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.stop));
|
|
||||||
break;
|
|
||||||
case "4":
|
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.previous));
|
|
||||||
break;
|
|
||||||
case "5":
|
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.next));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.unknown));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (parameter2 != null && parameter2.length() > 0)
|
|
||||||
returnString.append(": " + parameter2.replace(Action.actionParameter2Split, "; "));
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
returnString.append(": " + Miscellaneous.getAnyContext().getResources().getString(R.string.error));
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnString.toString();
|
return returnString.toString();
|
||||||
}
|
}
|
||||||
@ -509,9 +439,6 @@ public class Action
|
|||||||
case playMusic:
|
case playMusic:
|
||||||
Actions.playMusic(this.getParameter1(), toggleActionIfPossible);
|
Actions.playMusic(this.getParameter1(), toggleActionIfPossible);
|
||||||
break;
|
break;
|
||||||
case controlMediaPlayback:
|
|
||||||
Actions.controlMediaPlayback(context, Integer.parseInt(getParameter2()));
|
|
||||||
break;
|
|
||||||
case sendTextMessage:
|
case sendTextMessage:
|
||||||
Actions.sendTextMessage(context, this.getParameter2().split(Actions.smsSeparator));
|
Actions.sendTextMessage(context, this.getParameter2().split(Actions.smsSeparator));
|
||||||
break;
|
break;
|
||||||
@ -524,15 +451,6 @@ public class Action
|
|||||||
case playSound:
|
case playSound:
|
||||||
Actions.playSound(getParameter1(), getParameter2());
|
Actions.playSound(getParameter1(), getParameter2());
|
||||||
break;
|
break;
|
||||||
case createNotification:
|
|
||||||
Actions.createNotification(this);
|
|
||||||
break;
|
|
||||||
case closeNotification:
|
|
||||||
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.M)
|
|
||||||
Actions.closeNotification(this);
|
|
||||||
else
|
|
||||||
Miscellaneous.logEvent("w", "Close notification", "Close notification was requested, but OS version is too low: " + String.valueOf(Build.VERSION.SDK_INT), 2);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
Miscellaneous.logEvent("w", "Action", context.getResources().getString(R.string.unknownActionSpecified), 3);
|
Miscellaneous.logEvent("w", "Action", context.getResources().getString(R.string.unknownActionSpecified), 3);
|
||||||
break;
|
break;
|
||||||
|
@ -8,15 +8,13 @@ import android.app.PendingIntent;
|
|||||||
import android.app.admin.DevicePolicyManager;
|
import android.app.admin.DevicePolicyManager;
|
||||||
import android.bluetooth.BluetoothAdapter;
|
import android.bluetooth.BluetoothAdapter;
|
||||||
import android.bluetooth.BluetoothDevice;
|
import android.bluetooth.BluetoothDevice;
|
||||||
|
import android.bluetooth.BluetoothManager;
|
||||||
import android.bluetooth.BluetoothProfile;
|
import android.bluetooth.BluetoothProfile;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.ComponentName;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.media.AudioManager;
|
import android.media.AudioManager;
|
||||||
import android.media.MediaPlayer;
|
import android.media.MediaPlayer;
|
||||||
import android.media.session.MediaController;
|
|
||||||
import android.media.session.MediaSessionManager;
|
|
||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.net.wifi.WifiManager;
|
import android.net.wifi.WifiManager;
|
||||||
@ -26,13 +24,11 @@ import android.os.PowerManager.WakeLock;
|
|||||||
import android.os.VibrationEffect;
|
import android.os.VibrationEffect;
|
||||||
import android.os.Vibrator;
|
import android.os.Vibrator;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import android.service.notification.NotificationListenerService;
|
|
||||||
import android.service.notification.StatusBarNotification;
|
|
||||||
import android.telephony.SmsManager;
|
import android.telephony.SmsManager;
|
||||||
import android.telephony.SubscriptionManager;
|
import android.telephony.SubscriptionManager;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.WindowManager;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
@ -41,9 +37,7 @@ import com.jens.automation2.actions.wifi_router.MyOnStartTetheringCallback;
|
|||||||
import com.jens.automation2.actions.wifi_router.MyOreoWifiManager;
|
import com.jens.automation2.actions.wifi_router.MyOreoWifiManager;
|
||||||
import com.jens.automation2.location.WifiBroadcastReceiver;
|
import com.jens.automation2.location.WifiBroadcastReceiver;
|
||||||
import com.jens.automation2.receivers.ConnectivityReceiver;
|
import com.jens.automation2.receivers.ConnectivityReceiver;
|
||||||
import com.jens.automation2.receivers.NotificationListener;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.apache.http.client.HttpClient;
|
import org.apache.http.client.HttpClient;
|
||||||
import org.apache.http.conn.ClientConnectionManager;
|
import org.apache.http.conn.ClientConnectionManager;
|
||||||
import org.apache.http.conn.scheme.Scheme;
|
import org.apache.http.conn.scheme.Scheme;
|
||||||
@ -60,7 +54,6 @@ import java.lang.reflect.Method;
|
|||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.NetworkInterface;
|
import java.net.NetworkInterface;
|
||||||
import java.security.KeyStore;
|
import java.security.KeyStore;
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -71,8 +64,9 @@ import eu.chainfire.libsuperuser.Shell;
|
|||||||
|
|
||||||
public class Actions
|
public class Actions
|
||||||
{
|
{
|
||||||
public static AutomationService automationServerRef;
|
public static AutomationService autoMationServerRef;
|
||||||
public static Context context;
|
public static Context context;
|
||||||
|
public static Context rootetcontext;
|
||||||
private static Intent playMusicIntent;
|
private static Intent playMusicIntent;
|
||||||
private static boolean suAvailable = false;
|
private static boolean suAvailable = false;
|
||||||
private static String suVersion = null;
|
private static String suVersion = null;
|
||||||
@ -85,106 +79,6 @@ public class Actions
|
|||||||
public static final String wireguard_tunnel_down = "com.wireguard.android.action.SET_TUNNEL_DOWN";
|
public static final String wireguard_tunnel_down = "com.wireguard.android.action.SET_TUNNEL_DOWN";
|
||||||
public static final String wireguard_tunnel_refresh = "com.wireguard.android.action.REFRESH_TUNNEL_STATES";
|
public static final String wireguard_tunnel_refresh = "com.wireguard.android.action.REFRESH_TUNNEL_STATES";
|
||||||
|
|
||||||
public static void createNotification(Action action)
|
|
||||||
{
|
|
||||||
String[] elements = action.getParameter2().split(Action.actionParameter2Split);
|
|
||||||
|
|
||||||
Miscellaneous.logEvent("w", "createNotification", "Creating notification with title " + elements[0] + " and text " + elements[1], 3);
|
|
||||||
|
|
||||||
int notificationId = Math.round(Calendar.getInstance().getTimeInMillis()/1000);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
String title = Miscellaneous.replaceVariablesInText(elements[0], Miscellaneous.getAnyContext());
|
|
||||||
String text = Miscellaneous.replaceVariablesInText(elements[1], Miscellaneous.getAnyContext());
|
|
||||||
Miscellaneous.createDismissibleNotification(title, text, notificationId, false, AutomationService.NOTIFICATION_CHANNEL_ID_RULES, null);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("w", "createNotification", "Error occurred while replacing vars: " + Log.getStackTraceString(e), 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
|
||||||
public static void closeNotification(Action action)
|
|
||||||
{
|
|
||||||
NotificationManager nm = (NotificationManager) Miscellaneous.getAnyContext().getSystemService(Context.NOTIFICATION_SERVICE);
|
|
||||||
for(StatusBarNotification n : nm.getActiveNotifications())
|
|
||||||
{
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
|
|
||||||
{
|
|
||||||
String[] params = action.getParameter2().split(Action.actionParameter2Split);
|
|
||||||
|
|
||||||
String myApp = params[0];
|
|
||||||
String myTitleDir = params[1];
|
|
||||||
String requiredTitle = params[2];
|
|
||||||
String myTextDir = params[3];
|
|
||||||
String requiredText;
|
|
||||||
if (params.length >= 5)
|
|
||||||
requiredText = params[4];
|
|
||||||
else
|
|
||||||
requiredText = "";
|
|
||||||
|
|
||||||
for (StatusBarNotification sbn : NotificationListener.getInstance().getActiveNotifications())
|
|
||||||
{
|
|
||||||
NotificationListener.SimpleNotification sn = NotificationListener.convertNotificationToSimpleNotification(true, sbn);
|
|
||||||
|
|
||||||
Miscellaneous.logEvent("i", "NotificationCloseCheck", "Checking if this notification should be closed in the context of rule " + action.getParentRule().getName() + ": "+ sn.toString(), 5);
|
|
||||||
|
|
||||||
if (!myApp.equals(Trigger.anyAppString))
|
|
||||||
{
|
|
||||||
if (!myApp.equalsIgnoreCase(sn.getApp()))
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("i", "NotificationCloseCheck", "Notification app name does not match rule.", 5);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
Notifications from Automation are disregarded to avoid infinite loops.
|
|
||||||
*/
|
|
||||||
if(myApp.equals(BuildConfig.APPLICATION_ID))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
If there are multiple notifications ("stacked") title or text might be null:
|
|
||||||
https://stackoverflow.com/questions/28047767/notificationlistenerservice-not-reading-text-of-stacked-notifications
|
|
||||||
*/
|
|
||||||
|
|
||||||
// T I T L E
|
|
||||||
if (!StringUtils.isEmpty(requiredTitle))
|
|
||||||
{
|
|
||||||
if (!Miscellaneous.compare(myTitleDir, requiredTitle, sn.getTitle()))
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("i", "NotificationCloseCheck", "Notification title does not match rule.", 5);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// T E X T
|
|
||||||
if (!StringUtils.isEmpty(requiredText))
|
|
||||||
{
|
|
||||||
if (!Miscellaneous.compare(myTextDir, requiredText, sn.getText()))
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("i", "NotificationCloseCheck", "Notification text does not match rule.", 5);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Miscellaneous.logEvent("i", "NotificationCloseCheck", "All criteria matches. Closing notification: " + sbn.getNotification().toString(), 3);
|
|
||||||
if(NotificationListener.getInstance() != null)
|
|
||||||
NotificationListener.getInstance().dismissNotification(sbn);
|
|
||||||
else
|
|
||||||
Miscellaneous.logEvent("i", "NotificationCloseCheck", "NotificationListener instance is null. Can\'t close notification.", 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class WifiStuff
|
public static class WifiStuff
|
||||||
{
|
{
|
||||||
public static Boolean setWifi(Context context, Boolean desiredState, boolean toggleActionIfPossible)
|
public static Boolean setWifi(Context context, Boolean desiredState, boolean toggleActionIfPossible)
|
||||||
@ -226,7 +120,7 @@ public class Actions
|
|||||||
Miscellaneous.logEvent("i", "Wifi", "Changing wifi to " + String.valueOf(desiredState), 4);
|
Miscellaneous.logEvent("i", "Wifi", "Changing wifi to " + String.valueOf(desiredState), 4);
|
||||||
|
|
||||||
if (desiredState && Settings.useWifiForPositioning)
|
if (desiredState && Settings.useWifiForPositioning)
|
||||||
WifiBroadcastReceiver.startWifiReceiver(automationServerRef.getLocationProvider());
|
WifiBroadcastReceiver.startWifiReceiver(autoMationServerRef.getLocationProvider());
|
||||||
|
|
||||||
WifiManager myWifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
|
WifiManager myWifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
|
||||||
|
|
||||||
@ -1036,7 +930,7 @@ public class Actions
|
|||||||
// Pack intents
|
// Pack intents
|
||||||
for (int i = 3; i < params.length; i++)
|
for (int i = 3; i < params.length; i++)
|
||||||
{
|
{
|
||||||
String[] singleParam = params[i].split(Action.intentPairSeparator);
|
String[] singleParam = params[i].split(Action.intentPairSeperator);
|
||||||
|
|
||||||
/*Class c = Class.forName(singleParam[0]);
|
/*Class c = Class.forName(singleParam[0]);
|
||||||
for(Method m : c.getMethods())
|
for(Method m : c.getMethods())
|
||||||
@ -1116,14 +1010,14 @@ public class Actions
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (params[2].equals(ActivityManageActionStartActivity.startByActivityString))
|
if (params[2].equals(ActivityManageActionStartActivity.startByActivityString))
|
||||||
automationServerRef.startActivity(externalActivityIntent);
|
autoMationServerRef.startActivity(externalActivityIntent);
|
||||||
else
|
else
|
||||||
automationServerRef.sendBroadcast(externalActivityIntent);
|
autoMationServerRef.sendBroadcast(externalActivityIntent);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("e", "StartOtherApp", automationServerRef.getResources().getString(R.string.errorStartingOtherActivity) + ": " + Log.getStackTraceString(e), 2);
|
Miscellaneous.logEvent("e", "StartOtherApp", autoMationServerRef.getResources().getString(R.string.errorStartingOtherActivity) + ": " + Log.getStackTraceString(e), 2);
|
||||||
Toast.makeText(automationServerRef, automationServerRef.getResources().getString(R.string.errorStartingOtherActivity) + ": " + e.getMessage(), Toast.LENGTH_LONG).show();
|
Toast.makeText(autoMationServerRef, autoMationServerRef.getResources().getString(R.string.errorStartingOtherActivity) + ": " + e.getMessage(), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1307,7 +1201,7 @@ public class Actions
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
boolean isEnabled = ConnectivityReceiver.isAirplaneMode(automationServerRef);
|
boolean isEnabled = ConnectivityReceiver.isAirplaneMode(autoMationServerRef);
|
||||||
|
|
||||||
if (isEnabled)
|
if (isEnabled)
|
||||||
Miscellaneous.logEvent("i", "Airplane mode", "Current status is enabled.", 4);
|
Miscellaneous.logEvent("i", "Airplane mode", "Current status is enabled.", 4);
|
||||||
@ -1421,7 +1315,7 @@ public class Actions
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
String textToSpeak = Miscellaneous.replaceVariablesInText(parameter2, context);
|
String textToSpeak = Miscellaneous.replaceVariablesInText(parameter2, context);
|
||||||
automationServerRef.speak(textToSpeak, true);
|
autoMationServerRef.speak(textToSpeak, true);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -1451,7 +1345,23 @@ public class Actions
|
|||||||
playMusicIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
playMusicIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
context.startActivity(playMusicIntent);
|
context.startActivity(playMusicIntent);
|
||||||
|
|
||||||
|
// playMusicIntent = new Intent();
|
||||||
|
// playMusicIntent.setAction(android.content.Intent.ACTION_VIEW);
|
||||||
|
// File file = new File(YOUR_SONG_URI);
|
||||||
|
// playMusicIntent.setDataAndType(Uri.fromFile(file), "audio/*");
|
||||||
|
// context.startActivity(playMusicIntent);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// if(playMusicIntent != null)
|
||||||
|
// {
|
||||||
|
// context.stopService(playMusicIntent);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return false;
|
||||||
}
|
}
|
||||||
catch (ActivityNotFoundException e)
|
catch (ActivityNotFoundException e)
|
||||||
{
|
{
|
||||||
@ -1467,45 +1377,6 @@ public class Actions
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
|
||||||
public static boolean controlMediaPlayback(Context context, int command)
|
|
||||||
{
|
|
||||||
int keyCode = -1;
|
|
||||||
switch(command)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
keyCode = KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
keyCode = KeyEvent.KEYCODE_MEDIA_PLAY;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
keyCode = KeyEvent.KEYCODE_MEDIA_PAUSE;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
keyCode = KeyEvent.KEYCODE_MEDIA_STOP;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
keyCode = KeyEvent.KEYCODE_MEDIA_PREVIOUS;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
keyCode = KeyEvent.KEYCODE_MEDIA_NEXT;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return controlMediaByDispatch(keyCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
|
||||||
static boolean controlMediaByDispatch(int keyCode)
|
|
||||||
{
|
|
||||||
AudioManager mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
|
||||||
KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode);
|
|
||||||
mAudioManager.dispatchMediaKeyEvent(event);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getTransactionCode()
|
private String getTransactionCode()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -1619,7 +1490,7 @@ public class Actions
|
|||||||
{
|
{
|
||||||
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.O_MR1)
|
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.O_MR1)
|
||||||
{
|
{
|
||||||
if(MobileDataStuff.setMobileNetworkFromAndroid9(desiredState, automationServerRef))
|
if(MobileDataStuff.setMobileNetworkFromAndroid9(desiredState, autoMationServerRef))
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
||||||
return true;
|
return true;
|
||||||
@ -1632,7 +1503,7 @@ public class Actions
|
|||||||
}
|
}
|
||||||
else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP)
|
else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP)
|
||||||
{
|
{
|
||||||
if (MobileDataStuff.setMobileNetworkTillAndroid5(desiredState, automationServerRef))
|
if (MobileDataStuff.setMobileNetworkTillAndroid5(desiredState, autoMationServerRef))
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
||||||
return true;
|
return true;
|
||||||
@ -1645,7 +1516,7 @@ public class Actions
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (MobileDataStuff.setMobileNetworkAndroid6Till8(desiredState, automationServerRef))
|
if (MobileDataStuff.setMobileNetworkAndroid6Till8(desiredState, autoMationServerRef))
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
||||||
return true;
|
return true;
|
||||||
|
@ -135,7 +135,7 @@ public class ActivityMainRules extends ActivityGeneric
|
|||||||
else
|
else
|
||||||
holder = (RuleHolder) v.getTag();
|
holder = (RuleHolder) v.getTag();
|
||||||
|
|
||||||
// System.out.println("Position ["+position+"]");
|
System.out.println("Position ["+position+"]");
|
||||||
Rule r = Rule.getRuleCollection().get(position);
|
Rule r = Rule.getRuleCollection().get(position);
|
||||||
holder.tvRuleName.setText(r.getName());
|
holder.tvRuleName.setText(r.getName());
|
||||||
if(r.isRuleActive())
|
if(r.isRuleActive())
|
||||||
|
@ -3,6 +3,7 @@ package com.jens.automation2;
|
|||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
|
import android.app.PendingIntent;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -10,6 +11,7 @@ import android.net.Uri;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.util.Xml;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
@ -27,25 +29,29 @@ import androidx.core.text.HtmlCompat;
|
|||||||
|
|
||||||
import com.jens.automation2.AutomationService.serviceCommands;
|
import com.jens.automation2.AutomationService.serviceCommands;
|
||||||
import com.jens.automation2.Trigger.Trigger_Enum;
|
import com.jens.automation2.Trigger.Trigger_Enum;
|
||||||
|
import com.jens.automation2.location.CellLocationChangedReceiver;
|
||||||
import com.jens.automation2.location.LocationProvider;
|
import com.jens.automation2.location.LocationProvider;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.lang.reflect.Array;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public class ActivityMainScreen extends ActivityGeneric
|
public class ActivityMainScreen extends ActivityGeneric
|
||||||
{
|
{
|
||||||
static boolean guiChangeInProgress = false;
|
private static boolean guiChangeInProgress = false;
|
||||||
static ActivityMainScreen activityMainScreenInstance = null;
|
|
||||||
static boolean updateNoteDisplayed = false;
|
|
||||||
static boolean uiUpdateRunning = false;
|
|
||||||
|
|
||||||
ToggleButton toggleService, tbLockSound;
|
private static ActivityMainScreen activityMainScreenInstance = null;
|
||||||
Button bShowHelp, bPrivacy, bAddSoundLockTIme, bDonate, bControlCenter;
|
private ToggleButton toggleService, tbLockSound;
|
||||||
TextView tvActivePoi, tvClosestPoi, tvLastRule, tvMainScreenNotePermissions, tvMainScreenNoteFeaturesFromOtherFlavor, tvMainScreenNoteLocationImpossibleBlameGoogle, tvMainScreenNoteNews, tvLockSoundDuration;
|
private Button bShowHelp, bPrivacy, bSettingsErase, bAddSoundLockTIme, bDonate;
|
||||||
|
private TextView tvActivePoi, tvClosestPoi, tvLastRule, tvMainScreenNotePermissions, tvMainScreenNoteFeaturesFromOtherFlavor, tvMainScreenNoteLocationImpossibleBlameGoogle, tvMainScreenNoteNews, tvlockSoundDuration;
|
||||||
|
private static boolean updateNoteDisplayed = false;
|
||||||
|
|
||||||
ListView lvRuleHistory;
|
private ListView lvRuleHistory;
|
||||||
ArrayAdapter<Rule> ruleHistoryListViewAdapter;
|
private ArrayAdapter<Rule> ruleHistoryListViewAdapter;
|
||||||
|
|
||||||
|
private static boolean uiUpdateRunning = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState)
|
public void onCreate(Bundle savedInstanceState)
|
||||||
@ -73,7 +79,7 @@ public class ActivityMainScreen extends ActivityGeneric
|
|||||||
tvMainScreenNoteFeaturesFromOtherFlavor = (TextView) findViewById(R.id.tvMainScreenNoteFeaturesFromOtherFlavor);
|
tvMainScreenNoteFeaturesFromOtherFlavor = (TextView) findViewById(R.id.tvMainScreenNoteFeaturesFromOtherFlavor);
|
||||||
tvMainScreenNoteLocationImpossibleBlameGoogle = (TextView) findViewById(R.id.tvMainScreenNoteLocationImpossibleBlameGoogle);
|
tvMainScreenNoteLocationImpossibleBlameGoogle = (TextView) findViewById(R.id.tvMainScreenNoteLocationImpossibleBlameGoogle);
|
||||||
tvMainScreenNoteNews = (TextView) findViewById(R.id.tvMainScreenNoteNews);
|
tvMainScreenNoteNews = (TextView) findViewById(R.id.tvMainScreenNoteNews);
|
||||||
tvLockSoundDuration = (TextView)findViewById(R.id.tvlockSoundDuration);
|
tvlockSoundDuration = (TextView)findViewById(R.id.tvlockSoundDuration);
|
||||||
tbLockSound = (ToggleButton) findViewById(R.id.tbLockSound);
|
tbLockSound = (ToggleButton) findViewById(R.id.tbLockSound);
|
||||||
toggleService = (ToggleButton) findViewById(R.id.tbArmMastListener);
|
toggleService = (ToggleButton) findViewById(R.id.tbArmMastListener);
|
||||||
|
|
||||||
@ -93,8 +99,7 @@ public class ActivityMainScreen extends ActivityGeneric
|
|||||||
if (toggleService.isChecked())
|
if (toggleService.isChecked())
|
||||||
{
|
{
|
||||||
startAutomationService(getBaseContext(), false);
|
startAutomationService(getBaseContext(), false);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAutomationService();
|
stopAutomationService();
|
||||||
}
|
}
|
||||||
@ -142,13 +147,13 @@ public class ActivityMainScreen extends ActivityGeneric
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
bControlCenter = (Button) findViewById(R.id.bControlCenter);
|
Button bSettings = (Button) findViewById(R.id.bSettings);
|
||||||
bControlCenter.setOnClickListener(new OnClickListener()
|
bSettings.setOnClickListener(new OnClickListener()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v)
|
public void onClick(View v)
|
||||||
{
|
{
|
||||||
Intent myIntent = new Intent(ActivityMainScreen.this, ActivityControlCenter.class);
|
Intent myIntent = new Intent(ActivityMainScreen.this, ActivityMaintenance.class);
|
||||||
startActivity(myIntent);
|
startActivity(myIntent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -390,21 +395,21 @@ public class ActivityMainScreen extends ActivityGeneric
|
|||||||
long millis = end.getTimeInMillis() - now.getTimeInMillis();
|
long millis = end.getTimeInMillis() - now.getTimeInMillis();
|
||||||
long minutes = millis/1000/60;
|
long minutes = millis/1000/60;
|
||||||
if(minutes < 60)
|
if(minutes < 60)
|
||||||
activityMainScreenInstance.tvLockSoundDuration.setText(String.valueOf(minutes + " min..."));
|
activityMainScreenInstance.tvlockSoundDuration.setText(String.valueOf(minutes + " min..."));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double hours = (double)minutes / 60.0;
|
double hours = (double)minutes / 60.0;
|
||||||
activityMainScreenInstance.tvLockSoundDuration.setText(String.valueOf(Math.round(hours * 100.0) / 100.0) + " h...");
|
activityMainScreenInstance.tvlockSoundDuration.setText(String.valueOf(Math.round(hours * 100.0) / 100.0) + " h...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
activityMainScreenInstance.tvLockSoundDuration.setText(String.valueOf(""));
|
activityMainScreenInstance.tvlockSoundDuration.setText(String.valueOf(""));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
activityMainScreenInstance.tbLockSound.setChecked(false);
|
activityMainScreenInstance.tbLockSound.setChecked(false);
|
||||||
activityMainScreenInstance.tbLockSound.setEnabled(false);
|
activityMainScreenInstance.tbLockSound.setEnabled(false);
|
||||||
activityMainScreenInstance.tvLockSoundDuration.setText("");
|
activityMainScreenInstance.tvlockSoundDuration.setText("");
|
||||||
}
|
}
|
||||||
Settings.writeSettings(activityMainScreenInstance);
|
Settings.writeSettings(activityMainScreenInstance);
|
||||||
// uiUpdateRunning = false;
|
// uiUpdateRunning = false;
|
||||||
|
@ -10,7 +10,6 @@ import android.os.Bundle;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@ -21,9 +20,8 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
public class ActivityControlCenter extends Activity
|
public class ActivityMaintenance extends Activity
|
||||||
{
|
{
|
||||||
final static int requestCodeImport = 1001;
|
final static int requestCodeImport = 1001;
|
||||||
final static int requestCodeExport = 1002;
|
final static int requestCodeExport = 1002;
|
||||||
@ -32,14 +30,13 @@ public class ActivityControlCenter extends Activity
|
|||||||
final static String prefsFileName = "com.jens.automation2_preferences.xml";
|
final static String prefsFileName = "com.jens.automation2_preferences.xml";
|
||||||
|
|
||||||
TextView tvFileStoreLocation, tvAppVersion;
|
TextView tvFileStoreLocation, tvAppVersion;
|
||||||
Button bVolumeTest, bMoreSettings, bSettingsSetToDefault, bSendEmailToDev, bImportConfiguration, bExportConfiguration;
|
Button bVolumeTest, bMoreSettings, bSettingsSetToDefault, bShareConfigAndLog, bImportConfiguration, bExportConfiguration;
|
||||||
CheckBox chkShareConfigAndLog;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState)
|
protected void onCreate(@Nullable Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_control_center);
|
setContentView(R.layout.activity_maintenance);
|
||||||
|
|
||||||
bVolumeTest = (Button) findViewById(R.id.bVolumeTest);
|
bVolumeTest = (Button) findViewById(R.id.bVolumeTest);
|
||||||
bVolumeTest.setOnClickListener(new View.OnClickListener()
|
bVolumeTest.setOnClickListener(new View.OnClickListener()
|
||||||
@ -47,25 +44,18 @@ public class ActivityControlCenter extends Activity
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v)
|
public void onClick(View v)
|
||||||
{
|
{
|
||||||
Intent intent = new Intent(ActivityControlCenter.this, ActivityVolumeTest.class);
|
Intent intent = new Intent(ActivityMaintenance.this, ActivityVolumeTest.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
chkShareConfigAndLog = (CheckBox)findViewById(R.id.chkShareConfigAndLog);
|
bShareConfigAndLog = (Button) findViewById(R.id.bShareConfigAndLog);
|
||||||
bSendEmailToDev = (Button) findViewById(R.id.bSendEmailToDev);
|
bShareConfigAndLog.setOnClickListener(new View.OnClickListener()
|
||||||
bSendEmailToDev.setOnClickListener(new View.OnClickListener()
|
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v)
|
public void onClick(View v)
|
||||||
{
|
{
|
||||||
if(chkShareConfigAndLog.isChecked())
|
getShareConfigAndLogDialogue(ActivityMaintenance.this).show();
|
||||||
getShareConfigAndLogDialogue(ActivityControlCenter.this).show();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
String subject = "Automation";
|
|
||||||
Miscellaneous.sendEmail(ActivityControlCenter.this, "android-development@gmx.de", "Automation logs", getSystemInfo(), null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -75,17 +65,17 @@ public class ActivityControlCenter extends Activity
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v)
|
public void onClick(View v)
|
||||||
{
|
{
|
||||||
getDefaultSettingsDialog(ActivityControlCenter.this).show();
|
getDefaultSettingsDialog(ActivityMaintenance.this).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
bMoreSettings = (Button) findViewById(R.id.bMoreSettings);
|
Button bMoreSettings = (Button) findViewById(R.id.bMoreSettings);
|
||||||
bMoreSettings.setOnClickListener(new View.OnClickListener()
|
bMoreSettings.setOnClickListener(new View.OnClickListener()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v)
|
public void onClick(View v)
|
||||||
{
|
{
|
||||||
Intent myIntent = new Intent(ActivityControlCenter.this, ActivitySettings.class);
|
Intent myIntent = new Intent(ActivityMaintenance.this, ActivitySettings.class);
|
||||||
startActivityForResult(myIntent, requestCodeMoreSettings);
|
startActivityForResult(myIntent, requestCodeMoreSettings);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -133,7 +123,7 @@ public class ActivityControlCenter extends Activity
|
|||||||
if (AutomationService.isMyServiceRunning(this))
|
if (AutomationService.isMyServiceRunning(this))
|
||||||
AutomationService.getInstance().serviceInterface(AutomationService.serviceCommands.reloadSettings);
|
AutomationService.getInstance().serviceInterface(AutomationService.serviceCommands.reloadSettings);
|
||||||
|
|
||||||
if (AutomationService.isMyServiceRunning(ActivityControlCenter.this))
|
if (AutomationService.isMyServiceRunning(ActivityMaintenance.this))
|
||||||
Toast.makeText(this, getResources().getString(R.string.settingsWillTakeTime), Toast.LENGTH_LONG).show();
|
Toast.makeText(this, getResources().getString(R.string.settingsWillTakeTime), Toast.LENGTH_LONG).show();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -180,7 +170,7 @@ public class ActivityControlCenter extends Activity
|
|||||||
if (Miscellaneous.copyDocumentFileToFile(file, dstRules))
|
if (Miscellaneous.copyDocumentFileToFile(file, dstRules))
|
||||||
filesImported++;
|
filesImported++;
|
||||||
else
|
else
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.rulesImportError), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.rulesImportError), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (file.getName().equals(prefsFileName))
|
else if (file.getName().equals(prefsFileName))
|
||||||
@ -193,7 +183,7 @@ public class ActivityControlCenter extends Activity
|
|||||||
if (Miscellaneous.copyDocumentFileToFile(file, dstPrefs))
|
if (Miscellaneous.copyDocumentFileToFile(file, dstPrefs))
|
||||||
filesImported++;
|
filesImported++;
|
||||||
else
|
else
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.prefsImportError), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.prefsImportError), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,12 +191,12 @@ public class ActivityControlCenter extends Activity
|
|||||||
if(applicableFilesFound > 0)
|
if(applicableFilesFound > 0)
|
||||||
{
|
{
|
||||||
if(filesImported == 0)
|
if(filesImported == 0)
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.noFilesImported), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.noFilesImported), Toast.LENGTH_LONG).show();
|
||||||
else if(filesImported < applicableFilesFound)
|
else if(filesImported < applicableFilesFound)
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.notAllFilesImported), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.notAllFilesImported), Toast.LENGTH_LONG).show();
|
||||||
else if (filesImported == applicableFilesFound)
|
else if (filesImported == applicableFilesFound)
|
||||||
{
|
{
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.configurationImportedSuccessfully), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.configurationImportedSuccessfully), Toast.LENGTH_LONG).show();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -218,19 +208,19 @@ public class ActivityControlCenter extends Activity
|
|||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("e", "Reading import", "Rules re-read failed: " + Log.getStackTraceString(e), 1);
|
Miscellaneous.logEvent("e", "Reading import", "Rules re-read failed: " + Log.getStackTraceString(e), 1);
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.errorReadingPoisAndRulesFromFile), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.errorReadingPoisAndRulesFromFile), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings.readFromPersistentStorage(ActivityControlCenter.this);
|
Settings.readFromPersistentStorage(ActivityMaintenance.this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.noFilesImported), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.noFilesImported), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.noApplicableFilesFoundInDirectory), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.noApplicableFilesFoundInDirectory), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.noApplicableFilesFoundInDirectory), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.noApplicableFilesFoundInDirectory), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void exportFiles(Uri uriTree)
|
void exportFiles(Uri uriTree)
|
||||||
@ -262,12 +252,12 @@ public class ActivityControlCenter extends Activity
|
|||||||
if(dstRules.canWrite() && dstPrefs.canWrite())
|
if(dstRules.canWrite() && dstPrefs.canWrite())
|
||||||
{
|
{
|
||||||
if(Miscellaneous.copyFileToDocumentFile(srcRules, dstRules) && Miscellaneous.copyFileToDocumentFile(srcPrefs, dstPrefs))
|
if(Miscellaneous.copyFileToDocumentFile(srcRules, dstRules) && Miscellaneous.copyFileToDocumentFile(srcPrefs, dstPrefs))
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.configurationExportedSuccessfully), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.configurationExportedSuccessfully), Toast.LENGTH_LONG).show();
|
||||||
else
|
else
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.ConfigurationExportError), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.ConfigurationExportError), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.ConfigurationExportError), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.ConfigurationExportError), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static AlertDialog getDefaultSettingsDialog(final Context context)
|
private static AlertDialog getDefaultSettingsDialog(final Context context)
|
||||||
@ -329,10 +319,9 @@ public class ActivityControlCenter extends Activity
|
|||||||
|
|
||||||
Uri uri = Uri.parse("content://com.jens.automation2/" + Settings.zipFileName);
|
Uri uri = Uri.parse("content://com.jens.automation2/" + Settings.zipFileName);
|
||||||
|
|
||||||
Miscellaneous.sendEmail(ActivityControlCenter.this, "android-development@gmx.de", "Automation logs", getSystemInfo(), uri);
|
Miscellaneous.sendEmail(ActivityMaintenance.this, "android-development@gmx.de", "Automation logs", getSystemInfo(), uri);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
alertDialogBuilder.setNegativeButton(context.getResources().getString(R.string.no), null);
|
alertDialogBuilder.setNegativeButton(context.getResources().getString(R.string.no), null);
|
||||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||||
|
|
||||||
@ -348,24 +337,7 @@ public class ActivityControlCenter extends Activity
|
|||||||
systemInfoText.append("Device: " + android.os.Build.DEVICE + Miscellaneous.lineSeparator);
|
systemInfoText.append("Device: " + android.os.Build.DEVICE + Miscellaneous.lineSeparator);
|
||||||
systemInfoText.append("Model: " + android.os.Build.MODEL + Miscellaneous.lineSeparator);
|
systemInfoText.append("Model: " + android.os.Build.MODEL + Miscellaneous.lineSeparator);
|
||||||
systemInfoText.append("Product: " + android.os.Build.PRODUCT + Miscellaneous.lineSeparator);
|
systemInfoText.append("Product: " + android.os.Build.PRODUCT + Miscellaneous.lineSeparator);
|
||||||
systemInfoText.append("Flavor: " + BuildConfig.FLAVOR + Miscellaneous.lineSeparator);
|
systemInfoText.append("Flavor: " + BuildConfig.FLAVOR);
|
||||||
systemInfoText.append("Country: " + Miscellaneous.getUserCountry(Miscellaneous.getAnyContext()) + Miscellaneous.lineSeparator);
|
|
||||||
systemInfoText.append("OS language: " + Locale.getDefault().getDisplayName());
|
|
||||||
|
|
||||||
/*
|
|
||||||
I've checked the Locale methods on my Android 4.1.2 device, and the results:
|
|
||||||
|
|
||||||
Locale.getDefault().getLanguage() ---> en
|
|
||||||
Locale.getDefault().getISO3Language() ---> eng
|
|
||||||
Locale.getDefault().getCountry() ---> US
|
|
||||||
Locale.getDefault().getISO3Country() ---> USA
|
|
||||||
Locale.getDefault().getDisplayCountry() ---> United States
|
|
||||||
Locale.getDefault().getDisplayName() ---> English (United States)
|
|
||||||
Locale.getDefault().toString() ---> en_US
|
|
||||||
Locale.getDefault().getDisplayLanguage()---> English
|
|
||||||
Locale.getDefault().toLanguageTag() ---> en-US
|
|
||||||
*/
|
|
||||||
|
|
||||||
return systemInfoText.toString();
|
return systemInfoText.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -395,7 +367,7 @@ public class ActivityControlCenter extends Activity
|
|||||||
{
|
{
|
||||||
// if you reach this place, it means there is no any file
|
// if you reach this place, it means there is no any file
|
||||||
// explorer app installed on your device
|
// explorer app installed on your device
|
||||||
Toast.makeText(ActivityControlCenter.this, getResources().getString(R.string.noFileManageInstalled), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityMaintenance.this, getResources().getString(R.string.noFileManageInstalled), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -10,13 +10,10 @@ import android.widget.CompoundButton;
|
|||||||
import android.widget.SeekBar;
|
import android.widget.SeekBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
public class ActivityManageActionBrightnessSetting extends Activity
|
public class ActivityManageActionBrightnessSetting extends Activity
|
||||||
{
|
{
|
||||||
public static final String intentNameAutoBrightness = "autoBrightness";
|
|
||||||
public static final String intentNameBrightnessValue = "brightnessValue";
|
|
||||||
|
|
||||||
CheckBox chkAutoBrightness;
|
CheckBox chkAutoBrightness;
|
||||||
SeekBar sbBrightness;
|
SeekBar sbBrightness;
|
||||||
Button bApplyBrightness;
|
Button bApplyBrightness;
|
||||||
@ -25,7 +22,7 @@ public class ActivityManageActionBrightnessSetting extends Activity
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState)
|
protected void onCreate(@Nullable Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
setContentView(R.layout.activity_manage_action_brightness_settings);
|
setContentView(R.layout.activity_manage_brightness_setting);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
chkAutoBrightness = (CheckBox)findViewById(R.id.chkAutoBrightness);
|
chkAutoBrightness = (CheckBox)findViewById(R.id.chkAutoBrightness);
|
||||||
@ -35,11 +32,11 @@ public class ActivityManageActionBrightnessSetting extends Activity
|
|||||||
|
|
||||||
Intent input = getIntent();
|
Intent input = getIntent();
|
||||||
|
|
||||||
if(input.hasExtra(intentNameAutoBrightness))
|
if(input.hasExtra("autoBrightness"))
|
||||||
chkAutoBrightness.setChecked(input.getBooleanExtra(intentNameAutoBrightness, false));
|
chkAutoBrightness.setChecked(input.getBooleanExtra("autoBrightness", false));
|
||||||
|
|
||||||
if(input.hasExtra(intentNameBrightnessValue))
|
if(input.hasExtra("brightnessValue"))
|
||||||
sbBrightness.setProgress(input.getIntExtra(intentNameBrightnessValue, 0));
|
sbBrightness.setProgress(input.getIntExtra("brightnessValue", 0));
|
||||||
|
|
||||||
bApplyBrightness.setOnClickListener(new View.OnClickListener()
|
bApplyBrightness.setOnClickListener(new View.OnClickListener()
|
||||||
{
|
{
|
||||||
@ -47,8 +44,8 @@ public class ActivityManageActionBrightnessSetting extends Activity
|
|||||||
public void onClick(View view)
|
public void onClick(View view)
|
||||||
{
|
{
|
||||||
Intent answer = new Intent();
|
Intent answer = new Intent();
|
||||||
answer.putExtra(intentNameAutoBrightness, chkAutoBrightness.isChecked());
|
answer.putExtra("autoBrightness", chkAutoBrightness.isChecked());
|
||||||
answer.putExtra(intentNameBrightnessValue, sbBrightness.getProgress());
|
answer.putExtra("brightnessValue", sbBrightness.getProgress());
|
||||||
setResult(RESULT_OK, answer);
|
setResult(RESULT_OK, answer);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
@ -1,397 +0,0 @@
|
|||||||
package com.jens.automation2;
|
|
||||||
|
|
||||||
import static com.jens.automation2.Trigger.triggerParameter2Split;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.ProgressDialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.pm.ActivityInfo;
|
|
||||||
import android.content.pm.ApplicationInfo;
|
|
||||||
import android.content.pm.PackageInfo;
|
|
||||||
import android.content.pm.PackageManager;
|
|
||||||
import android.os.AsyncTask;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.View.OnClickListener;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.CheckBox;
|
|
||||||
import android.widget.CompoundButton;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.Spinner;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ActivityManageActionCloseNotification 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";
|
|
||||||
|
|
||||||
boolean edit = false;
|
|
||||||
ProgressDialog progressDialog = null;
|
|
||||||
|
|
||||||
EditText etNotificationTitle, etNotificationText;
|
|
||||||
Button bSelectApp, bSaveActionCloseNotification;
|
|
||||||
Spinner spinnerTitleDirection, spinnerTextDirection;
|
|
||||||
TextView tvSelectedApplication;
|
|
||||||
|
|
||||||
private static List<PackageInfo> pInfos = null;
|
|
||||||
public static Trigger resultingTrigger;
|
|
||||||
|
|
||||||
private static String[] directions;
|
|
||||||
|
|
||||||
ArrayAdapter<String> directionSpinnerAdapter;
|
|
||||||
|
|
||||||
public static void getActivityList(final Context context)
|
|
||||||
{
|
|
||||||
if(pInfos == null)
|
|
||||||
{
|
|
||||||
pInfos = context.getPackageManager().getInstalledPackages(PackageManager.GET_ACTIVITIES);
|
|
||||||
Collections.sort(pInfos, new Comparator<PackageInfo>()
|
|
||||||
{
|
|
||||||
public int compare(PackageInfo obj1, PackageInfo obj2)
|
|
||||||
{
|
|
||||||
String name1 = "";
|
|
||||||
String name2 = "";
|
|
||||||
|
|
||||||
ApplicationInfo aInfo1 = obj1.applicationInfo;
|
|
||||||
if (aInfo1 != null)
|
|
||||||
{
|
|
||||||
name1 = (String) context.getPackageManager().getApplicationLabel(aInfo1);
|
|
||||||
}
|
|
||||||
ApplicationInfo aInfo2 = obj2.applicationInfo;
|
|
||||||
if (aInfo2 != null)
|
|
||||||
{
|
|
||||||
name2 = (String) context.getPackageManager().getApplicationLabel(aInfo2);
|
|
||||||
}
|
|
||||||
|
|
||||||
return name1.compareTo(name2);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String[] getApplicationNameListString(Context myContext)
|
|
||||||
{
|
|
||||||
// Generate the actual list
|
|
||||||
getActivityList(myContext);
|
|
||||||
|
|
||||||
ArrayList<String> returnList = new ArrayList<String>();
|
|
||||||
|
|
||||||
for (PackageInfo pInfo : pInfos)
|
|
||||||
{
|
|
||||||
ApplicationInfo aInfo = pInfo.applicationInfo;
|
|
||||||
if (aInfo != null)
|
|
||||||
{
|
|
||||||
String aLabel;
|
|
||||||
|
|
||||||
aLabel = (String) myContext.getPackageManager().getApplicationLabel(aInfo);
|
|
||||||
|
|
||||||
ActivityInfo[] aInfos = pInfo.activities;
|
|
||||||
if (aInfos != null && aInfos.length > 0) // Only put Applications into the list that have packages.
|
|
||||||
{
|
|
||||||
if(!returnList.contains(aLabel))
|
|
||||||
returnList.add(aLabel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnList.toArray(new String[returnList.size()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String[] getPackageListString(Context myContext, String applicationLabel)
|
|
||||||
{
|
|
||||||
// Generate the actual list
|
|
||||||
getActivityList(myContext);
|
|
||||||
|
|
||||||
ArrayList<String> returnList = new ArrayList<String>();
|
|
||||||
|
|
||||||
for (PackageInfo pInfo : pInfos)
|
|
||||||
{
|
|
||||||
if(myContext.getPackageManager().getApplicationLabel(pInfo.applicationInfo).equals(applicationLabel))
|
|
||||||
{
|
|
||||||
ActivityInfo[] aInfos = pInfo.activities;
|
|
||||||
if (aInfos != null && aInfos.length > 0)
|
|
||||||
{
|
|
||||||
returnList.add(pInfo.packageName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnList.toArray(new String[returnList.size()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String[] getPackageListString(Context myContext)
|
|
||||||
{
|
|
||||||
// Generate the actual list
|
|
||||||
getActivityList(myContext);
|
|
||||||
|
|
||||||
ArrayList<String> returnList = new ArrayList<String>();
|
|
||||||
|
|
||||||
for (PackageInfo pInfo : pInfos)
|
|
||||||
{
|
|
||||||
ActivityInfo[] aInfos = pInfo.activities;
|
|
||||||
if (aInfos != null && aInfos.length > 0)
|
|
||||||
{
|
|
||||||
returnList.add(pInfo.packageName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Miscellaneous.logEvent("w", "Empty Application", "Application " + myContext.getPackageManager().getApplicationLabel(pInfo.applicationInfo) + " doesn\'t have packages.", 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnList.toArray(new String[returnList.size()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String[] getActivityListForPackageName(String packageName)
|
|
||||||
{
|
|
||||||
ArrayList<String> returnList = new ArrayList<String>();
|
|
||||||
|
|
||||||
for (PackageInfo pInfo : pInfos)
|
|
||||||
{
|
|
||||||
if(pInfo.packageName.equals(packageName))
|
|
||||||
{
|
|
||||||
ActivityInfo[] aInfos = pInfo.activities;
|
|
||||||
if (aInfos != null)
|
|
||||||
{
|
|
||||||
for (ActivityInfo activityInfo : aInfos)
|
|
||||||
{
|
|
||||||
returnList.add(activityInfo.name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnList.toArray(new String[returnList.size()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ActivityInfo getActivityInfoForPackageNameAndActivityName(String packageName, String activityName)
|
|
||||||
{
|
|
||||||
for (PackageInfo pInfo : pInfos)
|
|
||||||
{
|
|
||||||
if(pInfo.packageName.equals(packageName))
|
|
||||||
{
|
|
||||||
ActivityInfo[] aInfos = pInfo.activities;
|
|
||||||
if (aInfos != null)
|
|
||||||
{
|
|
||||||
for (ActivityInfo activityInfo : aInfos)
|
|
||||||
{
|
|
||||||
if(activityInfo.name.equals(activityName))
|
|
||||||
return activityInfo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private AlertDialog getActionStartActivityDialog1()
|
|
||||||
{
|
|
||||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
|
||||||
alertDialogBuilder.setTitle(getResources().getString(R.string.selectApplication));
|
|
||||||
final String[] applicationArray = ActivityManageActionCloseNotification.getApplicationNameListString(this);
|
|
||||||
alertDialogBuilder.setItems(applicationArray, new DialogInterface.OnClickListener()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which)
|
|
||||||
{
|
|
||||||
dialog.dismiss();
|
|
||||||
getActionStartActivityDialog2(applicationArray[which]).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
|
||||||
|
|
||||||
return alertDialog;
|
|
||||||
}
|
|
||||||
private AlertDialog getActionStartActivityDialog2(String applicationName)
|
|
||||||
{
|
|
||||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
|
||||||
alertDialogBuilder.setTitle(getResources().getString(R.string.selectPackageOfApplication));
|
|
||||||
final String[] packageArray = ActivityManageActionCloseNotification.getPackageListString(this, applicationName);
|
|
||||||
alertDialogBuilder.setItems(packageArray, 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), ActivityManageNotificationTrigger.this).show();
|
|
||||||
tvSelectedApplication.setText(packageArray[which]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
|
||||||
|
|
||||||
return alertDialog;
|
|
||||||
}
|
|
||||||
private AlertDialog getActionStartActivityDialog3(final String packageName)
|
|
||||||
{
|
|
||||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
|
|
||||||
alertDialogBuilder.setTitle(getResources().getString(R.string.selectActivityToBeStarted));
|
|
||||||
final String activityArray[] = ActivityManageActionCloseNotification.getActivityListForPackageName(packageName);
|
|
||||||
alertDialogBuilder.setItems(activityArray, new DialogInterface.OnClickListener()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which)
|
|
||||||
{
|
|
||||||
ActivityInfo ai = ActivityManageActionCloseNotification.getActivityInfoForPackageNameAndActivityName(packageName, activityArray[which]);
|
|
||||||
tvSelectedApplication.setText(ai.packageName + ";" + ai.name);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
|
||||||
|
|
||||||
return alertDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState)
|
|
||||||
{
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_manage_action_close_notification);
|
|
||||||
|
|
||||||
etNotificationTitle = (EditText)findViewById(R.id.etNotificationTitle);
|
|
||||||
etNotificationText = (EditText)findViewById(R.id.etNotificationText);
|
|
||||||
bSelectApp = (Button)findViewById(R.id.bSelectApp);
|
|
||||||
bSaveActionCloseNotification = (Button)findViewById(R.id.bSaveActionCloseNotification);
|
|
||||||
spinnerTitleDirection = (Spinner)findViewById(R.id.spinnerTitleDirection);
|
|
||||||
spinnerTextDirection = (Spinner)findViewById(R.id.spinnerTextDirection);
|
|
||||||
tvSelectedApplication = (TextView)findViewById(R.id.etActivityOrActionPath);
|
|
||||||
|
|
||||||
directions = new String[] {
|
|
||||||
getResources().getString(R.string.directionStringEquals),
|
|
||||||
getResources().getString(R.string.directionStringContains),
|
|
||||||
getResources().getString(R.string.directionStringStartsWith),
|
|
||||||
getResources().getString(R.string.directionStringEndsWith),
|
|
||||||
getResources().getString(R.string.directionStringNotEquals)
|
|
||||||
};
|
|
||||||
|
|
||||||
directionSpinnerAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, ActivityManageActionCloseNotification.directions);
|
|
||||||
spinnerTitleDirection.setAdapter(directionSpinnerAdapter);
|
|
||||||
spinnerTextDirection.setAdapter(directionSpinnerAdapter);
|
|
||||||
directionSpinnerAdapter.notifyDataSetChanged();
|
|
||||||
|
|
||||||
bSelectApp.setOnClickListener(new OnClickListener()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void onClick(View v)
|
|
||||||
{
|
|
||||||
GetActivityListTask getActivityListTask = new GetActivityListTask();
|
|
||||||
getActivityListTask.execute();
|
|
||||||
progressDialog = ProgressDialog.show(ActivityManageActionCloseNotification.this, "", ActivityManageActionCloseNotification.this.getResources().getString(R.string.gettingListOfInstalledApplications));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
bSaveActionCloseNotification.setOnClickListener(new OnClickListener()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void onClick(View v)
|
|
||||||
{
|
|
||||||
String app;
|
|
||||||
if(tvSelectedApplication.getText().toString().equalsIgnoreCase(getResources().getString(R.string.anyApp)))
|
|
||||||
app = Trigger.anyAppString;
|
|
||||||
else
|
|
||||||
app = tvSelectedApplication.getText().toString();
|
|
||||||
|
|
||||||
String titleDir = Trigger.getMatchCode(spinnerTitleDirection.getSelectedItem().toString());
|
|
||||||
String title = etNotificationTitle.getText().toString();
|
|
||||||
String textDir = Trigger.getMatchCode(spinnerTextDirection.getSelectedItem().toString());
|
|
||||||
String text = etNotificationText.getText().toString();
|
|
||||||
|
|
||||||
Intent responseData = new Intent();
|
|
||||||
if(edit)
|
|
||||||
{
|
|
||||||
// editedNotificationAction.setTriggerParameter(chkNotificationDirection.isChecked());
|
|
||||||
responseData.putExtra(ActivityManageRule.intentNameActionParameter2, app + Action.actionParameter2Split + titleDir + Action.actionParameter2Split + title + Action.actionParameter2Split + textDir + Action.actionParameter2Split + text);
|
|
||||||
ActivityManageActionCloseNotification.this.setResult(RESULT_OK, responseData);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// data.putExtra(intentNameNotificationDirection, chkNotificationDirection.isChecked());
|
|
||||||
responseData.putExtra(ActivityManageRule.intentNameActionParameter2,
|
|
||||||
app + Action.actionParameter2Split +
|
|
||||||
titleDir + Action.actionParameter2Split +
|
|
||||||
title + Action.actionParameter2Split +
|
|
||||||
textDir + Action.actionParameter2Split +
|
|
||||||
text
|
|
||||||
);
|
|
||||||
// data.putExtra(intentNameNotificationApp, app);
|
|
||||||
// data.putExtra(intentNameNotificationTitleDir, titleDir);
|
|
||||||
// data.putExtra(intentNameNotificationTitle, title);
|
|
||||||
// data.putExtra(intentNameNotificationTextDir, textDir);
|
|
||||||
// data.putExtra(intentNameNotificationText, text);
|
|
||||||
ActivityManageActionCloseNotification.this.setResult(RESULT_OK, responseData);
|
|
||||||
}
|
|
||||||
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Intent i = getIntent();
|
|
||||||
if(!StringUtils.isBlank(i.getStringExtra(ActivityManageRule.intentNameActionParameter2)))
|
|
||||||
{
|
|
||||||
edit = true;
|
|
||||||
loadValuesIntoGui(i.getStringExtra(ActivityManageRule.intentNameActionParameter2));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadValuesIntoGui(String param)
|
|
||||||
{
|
|
||||||
String[] params = param.split(Action.actionParameter2Split);
|
|
||||||
|
|
||||||
String app = params[0];
|
|
||||||
String titleDir = params[1];
|
|
||||||
String title = params[2];
|
|
||||||
String textDir = params[3];
|
|
||||||
String text;
|
|
||||||
if (params.length >= 5)
|
|
||||||
text = params[4];
|
|
||||||
else
|
|
||||||
text = "";
|
|
||||||
|
|
||||||
if(!app.equals(Trigger.anyAppString))
|
|
||||||
tvSelectedApplication.setText(app);
|
|
||||||
|
|
||||||
for(int i = 0; i < directions.length; i++)
|
|
||||||
{
|
|
||||||
if(Trigger.getMatchCode(directions[i]).equalsIgnoreCase(titleDir))
|
|
||||||
spinnerTitleDirection.setSelection(i);
|
|
||||||
|
|
||||||
if(Trigger.getMatchCode(directions[i]).equalsIgnoreCase(textDir))
|
|
||||||
spinnerTextDirection.setSelection(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(title.length() > 0)
|
|
||||||
etNotificationTitle.setText(title);
|
|
||||||
|
|
||||||
if(text.length() > 0)
|
|
||||||
etNotificationText.setText(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
private class GetActivityListTask extends AsyncTask<Void, Void, Void>
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
protected Void doInBackground(Void... params)
|
|
||||||
{
|
|
||||||
getActivityList(ActivityManageActionCloseNotification.this);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPostExecute(Void result)
|
|
||||||
{
|
|
||||||
progressDialog.dismiss();
|
|
||||||
getActionStartActivityDialog1().show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,112 +0,0 @@
|
|||||||
package com.jens.automation2;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.RadioButton;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
public class ActivityManageActionControlMedia extends Activity
|
|
||||||
{
|
|
||||||
RadioButton rbMediaPlayPause, rbMediaPlay, rbMediaPause, rbMediaStop, rbMediaPrevious, rbMediaNext;
|
|
||||||
Button bSaveControlMediaAction;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState)
|
|
||||||
{
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_manage_action_control_media);
|
|
||||||
|
|
||||||
rbMediaPlayPause = (RadioButton)findViewById(R.id.rbMediaPlayPause);
|
|
||||||
rbMediaPlay = (RadioButton)findViewById(R.id.rbMediaPlay);
|
|
||||||
rbMediaPause = (RadioButton)findViewById(R.id.rbMediaPause);
|
|
||||||
rbMediaStop = (RadioButton)findViewById(R.id.rbMediaStop);
|
|
||||||
rbMediaPrevious = (RadioButton)findViewById(R.id.rbMediaPrevious);
|
|
||||||
rbMediaNext = (RadioButton)findViewById(R.id.rbMediaNext);
|
|
||||||
|
|
||||||
bSaveControlMediaAction = (Button)findViewById(R.id.bSaveControlMediaAction);
|
|
||||||
|
|
||||||
bSaveControlMediaAction.setOnClickListener(new View.OnClickListener()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void onClick(View view)
|
|
||||||
{
|
|
||||||
if(checkInput())
|
|
||||||
{
|
|
||||||
Intent answer = new Intent();
|
|
||||||
|
|
||||||
if(rbMediaPlayPause.isChecked())
|
|
||||||
answer.putExtra(ActivityManageRule.intentNameActionParameter2, "0");
|
|
||||||
else if(rbMediaPlay.isChecked())
|
|
||||||
answer.putExtra(ActivityManageRule.intentNameActionParameter2, "1");
|
|
||||||
else if(rbMediaPause.isChecked())
|
|
||||||
answer.putExtra(ActivityManageRule.intentNameActionParameter2, "2");
|
|
||||||
else if(rbMediaStop.isChecked())
|
|
||||||
answer.putExtra(ActivityManageRule.intentNameActionParameter2, "3");
|
|
||||||
else if(rbMediaPrevious.isChecked())
|
|
||||||
answer.putExtra(ActivityManageRule.intentNameActionParameter2, "4");
|
|
||||||
else if(rbMediaNext.isChecked())
|
|
||||||
answer.putExtra(ActivityManageRule.intentNameActionParameter2, "5");
|
|
||||||
|
|
||||||
setResult(RESULT_OK, answer);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Intent input = getIntent();
|
|
||||||
|
|
||||||
if(input.hasExtra(ActivityManageRule.intentNameActionParameter2))
|
|
||||||
{
|
|
||||||
String existing = input.getStringExtra(ActivityManageRule.intentNameActionParameter2);
|
|
||||||
switch (existing)
|
|
||||||
{
|
|
||||||
case "0":
|
|
||||||
rbMediaPlayPause.setChecked(true);
|
|
||||||
break;
|
|
||||||
case "1":
|
|
||||||
rbMediaPlay.setChecked(true);
|
|
||||||
break;
|
|
||||||
case "2":
|
|
||||||
rbMediaPause.setChecked(true);
|
|
||||||
break;
|
|
||||||
case "3":
|
|
||||||
rbMediaStop.setChecked(true);
|
|
||||||
break;
|
|
||||||
case "4":
|
|
||||||
rbMediaPrevious.setChecked(true);
|
|
||||||
break;
|
|
||||||
case "5":
|
|
||||||
rbMediaNext.setChecked(true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean checkInput()
|
|
||||||
{
|
|
||||||
if(
|
|
||||||
!rbMediaPlayPause.isChecked()
|
|
||||||
&&
|
|
||||||
!rbMediaPlay.isChecked()
|
|
||||||
&&
|
|
||||||
!rbMediaPause.isChecked()
|
|
||||||
&&
|
|
||||||
!rbMediaStop.isChecked()
|
|
||||||
&&
|
|
||||||
!rbMediaPrevious.isChecked()
|
|
||||||
&&
|
|
||||||
!rbMediaNext.isChecked()
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Toast.makeText(ActivityManageActionControlMedia.this, getResources().getString(R.string.pleaseSelectActionValue), Toast.LENGTH_SHORT).show();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,66 +0,0 @@
|
|||||||
package com.jens.automation2;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
public class ActivityManageActionCreateNotification extends Activity
|
|
||||||
{
|
|
||||||
public static final String intentNameNotificationTitle = "notificationTitle";
|
|
||||||
public static final String intentNameNotificationText = "notificationText";
|
|
||||||
|
|
||||||
EditText etNotificationTitle, etNotificationText;
|
|
||||||
Button bSaveActionNotification;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState)
|
|
||||||
{
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_manage_action_create_notification);
|
|
||||||
|
|
||||||
etNotificationTitle = (EditText) findViewById(R.id.etNotificationTitle);
|
|
||||||
etNotificationText = (EditText)findViewById(R.id.etNotificationText);
|
|
||||||
bSaveActionNotification = (Button)findViewById(R.id.bSaveActionNotification);
|
|
||||||
|
|
||||||
Intent input = getIntent();
|
|
||||||
|
|
||||||
if(input.hasExtra(intentNameNotificationTitle))
|
|
||||||
etNotificationTitle.setText(input.getStringExtra(intentNameNotificationTitle));
|
|
||||||
|
|
||||||
if(input.hasExtra(intentNameNotificationText))
|
|
||||||
etNotificationText.setText(input.getStringExtra(intentNameNotificationText));
|
|
||||||
|
|
||||||
bSaveActionNotification.setOnClickListener(new View.OnClickListener()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void onClick(View view)
|
|
||||||
{
|
|
||||||
if(StringUtils.isBlank(etNotificationTitle.getText().toString()))
|
|
||||||
{
|
|
||||||
Toast.makeText(ActivityManageActionCreateNotification.this, getResources().getString(R.string.enterTitle), Toast.LENGTH_LONG).show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(StringUtils.isBlank(etNotificationText.getText().toString()))
|
|
||||||
{
|
|
||||||
Toast.makeText(ActivityManageActionCreateNotification.this, getResources().getString(R.string.enterText), Toast.LENGTH_LONG).show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Intent answer = new Intent();
|
|
||||||
answer.putExtra(intentNameNotificationTitle, etNotificationTitle.getText().toString());
|
|
||||||
answer.putExtra(intentNameNotificationText, etNotificationText.getText().toString());
|
|
||||||
setResult(RESULT_OK, answer);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@ -387,9 +387,9 @@ public class ActivityManageActionStartActivity extends Activity
|
|||||||
Toast.makeText(ActivityManageActionStartActivity.this, getResources().getString(R.string.enterNameForIntentPair), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityManageActionStartActivity.this, getResources().getString(R.string.enterNameForIntentPair), Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(etParameterName.getText().toString().contains(Action.intentPairSeparator))
|
else if(etParameterName.getText().toString().contains(Action.intentPairSeperator))
|
||||||
{
|
{
|
||||||
Toast.makeText(ActivityManageActionStartActivity.this, String.format(getResources().getString(R.string.stringNotAllowed), Action.intentPairSeparator), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityManageActionStartActivity.this, String.format(getResources().getString(R.string.stringNotAllowed), Action.intentPairSeperator), Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(etParameterName.getText().toString().contains(";"))
|
else if(etParameterName.getText().toString().contains(";"))
|
||||||
@ -403,9 +403,9 @@ public class ActivityManageActionStartActivity extends Activity
|
|||||||
Toast.makeText(ActivityManageActionStartActivity.this, getResources().getString(R.string.enterValueForIntentPair), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityManageActionStartActivity.this, getResources().getString(R.string.enterValueForIntentPair), Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(etParameterValue.getText().toString().contains(Action.intentPairSeparator))
|
else if(etParameterValue.getText().toString().contains(Action.intentPairSeperator))
|
||||||
{
|
{
|
||||||
Toast.makeText(ActivityManageActionStartActivity.this, String.format(getResources().getString(R.string.stringNotAllowed), Action.intentPairSeparator), Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivityManageActionStartActivity.this, String.format(getResources().getString(R.string.stringNotAllowed), Action.intentPairSeperator), Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(etParameterValue.getText().toString().contains(";"))
|
else if(etParameterValue.getText().toString().contains(";"))
|
||||||
@ -414,7 +414,7 @@ public class ActivityManageActionStartActivity extends Activity
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String param = supportedIntentTypes[spinnerParameterType.getSelectedItemPosition()] + Action.intentPairSeparator + etParameterName.getText().toString() + Action.intentPairSeparator + etParameterValue.getText().toString();
|
String param = supportedIntentTypes[spinnerParameterType.getSelectedItemPosition()] + Action.intentPairSeperator + etParameterName.getText().toString() + Action.intentPairSeperator + etParameterValue.getText().toString();
|
||||||
intentPairList.add(param);
|
intentPairList.add(param);
|
||||||
|
|
||||||
spinnerParameterType.setSelection(0);
|
spinnerParameterType.setSelection(0);
|
||||||
|
@ -65,11 +65,14 @@ public class ActivityManageRule extends Activity
|
|||||||
static ProgressDialog progressDialog = null;
|
static ProgressDialog progressDialog = null;
|
||||||
|
|
||||||
static Trigger_Enum triggerType;
|
static Trigger_Enum triggerType;
|
||||||
|
static boolean triggerParameter;
|
||||||
static PointOfInterest triggerPoi;
|
static PointOfInterest triggerPoi;
|
||||||
static String triggerProcess;
|
static String triggerProcess;
|
||||||
static int triggerBattery;
|
static int triggerBattery;
|
||||||
static double triggerSpeed;
|
static double triggerSpeed;
|
||||||
static double triggerNoise;
|
static double triggerNoise;
|
||||||
|
static TimeFrame triggerTimeFrame;
|
||||||
|
static String triggerWifiName;
|
||||||
|
|
||||||
static Rule ruleToEdit;
|
static Rule ruleToEdit;
|
||||||
static boolean newRule;
|
static boolean newRule;
|
||||||
@ -99,7 +102,7 @@ public class ActivityManageRule extends Activity
|
|||||||
final static int requestCodeTriggerDeviceOrientationAdd = 301;
|
final static int requestCodeTriggerDeviceOrientationAdd = 301;
|
||||||
final static int requestCodeTriggerDeviceOrientationEdit = 302;
|
final static int requestCodeTriggerDeviceOrientationEdit = 302;
|
||||||
final static int requestCodeTriggerNotificationAdd = 8000;
|
final static int requestCodeTriggerNotificationAdd = 8000;
|
||||||
final static int requestCodeTriggerNotificationEdit = 8001;
|
final static int requestCodeTriggerNfcNotificationEdit = 8001;
|
||||||
final static int requestCodeActionPlaySoundAdd = 501;
|
final static int requestCodeActionPlaySoundAdd = 501;
|
||||||
final static int requestCodeActionPlaySoundEdit = 502;
|
final static int requestCodeActionPlaySoundEdit = 502;
|
||||||
final static int requestCodeTriggerPhoneCallAdd = 601;
|
final static int requestCodeTriggerPhoneCallAdd = 601;
|
||||||
@ -112,12 +115,6 @@ public class ActivityManageRule extends Activity
|
|||||||
final static int requestCodeActionSendTextMessageEdit = 5002;
|
final static int requestCodeActionSendTextMessageEdit = 5002;
|
||||||
final static int requestCodeActionVibrateAdd = 801;
|
final static int requestCodeActionVibrateAdd = 801;
|
||||||
final static int requestCodeActionVibrateEdit = 802;
|
final static int requestCodeActionVibrateEdit = 802;
|
||||||
final static int requestCodeActionCreateNotificationAdd = 803;
|
|
||||||
final static int requestCodeActionCreateNotificationEdit = 804;
|
|
||||||
final static int requestCodeActionCloseNotificationAdd = 805;
|
|
||||||
final static int requestCodeActionCloseNotificationEdit = 806;
|
|
||||||
final static int requestCodeActionControlMediaAdd = 807;
|
|
||||||
final static int requestCodeActionControlMediaEdit = 808;
|
|
||||||
|
|
||||||
public static ActivityManageRule getInstance()
|
public static ActivityManageRule getInstance()
|
||||||
{
|
{
|
||||||
@ -269,7 +266,7 @@ public class ActivityManageRule extends Activity
|
|||||||
ActivityManageTriggerNotification.editedNotificationTrigger = selectedTrigger;
|
ActivityManageTriggerNotification.editedNotificationTrigger = selectedTrigger;
|
||||||
Intent notificationEditor = new Intent(ActivityManageRule.this, ActivityManageTriggerNotification.class);
|
Intent notificationEditor = new Intent(ActivityManageRule.this, ActivityManageTriggerNotification.class);
|
||||||
notificationEditor.putExtra("edit", true);
|
notificationEditor.putExtra("edit", true);
|
||||||
startActivityForResult(notificationEditor, requestCodeTriggerNotificationEdit);
|
startActivityForResult(notificationEditor, requestCodeTriggerNfcNotificationEdit);
|
||||||
break;
|
break;
|
||||||
case phoneCall:
|
case phoneCall:
|
||||||
ActivityManageTriggerPhoneCall.editedPhoneCallTrigger = selectedTrigger;
|
ActivityManageTriggerPhoneCall.editedPhoneCallTrigger = selectedTrigger;
|
||||||
@ -356,8 +353,8 @@ public class ActivityManageRule extends Activity
|
|||||||
break;
|
break;
|
||||||
case setScreenBrightness:
|
case setScreenBrightness:
|
||||||
Intent activityEditScreenBrightnessIntent = new Intent(ActivityManageRule.this, ActivityManageActionBrightnessSetting.class);
|
Intent activityEditScreenBrightnessIntent = new Intent(ActivityManageRule.this, ActivityManageActionBrightnessSetting.class);
|
||||||
activityEditScreenBrightnessIntent.putExtra(ActivityManageActionBrightnessSetting.intentNameAutoBrightness, a.getParameter1());
|
activityEditScreenBrightnessIntent.putExtra("autoBrightness", a.getParameter1());
|
||||||
activityEditScreenBrightnessIntent.putExtra(ActivityManageActionBrightnessSetting.intentNameBrightnessValue, Integer.parseInt(a.getParameter2()));
|
activityEditScreenBrightnessIntent.putExtra("brightnessValue", Integer.parseInt(a.getParameter2()));
|
||||||
startActivityForResult(activityEditScreenBrightnessIntent, requestCodeActionScreenBrightnessEdit);
|
startActivityForResult(activityEditScreenBrightnessIntent, requestCodeActionScreenBrightnessEdit);
|
||||||
break;
|
break;
|
||||||
case vibrate:
|
case vibrate:
|
||||||
@ -365,23 +362,6 @@ public class ActivityManageRule extends Activity
|
|||||||
activityEditVibrateIntent.putExtra("vibratePattern", a.getParameter2());
|
activityEditVibrateIntent.putExtra("vibratePattern", a.getParameter2());
|
||||||
startActivityForResult(activityEditVibrateIntent, requestCodeActionVibrateEdit);
|
startActivityForResult(activityEditVibrateIntent, requestCodeActionVibrateEdit);
|
||||||
break;
|
break;
|
||||||
case controlMediaPlayback:
|
|
||||||
Intent activityEditControlMediaIntent = new Intent(ActivityManageRule.this, ActivityManageActionControlMedia.class);
|
|
||||||
activityEditControlMediaIntent.putExtra(ActivityManageRule.intentNameActionParameter2, a.getParameter2());
|
|
||||||
startActivityForResult(activityEditControlMediaIntent, requestCodeActionControlMediaEdit);
|
|
||||||
break;
|
|
||||||
case createNotification:
|
|
||||||
Intent activityEditCreateNotificationIntent = new Intent(ActivityManageRule.this, ActivityManageActionCreateNotification.class);
|
|
||||||
String[] elements = a.getParameter2().split(Action.actionParameter2Split);
|
|
||||||
activityEditCreateNotificationIntent.putExtra(ActivityManageActionCreateNotification.intentNameNotificationTitle, elements[0]);
|
|
||||||
activityEditCreateNotificationIntent.putExtra(ActivityManageActionCreateNotification.intentNameNotificationText, elements[1]);
|
|
||||||
startActivityForResult(activityEditCreateNotificationIntent, requestCodeActionCreateNotificationEdit);
|
|
||||||
break;
|
|
||||||
case closeNotification:
|
|
||||||
Intent activityEditCloseNotificationIntent = new Intent(ActivityManageRule.this, ActivityManageActionCloseNotification.class);
|
|
||||||
activityEditCloseNotificationIntent.putExtra(intentNameActionParameter2, a.getParameter2());
|
|
||||||
startActivityForResult(activityEditCloseNotificationIntent, requestCodeActionCloseNotificationEdit);
|
|
||||||
break;
|
|
||||||
case playSound:
|
case playSound:
|
||||||
Intent actionPlaySoundIntent = new Intent(context, ActivityManageActionPlaySound.class);
|
Intent actionPlaySoundIntent = new Intent(context, ActivityManageActionPlaySound.class);
|
||||||
actionPlaySoundIntent.putExtra("edit", true);
|
actionPlaySoundIntent.putExtra("edit", true);
|
||||||
@ -484,6 +464,7 @@ public class ActivityManageRule extends Activity
|
|||||||
|
|
||||||
for(int i=0; i<types.length; i++)
|
for(int i=0; i<types.length; i++)
|
||||||
{
|
{
|
||||||
|
//pointOfInterest, timeFrame, charging, batteryLevel, usb_host_connection, speed, noiseLevel, wifiConnection, process_started_stopped;
|
||||||
if(types[i].toString().equals(Trigger_Enum.pointOfInterest.toString()))
|
if(types[i].toString().equals(Trigger_Enum.pointOfInterest.toString()))
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.compass_small));
|
items.add(new Item(typesLong[i].toString(), R.drawable.compass_small));
|
||||||
else if(types[i].toString().equals(Trigger_Enum.timeFrame.toString()))
|
else if(types[i].toString().equals(Trigger_Enum.timeFrame.toString()))
|
||||||
@ -508,6 +489,7 @@ public class ActivityManageRule extends Activity
|
|||||||
items.add(new Item(typesLong[i].toString(), R.drawable.roaming));
|
items.add(new Item(typesLong[i].toString(), R.drawable.roaming));
|
||||||
else if(types[i].toString().equals(Trigger_Enum.phoneCall.toString()))
|
else if(types[i].toString().equals(Trigger_Enum.phoneCall.toString()))
|
||||||
{
|
{
|
||||||
|
// if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageSpecificRule.this, "android.permission.SEND_SMS") && !Miscellaneous.isGooglePlayInstalled(ActivityManageSpecificRule.this))
|
||||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, "android.permission.SEND_SMS"))
|
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, "android.permission.SEND_SMS"))
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.phone));
|
items.add(new Item(typesLong[i].toString(), R.drawable.phone));
|
||||||
}
|
}
|
||||||
@ -525,8 +507,6 @@ public class ActivityManageRule extends Activity
|
|||||||
items.add(new Item(typesLong[i].toString(), R.drawable.smartphone));
|
items.add(new Item(typesLong[i].toString(), R.drawable.smartphone));
|
||||||
else if(types[i].toString().equals(Trigger_Enum.profileActive.toString()))
|
else if(types[i].toString().equals(Trigger_Enum.profileActive.toString()))
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.sound));
|
items.add(new Item(typesLong[i].toString(), R.drawable.sound));
|
||||||
else if(types[i].toString().equals(Trigger_Enum.screenState.toString()))
|
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.smartphone));
|
|
||||||
else
|
else
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.placeholder));
|
items.add(new Item(typesLong[i].toString(), R.drawable.placeholder));
|
||||||
}
|
}
|
||||||
@ -608,9 +588,7 @@ public class ActivityManageRule extends Activity
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(triggerType == Trigger_Enum.process_started_stopped)
|
else if(triggerType == Trigger_Enum.process_started_stopped)
|
||||||
{
|
|
||||||
booleanChoices = new String[]{getResources().getString(R.string.started), getResources().getString(R.string.stopped)};
|
booleanChoices = new String[]{getResources().getString(R.string.started), getResources().getString(R.string.stopped)};
|
||||||
}
|
|
||||||
else if(triggerType == Trigger_Enum.notification)
|
else if(triggerType == Trigger_Enum.notification)
|
||||||
{
|
{
|
||||||
newTrigger.setTriggerType(Trigger_Enum.notification);
|
newTrigger.setTriggerType(Trigger_Enum.notification);
|
||||||
@ -690,12 +668,6 @@ public class ActivityManageRule extends Activity
|
|||||||
startActivityForResult(bluetoothEditor, requestCodeTriggerBluetoothAdd);
|
startActivityForResult(bluetoothEditor, requestCodeTriggerBluetoothAdd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(triggerType == Trigger_Enum.screenState)
|
|
||||||
{
|
|
||||||
newTrigger.setTriggerType(Trigger_Enum.screenState);
|
|
||||||
getTriggerScreenStateDialog().show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if(triggerType == Trigger_Enum.headsetPlugged)
|
else if(triggerType == Trigger_Enum.headsetPlugged)
|
||||||
booleanChoices = new String[]{getResources().getString(R.string.connected), getResources().getString(R.string.disconnected)};
|
booleanChoices = new String[]{getResources().getString(R.string.connected), getResources().getString(R.string.disconnected)};
|
||||||
|
|
||||||
@ -706,9 +678,6 @@ public class ActivityManageRule extends Activity
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
getTriggerParameterDialog(context, booleanChoices).show();
|
getTriggerParameterDialog(context, booleanChoices).show();
|
||||||
|
|
||||||
if(triggerType.equals(Trigger_Enum.process_started_stopped))
|
|
||||||
Miscellaneous.messageBox(getResources().getString(R.string.info), String.format(getResources().getString(R.string.featureCeasedToWorkLastWorkingAndroidVersion), "7"), ActivityManageRule.this).show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1030,33 +999,6 @@ public class ActivityManageRule extends Activity
|
|||||||
|
|
||||||
return alertDialog;
|
return alertDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
private AlertDialog getTriggerScreenStateDialog()
|
|
||||||
{
|
|
||||||
AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);
|
|
||||||
|
|
||||||
alertDialog.setTitle(Miscellaneous.getAnyContext().getResources().getString(R.string.selectDesiredState));
|
|
||||||
|
|
||||||
String[] choices = {
|
|
||||||
Miscellaneous.getAnyContext().getResources().getString(R.string.off),
|
|
||||||
Miscellaneous.getAnyContext().getResources().getString(R.string.on),
|
|
||||||
Miscellaneous.getAnyContext().getResources().getString(R.string.unlocked)
|
|
||||||
};
|
|
||||||
|
|
||||||
alertDialog.setItems(choices, new DialogInterface.OnClickListener()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which)
|
|
||||||
{
|
|
||||||
newTrigger.setTriggerParameter2(String.valueOf(which));
|
|
||||||
ruleToEdit.getTriggerSet().add(newTrigger);
|
|
||||||
refreshTriggerList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return alertDialog.create();
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
||||||
private AlertDialog getTriggerActivityDetectionDialog()
|
private AlertDialog getTriggerActivityDetectionDialog()
|
||||||
{
|
{
|
||||||
@ -1146,6 +1088,9 @@ public class ActivityManageRule extends Activity
|
|||||||
});
|
});
|
||||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||||
|
|
||||||
|
// Log.i("Amount of Applications", String.valueOf(applicationArray.length));
|
||||||
|
// Log.i("Amount of Packages", String.valueOf(ActivityManageStartActivity.getPackageListString(myContext).length));
|
||||||
|
|
||||||
return alertDialog;
|
return alertDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1182,7 +1127,6 @@ public class ActivityManageRule extends Activity
|
|||||||
triggerProcess = activityArray[which];
|
triggerProcess = activityArray[which];
|
||||||
newTrigger.setTriggerType(Trigger_Enum.process_started_stopped);
|
newTrigger.setTriggerType(Trigger_Enum.process_started_stopped);
|
||||||
newTrigger.setProcessName(triggerProcess);
|
newTrigger.setProcessName(triggerProcess);
|
||||||
newTrigger.setTriggerParameter2(packageName + Trigger.triggerParameter2Split + triggerProcess);
|
|
||||||
ruleToEdit.getTriggerSet().add(newTrigger);
|
ruleToEdit.getTriggerSet().add(newTrigger);
|
||||||
refreshTriggerList();
|
refreshTriggerList();
|
||||||
}
|
}
|
||||||
@ -1316,7 +1260,7 @@ public class ActivityManageRule extends Activity
|
|||||||
this.refreshTriggerList();
|
this.refreshTriggerList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(requestCode == requestCodeTriggerNotificationEdit)
|
else if(requestCode == requestCodeTriggerNfcNotificationEdit)
|
||||||
{
|
{
|
||||||
if(resultCode == RESULT_OK)
|
if(resultCode == RESULT_OK)
|
||||||
{
|
{
|
||||||
@ -1391,8 +1335,8 @@ public class ActivityManageRule extends Activity
|
|||||||
{
|
{
|
||||||
if(resultCode == RESULT_OK)
|
if(resultCode == RESULT_OK)
|
||||||
{
|
{
|
||||||
newAction.setParameter1(data.getBooleanExtra(ActivityManageActionBrightnessSetting.intentNameAutoBrightness, false));
|
newAction.setParameter1(data.getBooleanExtra("autoBrightness", false));
|
||||||
newAction.setParameter2(String.valueOf(data.getIntExtra(ActivityManageActionBrightnessSetting.intentNameBrightnessValue, 0)));
|
newAction.setParameter2(String.valueOf(data.getIntExtra("brightnessValue", 0)));
|
||||||
newAction.setParentRule(ruleToEdit);
|
newAction.setParentRule(ruleToEdit);
|
||||||
ruleToEdit.getActionSet().add(newAction);
|
ruleToEdit.getActionSet().add(newAction);
|
||||||
this.refreshActionList();
|
this.refreshActionList();
|
||||||
@ -1423,40 +1367,6 @@ public class ActivityManageRule extends Activity
|
|||||||
this.refreshActionList();
|
this.refreshActionList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(requestCode == requestCodeActionControlMediaAdd)
|
|
||||||
{
|
|
||||||
if(resultCode == RESULT_OK)
|
|
||||||
{
|
|
||||||
newAction.setParentRule(ruleToEdit);
|
|
||||||
newAction.setParameter2(data.getStringExtra(ActivityManageRule.intentNameActionParameter2));
|
|
||||||
ruleToEdit.getActionSet().add(newAction);
|
|
||||||
this.refreshActionList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(requestCode == requestCodeActionCreateNotificationAdd)
|
|
||||||
{
|
|
||||||
if(resultCode == RESULT_OK)
|
|
||||||
{
|
|
||||||
newAction.setParentRule(ruleToEdit);
|
|
||||||
newAction.setParameter2(
|
|
||||||
data.getStringExtra(ActivityManageActionCreateNotification.intentNameNotificationTitle)
|
|
||||||
+ Action.actionParameter2Split +
|
|
||||||
data.getStringExtra(ActivityManageActionCreateNotification.intentNameNotificationText)
|
|
||||||
);
|
|
||||||
ruleToEdit.getActionSet().add(newAction);
|
|
||||||
this.refreshActionList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(requestCode == requestCodeActionCloseNotificationAdd)
|
|
||||||
{
|
|
||||||
if(resultCode == RESULT_OK)
|
|
||||||
{
|
|
||||||
newAction.setParentRule(ruleToEdit);
|
|
||||||
newAction.setParameter2(data.getStringExtra(intentNameActionParameter2));
|
|
||||||
ruleToEdit.getActionSet().add(newAction);
|
|
||||||
this.refreshActionList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(requestCode == requestCodeActionVibrateEdit)
|
else if(requestCode == requestCodeActionVibrateEdit)
|
||||||
{
|
{
|
||||||
if(resultCode == RESULT_OK)
|
if(resultCode == RESULT_OK)
|
||||||
@ -1469,46 +1379,6 @@ public class ActivityManageRule extends Activity
|
|||||||
this.refreshActionList();
|
this.refreshActionList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(requestCode == requestCodeActionControlMediaEdit)
|
|
||||||
{
|
|
||||||
if(resultCode == RESULT_OK)
|
|
||||||
{
|
|
||||||
ruleToEdit.getActionSet().get(editIndex).setParentRule(ruleToEdit);
|
|
||||||
|
|
||||||
if(data.hasExtra(intentNameActionParameter2))
|
|
||||||
ruleToEdit.getActionSet().get(editIndex).setParameter2(data.getStringExtra(intentNameActionParameter2));
|
|
||||||
|
|
||||||
this.refreshActionList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(requestCode == requestCodeActionCreateNotificationEdit)
|
|
||||||
{
|
|
||||||
if(resultCode == RESULT_OK)
|
|
||||||
{
|
|
||||||
ruleToEdit.getActionSet().get(editIndex).setParentRule(ruleToEdit);
|
|
||||||
|
|
||||||
if(data.hasExtra(ActivityManageActionCreateNotification.intentNameNotificationTitle))
|
|
||||||
ruleToEdit.getActionSet().get(editIndex).setParameter2(
|
|
||||||
data.getStringExtra(ActivityManageActionCreateNotification.intentNameNotificationTitle)
|
|
||||||
+ Action.actionParameter2Split +
|
|
||||||
data.getStringExtra(ActivityManageActionCreateNotification.intentNameNotificationText)
|
|
||||||
);
|
|
||||||
|
|
||||||
this.refreshActionList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(requestCode == requestCodeActionCloseNotificationEdit)
|
|
||||||
{
|
|
||||||
if(resultCode == RESULT_OK)
|
|
||||||
{
|
|
||||||
ruleToEdit.getActionSet().get(editIndex).setParentRule(ruleToEdit);
|
|
||||||
|
|
||||||
if(data.hasExtra(intentNameActionParameter2))
|
|
||||||
ruleToEdit.getActionSet().get(editIndex).setParameter2(data.getStringExtra(intentNameActionParameter2));
|
|
||||||
|
|
||||||
this.refreshActionList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(requestCode == requestCodeActionPlaySoundAdd)
|
else if(requestCode == requestCodeActionPlaySoundAdd)
|
||||||
{
|
{
|
||||||
if(resultCode == RESULT_OK)
|
if(resultCode == RESULT_OK)
|
||||||
@ -1643,18 +1513,12 @@ public class ActivityManageRule extends Activity
|
|||||||
items.add(new Item(typesLong[i].toString(), R.drawable.talking));
|
items.add(new Item(typesLong[i].toString(), R.drawable.talking));
|
||||||
else if(types[i].toString().equals(Action_Enum.playMusic.toString()))
|
else if(types[i].toString().equals(Action_Enum.playMusic.toString()))
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.tune));
|
items.add(new Item(typesLong[i].toString(), R.drawable.tune));
|
||||||
else if(types[i].toString().equals(Action_Enum.controlMediaPlayback.toString()))
|
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.tune));
|
|
||||||
else if(types[i].toString().equals(Action_Enum.setScreenBrightness.toString()))
|
else if(types[i].toString().equals(Action_Enum.setScreenBrightness.toString()))
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.brightness));
|
items.add(new Item(typesLong[i].toString(), R.drawable.brightness));
|
||||||
else if(types[i].toString().equals(Action_Enum.playSound.toString()))
|
else if(types[i].toString().equals(Action_Enum.playSound.toString()))
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.sound));
|
items.add(new Item(typesLong[i].toString(), R.drawable.sound));
|
||||||
else if(types[i].toString().equals(Action_Enum.vibrate.toString()))
|
else if(types[i].toString().equals(Action_Enum.vibrate.toString()))
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.vibrate));
|
items.add(new Item(typesLong[i].toString(), R.drawable.vibrate));
|
||||||
else if(types[i].toString().equals(Action_Enum.createNotification.toString()))
|
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.notification));
|
|
||||||
else if(types[i].toString().equals(Action_Enum.closeNotification.toString()))
|
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.notification));
|
|
||||||
else if(types[i].toString().equals(Action_Enum.sendTextMessage.toString()))
|
else if(types[i].toString().equals(Action_Enum.sendTextMessage.toString()))
|
||||||
{
|
{
|
||||||
// if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageSpecificRule.this, "android.permission.SEND_SMS") && !Miscellaneous.isGooglePlayInstalled(ActivityManageSpecificRule.this))
|
// if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageSpecificRule.this, "android.permission.SEND_SMS") && !Miscellaneous.isGooglePlayInstalled(ActivityManageSpecificRule.this))
|
||||||
@ -1817,24 +1681,6 @@ public class ActivityManageRule extends Activity
|
|||||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionVibrate.class);
|
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionVibrate.class);
|
||||||
startActivityForResult(intent, requestCodeActionVibrateAdd);
|
startActivityForResult(intent, requestCodeActionVibrateAdd);
|
||||||
}
|
}
|
||||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.controlMediaPlayback.toString()))
|
|
||||||
{
|
|
||||||
newAction.setAction(Action_Enum.controlMediaPlayback);
|
|
||||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionControlMedia.class);
|
|
||||||
startActivityForResult(intent, requestCodeActionControlMediaAdd);
|
|
||||||
}
|
|
||||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.createNotification.toString()))
|
|
||||||
{
|
|
||||||
newAction.setAction(Action_Enum.createNotification);
|
|
||||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionCreateNotification.class);
|
|
||||||
startActivityForResult(intent, requestCodeActionCreateNotificationAdd);
|
|
||||||
}
|
|
||||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.closeNotification.toString()))
|
|
||||||
{
|
|
||||||
newAction.setAction(Action_Enum.closeNotification);
|
|
||||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionCloseNotification.class);
|
|
||||||
startActivityForResult(intent, requestCodeActionCloseNotificationAdd);
|
|
||||||
}
|
|
||||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setScreenBrightness.toString()))
|
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setScreenBrightness.toString()))
|
||||||
{
|
{
|
||||||
newAction.setAction(Action_Enum.setScreenBrightness);
|
newAction.setAction(Action_Enum.setScreenBrightness);
|
||||||
|
@ -263,7 +263,7 @@ public class ActivityManageTriggerNotification extends Activity
|
|||||||
etNotificationTitle = (EditText)findViewById(R.id.etNotificationTitle);
|
etNotificationTitle = (EditText)findViewById(R.id.etNotificationTitle);
|
||||||
etNotificationText = (EditText)findViewById(R.id.etNotificationText);
|
etNotificationText = (EditText)findViewById(R.id.etNotificationText);
|
||||||
bSelectApp = (Button)findViewById(R.id.bSelectApp);
|
bSelectApp = (Button)findViewById(R.id.bSelectApp);
|
||||||
bSaveTriggerNotification = (Button)findViewById(R.id.bSaveActionCloseNotification);
|
bSaveTriggerNotification = (Button)findViewById(R.id.bSaveTriggerNotification);
|
||||||
spinnerTitleDirection = (Spinner)findViewById(R.id.spinnerTitleDirection);
|
spinnerTitleDirection = (Spinner)findViewById(R.id.spinnerTitleDirection);
|
||||||
spinnerTextDirection = (Spinner)findViewById(R.id.spinnerTextDirection);
|
spinnerTextDirection = (Spinner)findViewById(R.id.spinnerTextDirection);
|
||||||
tvSelectedApplication = (TextView)findViewById(R.id.etActivityOrActionPath);
|
tvSelectedApplication = (TextView)findViewById(R.id.etActivityOrActionPath);
|
||||||
@ -312,7 +312,7 @@ public class ActivityManageTriggerNotification extends Activity
|
|||||||
{
|
{
|
||||||
String app;
|
String app;
|
||||||
if(tvSelectedApplication.getText().toString().equalsIgnoreCase(getResources().getString(R.string.anyApp)))
|
if(tvSelectedApplication.getText().toString().equalsIgnoreCase(getResources().getString(R.string.anyApp)))
|
||||||
app = Trigger.anyAppString;
|
app = "-1";
|
||||||
else
|
else
|
||||||
app = tvSelectedApplication.getText().toString();
|
app = tvSelectedApplication.getText().toString();
|
||||||
|
|
||||||
@ -367,7 +367,7 @@ public class ActivityManageTriggerNotification extends Activity
|
|||||||
else
|
else
|
||||||
text = "";
|
text = "";
|
||||||
|
|
||||||
if(!app.equals(Trigger.anyAppString))
|
if(!app.equals("-1"))
|
||||||
tvSelectedApplication.setText(app);
|
tvSelectedApplication.setText(app);
|
||||||
|
|
||||||
for(int i = 0; i < directions.length; i++)
|
for(int i = 0; i < directions.length; i++)
|
||||||
|
@ -66,21 +66,14 @@ public class ActivityManageTriggerProfile extends Activity
|
|||||||
String profileName = values[0];
|
String profileName = values[0];
|
||||||
|
|
||||||
List<Profile> profileList = Profile.getProfileCollection();
|
List<Profile> profileList = Profile.getProfileCollection();
|
||||||
|
|
||||||
boolean found = false;
|
|
||||||
|
|
||||||
for(int i = 0; i < profileList.size(); i++)
|
for(int i = 0; i < profileList.size(); i++)
|
||||||
{
|
{
|
||||||
if(profileList.get(i).getName().equals(profileName))
|
if(profileList.get(i).getName().equals(profileName))
|
||||||
{
|
{
|
||||||
spinnerProfiles.setSelection(i);
|
spinnerProfiles.setSelection(i);
|
||||||
found = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!found)
|
|
||||||
Miscellaneous.messageBox(getResources().getString(R.string.info), getResources().getString(R.string.profileWasNotFound), ActivityManageTriggerProfile.this).show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
|
@ -358,7 +358,6 @@ public class ActivityPermissions extends Activity
|
|||||||
for (Rule rule : Rule.getRuleCollection())
|
for (Rule rule : Rule.getRuleCollection())
|
||||||
{
|
{
|
||||||
for (String singlePermission : getPermissionsForRule(rule))
|
for (String singlePermission : getPermissionsForRule(rule))
|
||||||
{
|
|
||||||
if (!havePermission(singlePermission, workingContext))
|
if (!havePermission(singlePermission, workingContext))
|
||||||
{
|
{
|
||||||
if(
|
if(
|
||||||
@ -383,7 +382,6 @@ public class ActivityPermissions extends Activity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Not all permissions need to be asked for.
|
Not all permissions need to be asked for.
|
||||||
@ -529,13 +527,9 @@ public class ActivityPermissions extends Activity
|
|||||||
break;
|
break;
|
||||||
case playMusic:
|
case playMusic:
|
||||||
break;
|
break;
|
||||||
case controlMediaPlayback:
|
|
||||||
// addToArrayListUnique(Manifest.permission.BIND_NOTIFICATION_LISTENER_SERVICE, requiredPermissions);
|
|
||||||
// addToArrayListUnique(Manifest.permission.MEDIA_CONTENT_CONTROL, requiredPermissions);
|
|
||||||
break;
|
|
||||||
case sendTextMessage:
|
case sendTextMessage:
|
||||||
addToArrayListUnique(Manifest.permission.SEND_SMS, requiredPermissions);
|
addToArrayListUnique(Manifest.permission.SEND_SMS, requiredPermissions);
|
||||||
getPermissionsForVariablesInUse(action.getParameter2(), requiredPermissions);
|
checkPermissionsInVariableUse(action.getParameter2(), requiredPermissions);
|
||||||
break;
|
break;
|
||||||
case setAirplaneMode:
|
case setAirplaneMode:
|
||||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||||
@ -594,7 +588,7 @@ public class ActivityPermissions extends Activity
|
|||||||
// addToArrayListUnique("android.permission.TETHER_PRIVILEGED", requiredPermissions);
|
// addToArrayListUnique("android.permission.TETHER_PRIVILEGED", requiredPermissions);
|
||||||
break;
|
break;
|
||||||
case speakText:
|
case speakText:
|
||||||
getPermissionsForVariablesInUse(action.getParameter2(), requiredPermissions);
|
checkPermissionsInVariableUse(action.getParameter2(), requiredPermissions);
|
||||||
break;
|
break;
|
||||||
case startOtherActivity:
|
case startOtherActivity:
|
||||||
if(
|
if(
|
||||||
@ -614,7 +608,7 @@ public class ActivityPermissions extends Activity
|
|||||||
break;
|
break;
|
||||||
case triggerUrl:
|
case triggerUrl:
|
||||||
addToArrayListUnique(Manifest.permission.INTERNET, requiredPermissions);
|
addToArrayListUnique(Manifest.permission.INTERNET, requiredPermissions);
|
||||||
getPermissionsForVariablesInUse(action.getParameter2(), requiredPermissions);
|
checkPermissionsInVariableUse(action.getParameter2(), requiredPermissions);
|
||||||
break;
|
break;
|
||||||
case turnBluetoothOff:
|
case turnBluetoothOff:
|
||||||
addToArrayListUnique(Manifest.permission.BLUETOOTH_ADMIN, requiredPermissions);
|
addToArrayListUnique(Manifest.permission.BLUETOOTH_ADMIN, requiredPermissions);
|
||||||
@ -655,9 +649,6 @@ public class ActivityPermissions extends Activity
|
|||||||
case playSound:
|
case playSound:
|
||||||
addToArrayListUnique(Manifest.permission.READ_EXTERNAL_STORAGE, requiredPermissions);
|
addToArrayListUnique(Manifest.permission.READ_EXTERNAL_STORAGE, requiredPermissions);
|
||||||
break;
|
break;
|
||||||
case closeNotification:
|
|
||||||
addToArrayListUnique(Manifest.permission.BIND_NOTIFICATION_LISTENER_SERVICE, requiredPermissions);
|
|
||||||
break;
|
|
||||||
case turnScreenOnOrOff:
|
case turnScreenOnOrOff:
|
||||||
if(action.getParameter1())
|
if(action.getParameter1())
|
||||||
addToArrayListUnique(Manifest.permission.WAKE_LOCK, requiredPermissions);
|
addToArrayListUnique(Manifest.permission.WAKE_LOCK, requiredPermissions);
|
||||||
@ -1159,7 +1150,7 @@ public class ActivityPermissions extends Activity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ArrayList<String> getPermissionsForVariablesInUse(String text, ArrayList<String> permsList)
|
static ArrayList<String> checkPermissionsInVariableUse(String text, ArrayList<String> permsList)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
[uniqueid]
|
[uniqueid]
|
||||||
|
@ -41,14 +41,8 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
protected final static int notificationIdRestrictions = 1005;
|
protected final static int notificationIdRestrictions = 1005;
|
||||||
protected final static int notificationIdLocationRestriction = 1006;
|
protected final static int notificationIdLocationRestriction = 1006;
|
||||||
|
|
||||||
final static String NOTIFICATION_CHANNEL_ID_SERVICE = "com.jens.automation2_service";
|
final static String NOTIFICATION_CHANNEL_ID = "com.jens.automation2";
|
||||||
final static String NOTIFICATION_CHANNEL_NAME_SERVICE = "Service notification";
|
final static String channelName = "Service notification";
|
||||||
|
|
||||||
final static String NOTIFICATION_CHANNEL_ID_FUNCTIONALITY = "com.jens.automation2_functionality";
|
|
||||||
final static String NOTIFICATION_CHANNEL_NAME_FUNCTIONALITY = "Functionality information";
|
|
||||||
|
|
||||||
final static String NOTIFICATION_CHANNEL_ID_RULES = "com.jens.automation2_rules";
|
|
||||||
final static String NOTIFICATION_CHANNEL_NAME_RULES = "Rule notifications";
|
|
||||||
|
|
||||||
protected static Notification myNotification;
|
protected static Notification myNotification;
|
||||||
protected static NotificationCompat.Builder notificationBuilder = null;
|
protected static NotificationCompat.Builder notificationBuilder = null;
|
||||||
@ -71,6 +65,7 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
lockSoundChangesEnd = Calendar.getInstance();
|
lockSoundChangesEnd = Calendar.getInstance();
|
||||||
|
|
||||||
lockSoundChangesEnd.add(Calendar.MINUTE, Settings.lockSoundChangesInterval);
|
lockSoundChangesEnd.add(Calendar.MINUTE, Settings.lockSoundChangesInterval);
|
||||||
|
// ActivityMainScreen.getActivityMainScreenInstance().updateMainScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkLockSoundChangesTimeElapsed()
|
public void checkLockSoundChangesTimeElapsed()
|
||||||
@ -114,6 +109,18 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
|
|
||||||
public boolean checkStartupRequirements(Context context, boolean startAtBoot)
|
public boolean checkStartupRequirements(Context context, boolean startAtBoot)
|
||||||
{
|
{
|
||||||
|
// if (!ActivityPermissions.havePermission(ActivityPermissions.writeExternalStoragePermissionName, AutomationService.this))
|
||||||
|
// {
|
||||||
|
// /*
|
||||||
|
// Don't have permission to access external storage. This is a show stopper as
|
||||||
|
// the configuration file is stored on external storage.
|
||||||
|
// */
|
||||||
|
// Miscellaneous.logEvent("e", "Permission", "Don't have permission to access external storage. Will request it now.", 4);
|
||||||
|
//// Toast.makeText(AutomationService.this, getResources().getString(R.string.appRequiresPermissiontoAccessExternalStorage), Toast.LENGTH_LONG).show();
|
||||||
|
// ActivityPermissions.requestSpecificPermission(ActivityPermissions.writeExternalStoragePermissionName);
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
|
||||||
if(Build.VERSION.SDK_INT >= 28)
|
if(Build.VERSION.SDK_INT >= 28)
|
||||||
{
|
{
|
||||||
if (!ActivityPermissions.havePermission(Manifest.permission.FOREGROUND_SERVICE, AutomationService.this))
|
if (!ActivityPermissions.havePermission(Manifest.permission.FOREGROUND_SERVICE, AutomationService.this))
|
||||||
@ -128,14 +135,9 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (PointOfInterest.getPointOfInterestCollection() == null | PointOfInterest.getPointOfInterestCollection().size() == 0
|
||||||
PointOfInterest.getPointOfInterestCollection() == null
|
|
|
||||||
||
|
Rule.getRuleCollection() == null | Rule.getRuleCollection().size() == 0
|
||||||
PointOfInterest.getPointOfInterestCollection().size() == 0
|
|
||||||
||
|
|
||||||
Rule.getRuleCollection() == null
|
|
||||||
||
|
|
||||||
Rule.getRuleCollection().size() == 0
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (startAtBoot)
|
if (startAtBoot)
|
||||||
@ -171,7 +173,7 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if still no POIs...
|
//if still no POIs...
|
||||||
if (Rule.getRuleCollection() == null || Rule.getRuleCollection().size() == 0)
|
if (Rule.getRuleCollection() == null | Rule.getRuleCollection().size() == 0)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("w", "AutomationService", context.getResources().getString(R.string.serviceWontStart), 1);
|
Miscellaneous.logEvent("w", "AutomationService", context.getResources().getString(R.string.serviceWontStart), 1);
|
||||||
Toast.makeText(context, context.getResources().getString(R.string.serviceWontStart), Toast.LENGTH_LONG).show();
|
Toast.makeText(context, context.getResources().getString(R.string.serviceWontStart), Toast.LENGTH_LONG).show();
|
||||||
@ -197,13 +199,13 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
if (checkStartupRequirements(this, startAtBoot))
|
if (checkStartupRequirements(this, startAtBoot))
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "Service", this.getResources().getString(R.string.logServiceStarting) + " VERSION_CODE: " + BuildConfig.VERSION_CODE + ", VERSION_NAME: " + BuildConfig.VERSION_NAME + ", flavor: " + BuildConfig.FLAVOR, 1);
|
Miscellaneous.logEvent("i", "Service", this.getResources().getString(R.string.logServiceStarting) + " VERSION_CODE: " + BuildConfig.VERSION_CODE + ", VERSION_NAME: " + BuildConfig.VERSION_NAME + ", flavor: " + BuildConfig.FLAVOR, 1);
|
||||||
Miscellaneous.logEvent("i", "Service", ActivityControlCenter.getSystemInfo(), 1);
|
Miscellaneous.logEvent("i", "Service", ActivityMaintenance.getSystemInfo(), 1);
|
||||||
|
|
||||||
startUpRoutine();
|
startUpRoutine();
|
||||||
|
|
||||||
Intent myIntent = new Intent(this, ActivityMainTabLayout.class);
|
Intent myIntent = new Intent(this, ActivityMainTabLayout.class);
|
||||||
myPendingIntent = PendingIntent.getActivity(this, 0, myIntent, 0);
|
myPendingIntent = PendingIntent.getActivity(this, 0, myIntent, 0);
|
||||||
notificationBuilder = createServiceNotificationBuilder();
|
notificationBuilder = createDefaultNotificationBuilder();
|
||||||
|
|
||||||
updateNotification();
|
updateNotification();
|
||||||
|
|
||||||
@ -314,7 +316,7 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
checkForMissingBackgroundLocationPermission();
|
checkForMissingBackgroundLocationPermission();
|
||||||
|
|
||||||
Actions.context = this;
|
Actions.context = this;
|
||||||
Actions.automationServerRef = this;
|
Actions.autoMationServerRef = this;
|
||||||
|
|
||||||
startLocationProvider();
|
startLocationProvider();
|
||||||
ReceiverCoordinator.startAllReceivers();
|
ReceiverCoordinator.startAllReceivers();
|
||||||
@ -363,9 +365,9 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
Miscellaneous.logEvent("w", "Features disabled", "Features disabled because of rule " + rule, 5);
|
Miscellaneous.logEvent("w", "Features disabled", "Features disabled because of rule " + rule, 5);
|
||||||
|
|
||||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
|
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
|
||||||
Miscellaneous.createDismissibleNotificationWithDelay(1010, null, getResources().getString(R.string.featuresDisabled), ActivityPermissions.notificationIdPermissions, AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE, pi);
|
Miscellaneous.createDismissableNotificationWithDelay(1010, getResources().getString(R.string.featuresDisabled), ActivityPermissions.notificationIdPermissions, pi);
|
||||||
else
|
else
|
||||||
Miscellaneous.createDismissibleNotification(null, getResources().getString(R.string.featuresDisabled), ActivityPermissions.notificationIdPermissions, false, AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE, pi);
|
Miscellaneous.createDismissableNotification(getResources().getString(R.string.featuresDisabled), ActivityPermissions.notificationIdPermissions, pi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -387,9 +389,9 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
Miscellaneous.logEvent("w", "Features disabled", "Background location disabled because Google to blame.", 5);
|
Miscellaneous.logEvent("w", "Features disabled", "Background location disabled because Google to blame.", 5);
|
||||||
|
|
||||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
|
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
|
||||||
Miscellaneous.createDismissibleNotificationWithDelay(3300, null, getResources().getString(R.string.featuresDisabled), notificationIdRestrictions, AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE, pi);
|
Miscellaneous.createDismissableNotificationWithDelay(3300, getResources().getString(R.string.featuresDisabled), notificationIdRestrictions, pi);
|
||||||
else
|
else
|
||||||
Miscellaneous.createDismissibleNotification(null, getResources().getString(R.string.featuresDisabled), notificationIdRestrictions, false, AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE, pi);
|
Miscellaneous.createDismissableNotification(getResources().getString(R.string.featuresDisabled), notificationIdRestrictions, pi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -409,9 +411,9 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
Miscellaneous.logEvent("w", "Features disabled", "Background location disabled because Google to blame.", 5);
|
Miscellaneous.logEvent("w", "Features disabled", "Background location disabled because Google to blame.", 5);
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
|
||||||
Miscellaneous.createDismissibleNotificationWithDelay(2200, null, getResources().getString(R.string.featuresDisabled), notificationIdLocationRestriction, AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE, pi);
|
Miscellaneous.createDismissableNotificationWithDelay(2200, getResources().getString(R.string.featuresDisabled), notificationIdLocationRestriction, pi);
|
||||||
else
|
else
|
||||||
Miscellaneous.createDismissibleNotification(null, getResources().getString(R.string.featuresDisabled), notificationIdLocationRestriction, false, AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE, pi);
|
Miscellaneous.createDismissableNotification(getResources().getString(R.string.featuresDisabled), notificationIdLocationRestriction, pi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -480,7 +482,7 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static NotificationCompat.Builder createServiceNotificationBuilder()
|
protected static NotificationCompat.Builder createDefaultNotificationBuilder()
|
||||||
{
|
{
|
||||||
NotificationManager mNotificationManager = (NotificationManager) AutomationService.getInstance().getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager mNotificationManager = (NotificationManager) AutomationService.getInstance().getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
|
|
||||||
@ -488,14 +490,14 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||||
{
|
{
|
||||||
NotificationChannel channel = Miscellaneous.getNotificationChannel(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE);
|
NotificationChannel chan = new NotificationChannel(NOTIFICATION_CHANNEL_ID, channelName, NotificationManager.IMPORTANCE_LOW);
|
||||||
// channel.setLightColor(Color.BLUE);
|
// chan.setLightColor(Color.BLUE);
|
||||||
channel.enableVibration(false);
|
chan.enableVibration(false);
|
||||||
channel.setSound(null, null);
|
chan.setSound(null, null);
|
||||||
channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
chan.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
mNotificationManager.createNotificationChannel(channel);
|
mNotificationManager.createNotificationChannel(chan);
|
||||||
|
|
||||||
builder = new NotificationCompat.Builder(AutomationService.getInstance(), NOTIFICATION_CHANNEL_ID_SERVICE);
|
builder = new NotificationCompat.Builder(AutomationService.getInstance(), NOTIFICATION_CHANNEL_ID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
builder = new NotificationCompat.Builder(AutomationService.getInstance());
|
builder = new NotificationCompat.Builder(AutomationService.getInstance());
|
||||||
@ -574,7 +576,7 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
String textToDisplay = bodyText + " " + lastRuleString;
|
String textToDisplay = bodyText + " " + lastRuleString;
|
||||||
|
|
||||||
if(notificationBuilder == null)
|
if(notificationBuilder == null)
|
||||||
notificationBuilder = createServiceNotificationBuilder();
|
notificationBuilder = createDefaultNotificationBuilder();
|
||||||
|
|
||||||
notificationBuilder.setContentText(textToDisplay);
|
notificationBuilder.setContentText(textToDisplay);
|
||||||
notificationBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
notificationBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
||||||
|
@ -8,6 +8,7 @@ import android.app.NotificationChannel;
|
|||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
|
import android.content.ContentProvider;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -15,8 +16,6 @@ import android.content.pm.PackageInfo;
|
|||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.media.AudioAttributes;
|
|
||||||
import android.media.RingtoneManager;
|
|
||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
import android.net.NetworkInfo;
|
import android.net.NetworkInfo;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
@ -84,10 +83,7 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
@ -102,10 +98,13 @@ import javax.xml.parsers.DocumentBuilder;
|
|||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
import javax.xml.parsers.ParserConfigurationException;
|
import javax.xml.parsers.ParserConfigurationException;
|
||||||
|
|
||||||
import androidx.annotation.RequiresApi;
|
|
||||||
import androidx.core.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
import androidx.documentfile.provider.DocumentFile;
|
import androidx.documentfile.provider.DocumentFile;
|
||||||
|
|
||||||
|
import static android.provider.CalendarContract.CalendarCache.URI;
|
||||||
|
import static com.jens.automation2.AutomationService.NOTIFICATION_CHANNEL_ID;
|
||||||
|
import static com.jens.automation2.AutomationService.channelName;
|
||||||
|
|
||||||
public class Miscellaneous extends Service
|
public class Miscellaneous extends Service
|
||||||
{
|
{
|
||||||
protected static String writeableFolderStringCache = null;
|
protected static String writeableFolderStringCache = null;
|
||||||
@ -631,8 +630,6 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(source.contains("[notificationTitle]"))
|
if(source.contains("[notificationTitle]"))
|
||||||
{
|
|
||||||
if(NotificationListener.getLastNotification() != null)
|
|
||||||
{
|
{
|
||||||
String notificationTitle = NotificationListener.getLastNotification().getTitle();
|
String notificationTitle = NotificationListener.getLastNotification().getTitle();
|
||||||
|
|
||||||
@ -640,20 +637,12 @@ public class Miscellaneous extends Service
|
|||||||
source = source.replace("[notificationTitle]", notificationTitle);
|
source = source.replace("[notificationTitle]", notificationTitle);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
source = source.replace("[notificationTitle]", "notificationTitle unknown");
|
source = source.replace("notificationTitle unknown", notificationTitle);
|
||||||
Miscellaneous.logEvent("w", "Variable replacement", "notificationTitle was empty.", 3);
|
Miscellaneous.logEvent("w", "Variable replacement", "notificationTitle was empty.", 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
source = source.replace("[notificationTitle]", "notificationTitle unknown");
|
|
||||||
Miscellaneous.logEvent("w", "Variable replacement", "lastNotification was empty.", 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(source.contains("[notificationText]"))
|
if(source.contains("[notificationText]"))
|
||||||
{
|
|
||||||
if(NotificationListener.getLastNotification() != null)
|
|
||||||
{
|
{
|
||||||
String notificationText = NotificationListener.getLastNotification().getText();
|
String notificationText = NotificationListener.getLastNotification().getText();
|
||||||
|
|
||||||
@ -661,16 +650,10 @@ public class Miscellaneous extends Service
|
|||||||
source = source.replace("[notificationText]", notificationText);
|
source = source.replace("[notificationText]", notificationText);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
source = source.replace("[notificationText]", "notificationText unknown");
|
source = source.replace("notificationText unknown", notificationText);
|
||||||
Miscellaneous.logEvent("w", "Variable replacement", "notificationText was empty.", 3);
|
Miscellaneous.logEvent("w", "Variable replacement", "notificationText was empty.", 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
source = source.replace("[notificationText]", "notificationText unknown");
|
|
||||||
Miscellaneous.logEvent("w", "Variable replacement", "lastNotification was empty.", 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Miscellaneous.logEvent("i", "URL after replace", source);
|
// Miscellaneous.logEvent("i", "URL after replace", source);
|
||||||
|
|
||||||
@ -894,7 +877,7 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public static void createDismissibleNotificationWithDelay(long delay, String title, String textToDisplay, int notificationId, String notificationChannelId, PendingIntent pendingIntent)
|
public static void createDismissableNotificationWithDelay(long delay, String textToDisplay, int notificationId, PendingIntent pendingIntent)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Now what's this about?
|
Now what's this about?
|
||||||
@ -920,7 +903,7 @@ public class Miscellaneous extends Service
|
|||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
createDismissibleNotification(title, textToDisplay, notificationId, true, notificationChannelId, pendingIntent);
|
createDismissableNotification(textToDisplay, notificationId, pendingIntent);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -941,88 +924,40 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public static void createDismissibleNotification(String title, String textToDisplay, int notificationId, boolean vibrate, String notificationChannelId, PendingIntent pendingIntent)
|
public static void createDismissableNotification(String textToDisplay, int notificationId, PendingIntent pendingIntent)
|
||||||
{
|
{
|
||||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||||
{
|
{
|
||||||
createDismissibleNotificationSdk26(title, textToDisplay, notificationId, vibrate, notificationChannelId, pendingIntent);
|
createDismissableNotificationSdk26(textToDisplay, notificationId, pendingIntent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NotificationManager mNotificationManager = (NotificationManager) Miscellaneous.getAnyContext().getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager mNotificationManager = (NotificationManager) Miscellaneous.getAnyContext().getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
|
|
||||||
NotificationCompat.Builder dismissibleNotificationBuilder = createDismissibleNotificationBuilder(vibrate, notificationChannelId, pendingIntent);
|
NotificationCompat.Builder dismissableNotificationBuilder = createDismissableNotificationBuilder(pendingIntent);
|
||||||
|
dismissableNotificationBuilder.setContentText(textToDisplay);
|
||||||
|
dismissableNotificationBuilder.setContentIntent(pendingIntent);
|
||||||
|
dismissableNotificationBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
||||||
|
dismissableNotificationBuilder.setAutoCancel(true);
|
||||||
|
|
||||||
if(title == null)
|
Notification dismissableNotification = dismissableNotificationBuilder.build();
|
||||||
dismissibleNotificationBuilder.setContentTitle(AutomationService.getInstance().getResources().getString(R.string.app_name));
|
|
||||||
else
|
|
||||||
dismissibleNotificationBuilder.setContentTitle(title);
|
|
||||||
|
|
||||||
dismissibleNotificationBuilder.setContentText(textToDisplay);
|
mNotificationManager.notify(notificationId, dismissableNotification);
|
||||||
dismissibleNotificationBuilder.setContentIntent(pendingIntent);
|
|
||||||
dismissibleNotificationBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
|
||||||
dismissibleNotificationBuilder.setAutoCancel(true);
|
|
||||||
|
|
||||||
if(notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_RULES))
|
/*NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
|
||||||
dismissibleNotificationBuilder.setSmallIcon(R.drawable.info);
|
.setSmallIcon(R.drawable.ic_launcher) // notification icon
|
||||||
|
.setContentTitle("Notification!") // title for notification
|
||||||
Notification dismissibleNotification = dismissibleNotificationBuilder.build();
|
.setContentText("Hello word") // message for notification
|
||||||
|
.setAutoCancel(true); // clear notification after click
|
||||||
mNotificationManager.notify(notificationId, dismissibleNotification);
|
Intent intent = new Intent(this, MainActivity.class);
|
||||||
|
PendingIntent pi = PendingIntent.getActivity(this,0,intent,Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
mBuilder.setContentIntent(pi);
|
||||||
|
NotificationManager mNotificationManager =
|
||||||
|
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
|
mNotificationManager.notify(0, dismissableNotification);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
static void createDismissableNotificationSdk26(String textToDisplay, int notificationId, PendingIntent pendingIntent)
|
||||||
static NotificationChannel findExistingChannel(List<NotificationChannel> channels, String channelId)
|
|
||||||
{
|
|
||||||
for(NotificationChannel c : channels)
|
|
||||||
{
|
|
||||||
if(c.getId().equals(channelId))
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
|
||||||
static NotificationChannel getNotificationChannel(String channelId)
|
|
||||||
{
|
|
||||||
NotificationManager nm = (NotificationManager) Miscellaneous.getAnyContext().getSystemService(Context.NOTIFICATION_SERVICE);
|
|
||||||
List<NotificationChannel> channels = nm.getNotificationChannels();
|
|
||||||
|
|
||||||
if(!Settings.hasBeenDone(Settings.constNotificationChannelCleanupApk118) && BuildConfig.VERSION_CODE < 120)
|
|
||||||
{
|
|
||||||
// Perform a one-time cleanup of notification channels as they have been redesigned.
|
|
||||||
|
|
||||||
for(NotificationChannel c : channels)
|
|
||||||
nm.deleteNotificationChannel(c.getId());
|
|
||||||
|
|
||||||
Settings.considerDone(Settings.constNotificationChannelCleanupApk118);
|
|
||||||
Settings.writeSettings(Miscellaneous.getAnyContext());
|
|
||||||
}
|
|
||||||
|
|
||||||
NotificationChannel channel = findExistingChannel(channels, channelId);
|
|
||||||
|
|
||||||
if(channel == null)
|
|
||||||
{
|
|
||||||
switch (channelId)
|
|
||||||
{
|
|
||||||
case AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE:
|
|
||||||
channel = new NotificationChannel(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE, AutomationService.NOTIFICATION_CHANNEL_NAME_SERVICE, NotificationManager.IMPORTANCE_LOW);
|
|
||||||
break;
|
|
||||||
case AutomationService.NOTIFICATION_CHANNEL_ID_FUNCTIONALITY:
|
|
||||||
channel = new NotificationChannel(AutomationService.NOTIFICATION_CHANNEL_ID_FUNCTIONALITY, AutomationService.NOTIFICATION_CHANNEL_NAME_FUNCTIONALITY, NotificationManager.IMPORTANCE_HIGH);
|
|
||||||
break;
|
|
||||||
case AutomationService.NOTIFICATION_CHANNEL_ID_RULES:
|
|
||||||
channel = new NotificationChannel(AutomationService.NOTIFICATION_CHANNEL_ID_RULES, AutomationService.NOTIFICATION_CHANNEL_NAME_RULES, NotificationManager.IMPORTANCE_HIGH);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return channel;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void createDismissibleNotificationSdk26(String title, String textToDisplay, int notificationId, boolean vibrate, String notificationChannelId, PendingIntent pendingIntent)
|
|
||||||
{
|
{
|
||||||
NotificationManager mNotificationManager = (NotificationManager) AutomationService.getInstance().getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager mNotificationManager = (NotificationManager) AutomationService.getInstance().getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
|
|
||||||
@ -1030,44 +965,29 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||||
{
|
{
|
||||||
NotificationChannel notificationChannel = getNotificationChannel(notificationChannelId);
|
NotificationChannel chan = new NotificationChannel(NOTIFICATION_CHANNEL_ID, "Functionality warnings", NotificationManager.IMPORTANCE_HIGH);
|
||||||
// notificationChannel.setLightColor(Color.BLUE);
|
// chan.setLightColor(Color.BLUE);
|
||||||
notificationChannel.enableVibration(vibrate);
|
chan.enableVibration(false);
|
||||||
try
|
// chan.setSound(null, null);
|
||||||
{
|
chan.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
Uri notificationSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
|
mNotificationManager.createNotificationChannel(chan);
|
||||||
// Uri notificationSound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE+ "://" +mContext.getPackageName()+"/"+R.raw.apple_ring));
|
|
||||||
// Ringtone r = RingtoneManager.getRingtone(Miscellaneous.getAnyContext(), notification);
|
|
||||||
AudioAttributes.Builder b = new AudioAttributes.Builder();
|
|
||||||
b.setContentType(AudioAttributes.CONTENT_TYPE_UNKNOWN);
|
|
||||||
notificationChannel.setSound(notificationSound, b.build());
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("i", "Notification", Log.getStackTraceString(e), 2);
|
|
||||||
}
|
|
||||||
notificationChannel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
|
||||||
mNotificationManager.createNotificationChannel(notificationChannel);
|
|
||||||
|
|
||||||
builder = new NotificationCompat.Builder(AutomationService.getInstance(), notificationChannel.getId());
|
builder = new NotificationCompat.Builder(AutomationService.getInstance(), NOTIFICATION_CHANNEL_ID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
builder = new NotificationCompat.Builder(AutomationService.getInstance());
|
builder = new NotificationCompat.Builder(AutomationService.getInstance());
|
||||||
|
|
||||||
|
// if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||||
|
// builder.setCategory(Notification.CATEGORY_SERVICE);
|
||||||
|
|
||||||
builder.setWhen(System.currentTimeMillis());
|
builder.setWhen(System.currentTimeMillis());
|
||||||
builder.setContentIntent(pendingIntent);
|
builder.setContentIntent(pendingIntent);
|
||||||
|
|
||||||
if(title == null)
|
|
||||||
builder.setContentTitle(AutomationService.getInstance().getResources().getString(R.string.app_name));
|
builder.setContentTitle(AutomationService.getInstance().getResources().getString(R.string.app_name));
|
||||||
else
|
|
||||||
builder.setContentTitle(title);
|
|
||||||
|
|
||||||
builder.setOnlyAlertOnce(true);
|
builder.setOnlyAlertOnce(true);
|
||||||
|
|
||||||
if(Settings.showIconWhenServiceIsRunning && notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE))
|
if(Settings.showIconWhenServiceIsRunning)
|
||||||
builder.setSmallIcon(R.drawable.ic_launcher);
|
builder.setSmallIcon(R.drawable.ic_launcher);
|
||||||
else if(!notificationChannelId.equals(AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE))
|
|
||||||
builder.setSmallIcon(R.drawable.info);
|
|
||||||
|
|
||||||
builder.setContentText(textToDisplay);
|
builder.setContentText(textToDisplay);
|
||||||
builder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
builder.setStyle(new NotificationCompat.BigTextStyle().bigText(textToDisplay));
|
||||||
@ -1075,6 +995,7 @@ public class Miscellaneous extends Service
|
|||||||
NotificationManager notificationManager = (NotificationManager) Miscellaneous.getAnyContext().getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager notificationManager = (NotificationManager) Miscellaneous.getAnyContext().getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
notificationManager.notify(1, builder.build());
|
notificationManager.notify(1, builder.build());
|
||||||
|
|
||||||
|
|
||||||
// Intent notifyIntent = new Intent(context, notification.class);
|
// Intent notifyIntent = new Intent(context, notification.class);
|
||||||
// notifyIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
// notifyIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||||
//
|
//
|
||||||
@ -1096,7 +1017,7 @@ public class Miscellaneous extends Service
|
|||||||
// notificationManager.notify(1, notification);
|
// notificationManager.notify(1, notification);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static NotificationCompat.Builder createDismissibleNotificationBuilder(boolean vibrate, String notificationChannelId, PendingIntent myPendingIntent)
|
protected static NotificationCompat.Builder createDismissableNotificationBuilder(PendingIntent myPendingIntent)
|
||||||
{
|
{
|
||||||
NotificationManager mNotificationManager = (NotificationManager) AutomationService.getInstance().getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager mNotificationManager = (NotificationManager) AutomationService.getInstance().getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
|
|
||||||
@ -1104,14 +1025,14 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||||
{
|
{
|
||||||
NotificationChannel notificationChannel = getNotificationChannel(notificationChannelId);
|
NotificationChannel chan = new NotificationChannel(NOTIFICATION_CHANNEL_ID, channelName, NotificationManager.IMPORTANCE_HIGH);
|
||||||
// notificationChannel.setLightColor(Color.BLUE);
|
// chan.setLightColor(Color.BLUE);
|
||||||
notificationChannel.enableVibration(vibrate);
|
// chan.enableVibration(false);
|
||||||
// notificationChannel.setSound(null, null);
|
// chan.setSound(null, null);
|
||||||
notificationChannel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
chan.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
|
||||||
mNotificationManager.createNotificationChannel(notificationChannel);
|
mNotificationManager.createNotificationChannel(chan);
|
||||||
|
|
||||||
builder = new NotificationCompat.Builder(AutomationService.getInstance(), notificationChannelId);
|
builder = new NotificationCompat.Builder(AutomationService.getInstance(), NOTIFICATION_CHANNEL_ID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
builder = new NotificationCompat.Builder(AutomationService.getInstance());
|
builder = new NotificationCompat.Builder(AutomationService.getInstance());
|
||||||
@ -1672,86 +1593,4 @@ public class Miscellaneous extends Service
|
|||||||
|
|
||||||
return formattedDate;
|
return formattedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean arraySearch(String[] haystack, String needle, boolean caseSensitive, boolean matchFullLine)
|
|
||||||
{
|
|
||||||
if(matchFullLine)
|
|
||||||
{
|
|
||||||
if(caseSensitive)
|
|
||||||
{
|
|
||||||
for (String s : haystack)
|
|
||||||
{
|
|
||||||
if (s.equals(needle))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (String s : haystack)
|
|
||||||
{
|
|
||||||
if (s.toLowerCase().equals(needle.toLowerCase()))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(caseSensitive)
|
|
||||||
{
|
|
||||||
for (String s : haystack)
|
|
||||||
{
|
|
||||||
if (s.contains(needle))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (String s : haystack)
|
|
||||||
{
|
|
||||||
if (s.toLowerCase().contains(needle.toLowerCase()))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean arraySearch(ArrayList<String> requestList, String needle, boolean caseSensitive, boolean matchFullLine)
|
|
||||||
{
|
|
||||||
return arraySearch(requestList.toArray(new String[requestList.size()]), needle, caseSensitive, matchFullLine);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get ISO 3166-1 alpha-2 country code for this device (or null if not available)
|
|
||||||
* @param context Context reference to get the TelephonyManager instance from
|
|
||||||
* @return country code or null
|
|
||||||
*/
|
|
||||||
public static String getUserCountry(Context context) {
|
|
||||||
try
|
|
||||||
{
|
|
||||||
final TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
|
||||||
final String simCountry = tm.getSimCountryIso();
|
|
||||||
if (simCountry != null && simCountry.length() == 2)
|
|
||||||
{ // SIM country code is available
|
|
||||||
return simCountry.toLowerCase(Locale.US);
|
|
||||||
}
|
|
||||||
else if (tm.getPhoneType() != TelephonyManager.PHONE_TYPE_CDMA)
|
|
||||||
{ // device is not 3G (would be unreliable)
|
|
||||||
String networkCountry = tm.getNetworkCountryIso();
|
|
||||||
if (networkCountry != null && networkCountry.length() == 2)
|
|
||||||
{ // network country code is available
|
|
||||||
return networkCountry.toLowerCase(Locale.US);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (SecurityException se)
|
|
||||||
{
|
|
||||||
return "unknown";
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -15,7 +15,6 @@ import com.jens.automation2.receivers.HeadphoneJackListener;
|
|||||||
import com.jens.automation2.receivers.NoiseListener;
|
import com.jens.automation2.receivers.NoiseListener;
|
||||||
import com.jens.automation2.receivers.PhoneStatusListener;
|
import com.jens.automation2.receivers.PhoneStatusListener;
|
||||||
import com.jens.automation2.receivers.ProcessListener;
|
import com.jens.automation2.receivers.ProcessListener;
|
||||||
import com.jens.automation2.receivers.ScreenStateReceiver;
|
|
||||||
import com.jens.automation2.receivers.TimeZoneListener;
|
import com.jens.automation2.receivers.TimeZoneListener;
|
||||||
|
|
||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
@ -52,10 +51,8 @@ public class ReceiverCoordinator
|
|||||||
HeadphoneJackListener.class,
|
HeadphoneJackListener.class,
|
||||||
//NfcReceiver.class,
|
//NfcReceiver.class,
|
||||||
NoiseListener.class,
|
NoiseListener.class,
|
||||||
//NotificationListener.class,
|
|
||||||
PhoneStatusListener.class,
|
PhoneStatusListener.class,
|
||||||
ProcessListener.class,
|
ProcessListener.class,
|
||||||
ScreenStateReceiver.class,
|
|
||||||
TimeZoneListener.class
|
TimeZoneListener.class
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -72,7 +69,6 @@ public class ReceiverCoordinator
|
|||||||
NoiseListener.class,
|
NoiseListener.class,
|
||||||
PhoneStatusListener.class,
|
PhoneStatusListener.class,
|
||||||
ProcessListener.class,
|
ProcessListener.class,
|
||||||
ScreenStateReceiver.class,
|
|
||||||
TimeZoneListener.class
|
TimeZoneListener.class
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -136,6 +132,12 @@ public class ReceiverCoordinator
|
|||||||
Miscellaneous.logEvent("w", "Error in new model", Log.getStackTraceString(e), 3);
|
Miscellaneous.logEvent("w", "Error in new model", Log.getStackTraceString(e), 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if(Settings.useAccelerometerForPositioning && !Miscellaneous.isAndroidEmulator())
|
||||||
|
// {
|
||||||
|
// accelerometerHandler = new AccelerometerHandler();
|
||||||
|
// mySensorActivity = new SensorActivity(this);
|
||||||
|
// }
|
||||||
|
|
||||||
// startPhoneStateListener
|
// startPhoneStateListener
|
||||||
PhoneStatusListener.startPhoneStatusListener(AutomationService.getInstance()); // also used to mute anouncements during calls
|
PhoneStatusListener.startPhoneStatusListener(AutomationService.getInstance()); // also used to mute anouncements during calls
|
||||||
|
|
||||||
@ -161,7 +163,7 @@ public class ReceiverCoordinator
|
|||||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.noiseLevel))
|
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.noiseLevel))
|
||||||
NoiseListener.startNoiseListener(AutomationService.getInstance());
|
NoiseListener.startNoiseListener(AutomationService.getInstance());
|
||||||
|
|
||||||
// startProcessListener
|
// startNoiseListener
|
||||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.process_started_stopped))
|
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.process_started_stopped))
|
||||||
ProcessListener.startProcessListener(AutomationService.getInstance());
|
ProcessListener.startProcessListener(AutomationService.getInstance());
|
||||||
|
|
||||||
@ -180,14 +182,13 @@ public class ReceiverCoordinator
|
|||||||
// Nothing to do, just not starting this one.
|
// Nothing to do, just not starting this one.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//startBluetoothReceiver
|
||||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.bluetoothConnection))
|
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.bluetoothConnection))
|
||||||
BluetoothReceiver.startBluetoothReceiver();
|
BluetoothReceiver.startBluetoothReceiver();
|
||||||
|
|
||||||
|
//startHeadsetJackListener
|
||||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.headsetPlugged))
|
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.headsetPlugged))
|
||||||
HeadphoneJackListener.getInstance().startListener(AutomationService.getInstance());
|
HeadphoneJackListener.getInstance().startListener(AutomationService.getInstance());
|
||||||
|
|
||||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.screenState))
|
|
||||||
ScreenStateReceiver.startScreenStateReceiver(AutomationService.getInstance());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void stopAllReceivers()
|
public static void stopAllReceivers()
|
||||||
@ -240,7 +241,7 @@ public class ReceiverCoordinator
|
|||||||
|
|
||||||
// timeFrame -> too inexpensive to shutdown
|
// timeFrame -> too inexpensive to shutdown
|
||||||
|
|
||||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.charging) || Rule.isAnyRuleUsing(Trigger.Trigger_Enum.usb_host_connection) || Rule.isAnyRuleUsing(Trigger.Trigger_Enum.batteryLevel))
|
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.charging) | Rule.isAnyRuleUsing(Trigger.Trigger_Enum.usb_host_connection) | Rule.isAnyRuleUsing(Trigger.Trigger_Enum.batteryLevel))
|
||||||
{
|
{
|
||||||
if(BatteryReceiver.haveAllPermission())
|
if(BatteryReceiver.haveAllPermission())
|
||||||
BatteryReceiver.startBatteryReceiver(AutomationService.getInstance());
|
BatteryReceiver.startBatteryReceiver(AutomationService.getInstance());
|
||||||
@ -272,17 +273,6 @@ public class ReceiverCoordinator
|
|||||||
ProcessListener.stopProcessListener(AutomationService.getInstance());
|
ProcessListener.stopProcessListener(AutomationService.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.screenState))
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("i", "LocationProvider", "Starting ScreenStateListener because used in a new/changed rule.", 4);
|
|
||||||
ScreenStateReceiver.startScreenStateReceiver(AutomationService.getInstance());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("i", "LocationProvider", "Shutting down ScreenStateListener because not used in any rule.", 4);
|
|
||||||
ScreenStateReceiver.stopScreenStateReceiver();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!BuildConfig.FLAVOR.equalsIgnoreCase("fdroidFlavor"))
|
if(!BuildConfig.FLAVOR.equalsIgnoreCase("fdroidFlavor"))
|
||||||
{
|
{
|
||||||
if (Rule.isAnyRuleUsing(Trigger.Trigger_Enum.activityDetection))
|
if (Rule.isAnyRuleUsing(Trigger.Trigger_Enum.activityDetection))
|
||||||
|
@ -20,7 +20,6 @@ public class Settings implements SharedPreferences
|
|||||||
public static final String zipFileName = "automation.zip";
|
public static final String zipFileName = "automation.zip";
|
||||||
|
|
||||||
public static final String constNewsOptInDone ="newsOptInDone";
|
public static final String constNewsOptInDone ="newsOptInDone";
|
||||||
public static final String constNotificationChannelCleanupApk118 ="notificationChannelCleanupApk118";
|
|
||||||
|
|
||||||
public static long minimumDistanceChangeForGpsUpdate;
|
public static long minimumDistanceChangeForGpsUpdate;
|
||||||
public static long minimumDistanceChangeForNetworkUpdate;
|
public static long minimumDistanceChangeForNetworkUpdate;
|
||||||
|
@ -22,9 +22,6 @@ import com.jens.automation2.receivers.NoiseListener;
|
|||||||
import com.jens.automation2.receivers.NotificationListener;
|
import com.jens.automation2.receivers.NotificationListener;
|
||||||
import com.jens.automation2.receivers.PhoneStatusListener;
|
import com.jens.automation2.receivers.PhoneStatusListener;
|
||||||
import com.jens.automation2.receivers.ProcessListener;
|
import com.jens.automation2.receivers.ProcessListener;
|
||||||
import com.jens.automation2.receivers.ScreenStateReceiver;
|
|
||||||
|
|
||||||
import static com.jens.automation2.Trigger.triggerParameter2Split;
|
|
||||||
import static com.jens.automation2.receivers.NotificationListener.EXTRA_TEXT;
|
import static com.jens.automation2.receivers.NotificationListener.EXTRA_TEXT;
|
||||||
import static com.jens.automation2.receivers.NotificationListener.EXTRA_TITLE;
|
import static com.jens.automation2.receivers.NotificationListener.EXTRA_TITLE;
|
||||||
|
|
||||||
@ -37,65 +34,9 @@ import java.util.Date;
|
|||||||
|
|
||||||
public class Trigger
|
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, profileActive, screenState, phoneCall; //phoneCall always needs to be at the very end because of Google's shitty so called privacy
|
|
||||||
|
|
||||||
public String getFullName(Context context)
|
|
||||||
{
|
|
||||||
switch(this)
|
|
||||||
{
|
|
||||||
case pointOfInterest:
|
|
||||||
return context.getResources().getString(R.string.triggerPointOfInterest);
|
|
||||||
case timeFrame:
|
|
||||||
return context.getResources().getString(R.string.triggerTimeFrame);
|
|
||||||
case charging:
|
|
||||||
return context.getResources().getString(R.string.triggerCharging);
|
|
||||||
case batteryLevel:
|
|
||||||
return context.getResources().getString(R.string.batteryLevel);
|
|
||||||
case usb_host_connection:
|
|
||||||
return context.getResources().getString(R.string.triggerUsb_host_connection);
|
|
||||||
case speed:
|
|
||||||
return context.getResources().getString(R.string.triggerSpeed);
|
|
||||||
case noiseLevel:
|
|
||||||
return context.getResources().getString(R.string.triggerNoiseLevel);
|
|
||||||
case wifiConnection:
|
|
||||||
return context.getResources().getString(R.string.wifiConnection);
|
|
||||||
case process_started_stopped:
|
|
||||||
return context.getResources().getString(R.string.anotherAppIsRunning);
|
|
||||||
case airplaneMode:
|
|
||||||
return context.getResources().getString(R.string.airplaneMode);
|
|
||||||
case roaming:
|
|
||||||
return context.getResources().getString(R.string.roaming);
|
|
||||||
case phoneCall:
|
|
||||||
return context.getResources().getString(R.string.phoneCall);
|
|
||||||
case nfcTag:
|
|
||||||
return context.getResources().getString(R.string.nfcTag);
|
|
||||||
case activityDetection:
|
|
||||||
return context.getResources().getString(R.string.activityDetection);
|
|
||||||
case bluetoothConnection:
|
|
||||||
return context.getResources().getString(R.string.bluetoothConnection);
|
|
||||||
case headsetPlugged:
|
|
||||||
return context.getResources().getString(R.string.triggerHeadsetPlugged);
|
|
||||||
case notification:
|
|
||||||
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);
|
|
||||||
case screenState:
|
|
||||||
return context.getResources().getString(R.string.screenState);
|
|
||||||
default:
|
|
||||||
return "Unknown";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
Rule parentRule = null;
|
Rule parentRule = null;
|
||||||
Calendar lastTimeNotApplied = null;
|
Calendar lastTimeNotApplied = null;
|
||||||
|
|
||||||
final static String anyAppString = "-1";
|
|
||||||
|
|
||||||
public boolean applies(Object triggeringObject, Context context)
|
public boolean applies(Object triggeringObject, Context context)
|
||||||
{
|
{
|
||||||
boolean result = true;
|
boolean result = true;
|
||||||
@ -180,10 +121,6 @@ public class Trigger
|
|||||||
if(!checkProfileActive())
|
if(!checkProfileActive())
|
||||||
result = false;
|
result = false;
|
||||||
break;
|
break;
|
||||||
case screenState:
|
|
||||||
if(!checkScreenState())
|
|
||||||
result = false;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -226,13 +163,15 @@ public class Trigger
|
|||||||
{
|
{
|
||||||
if(getParentRule().getLastExecution() == null || sbn.getPostTime() > this.getParentRule().getLastExecution().getTimeInMillis())
|
if(getParentRule().getLastExecution() == null || sbn.getPostTime() > this.getParentRule().getLastExecution().getTimeInMillis())
|
||||||
{
|
{
|
||||||
NotificationListener.SimpleNotification sn = NotificationListener.convertNotificationToSimpleNotification(true, sbn);
|
String notificationApp = sbn.getPackageName();
|
||||||
|
String notificationTitle = null;
|
||||||
|
String notificationText = null;
|
||||||
|
|
||||||
Miscellaneous.logEvent("i", "NotificationCheck", "Checking if this notification matches our rule " + this.getParentRule().getName() + ": " + sn.toString(), 5);
|
Miscellaneous.logEvent("i", "NotificationCheck", "Checking if this notification matches our rule " + this.getParentRule().getName() + ". App: " + notificationApp + ", title: " + notificationTitle + ", text: " + notificationText, 5);
|
||||||
|
|
||||||
if (!myApp.equals(anyAppString))
|
if (!myApp.equals("-1"))
|
||||||
{
|
{
|
||||||
if (!myApp.equalsIgnoreCase(sn.getApp()))
|
if (!notificationApp.equalsIgnoreCase(myApp))
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "NotificationCheck", "Notification app name does not match rule.", 5);
|
Miscellaneous.logEvent("i", "NotificationCheck", "Notification app name does not match rule.", 5);
|
||||||
continue;
|
continue;
|
||||||
@ -240,9 +179,6 @@ public class Trigger
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
Notifications from Automation are disregarded to avoid infinite loops.
|
|
||||||
*/
|
|
||||||
if(myApp.equals(BuildConfig.APPLICATION_ID))
|
if(myApp.equals(BuildConfig.APPLICATION_ID))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -254,10 +190,15 @@ public class Trigger
|
|||||||
https://stackoverflow.com/questions/28047767/notificationlistenerservice-not-reading-text-of-stacked-notifications
|
https://stackoverflow.com/questions/28047767/notificationlistenerservice-not-reading-text-of-stacked-notifications
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Bundle extras = sbn.getNotification().extras;
|
||||||
|
|
||||||
// T I T L E
|
// T I T L E
|
||||||
|
if (extras.containsKey(EXTRA_TITLE))
|
||||||
|
notificationTitle = sbn.getNotification().extras.getString(EXTRA_TITLE);
|
||||||
|
|
||||||
if (!StringUtils.isEmpty(requiredTitle))
|
if (!StringUtils.isEmpty(requiredTitle))
|
||||||
{
|
{
|
||||||
if (!Miscellaneous.compare(myTitleDir, requiredTitle, sn.getTitle()))
|
if (!Miscellaneous.compare(myTitleDir, requiredTitle, notificationTitle))
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "NotificationCheck", "Notification title does not match rule.", 5);
|
Miscellaneous.logEvent("i", "NotificationCheck", "Notification title does not match rule.", 5);
|
||||||
continue;
|
continue;
|
||||||
@ -267,9 +208,13 @@ public class Trigger
|
|||||||
Miscellaneous.logEvent("i", "NotificationCheck", "A required title for a notification trigger was not specified.", 5);
|
Miscellaneous.logEvent("i", "NotificationCheck", "A required title for a notification trigger was not specified.", 5);
|
||||||
|
|
||||||
// T E X T
|
// T E X T
|
||||||
|
|
||||||
|
if (extras.containsKey(EXTRA_TEXT))
|
||||||
|
notificationText = sbn.getNotification().extras.getString(EXTRA_TEXT);
|
||||||
|
|
||||||
if (!StringUtils.isEmpty(requiredText))
|
if (!StringUtils.isEmpty(requiredText))
|
||||||
{
|
{
|
||||||
if (!Miscellaneous.compare(myTextDir, requiredText, sn.getText()))
|
if (!Miscellaneous.compare(myTextDir, requiredText, notificationText))
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "NotificationCheck", "Notification text does not match rule.", 5);
|
Miscellaneous.logEvent("i", "NotificationCheck", "Notification text does not match rule.", 5);
|
||||||
continue;
|
continue;
|
||||||
@ -298,7 +243,7 @@ public class Trigger
|
|||||||
String title = NotificationListener.getLastNotification().getTitle();
|
String title = NotificationListener.getLastNotification().getTitle();
|
||||||
String text = NotificationListener.getLastNotification().getText();
|
String text = NotificationListener.getLastNotification().getText();
|
||||||
|
|
||||||
if (!myApp.equals(anyAppString))
|
if (!myApp.equals("-1"))
|
||||||
{
|
{
|
||||||
if (!app.equalsIgnoreCase(myApp))
|
if (!app.equalsIgnoreCase(myApp))
|
||||||
return false;
|
return false;
|
||||||
@ -369,23 +314,6 @@ public class Trigger
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean checkScreenState()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
int desiredState = Integer.parseInt(getTriggerParameter2());
|
|
||||||
int currentState = ScreenStateReceiver.getScreenState();
|
|
||||||
|
|
||||||
return desiredState == currentState;
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("w", "Trigger", "Error checking profile trigger.", 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean checkDeviceOrientation()
|
boolean checkDeviceOrientation()
|
||||||
{
|
{
|
||||||
String deviceOrientationPieces[] = getTriggerParameter2().split(Trigger.triggerParameter2Split);
|
String deviceOrientationPieces[] = getTriggerParameter2().split(Trigger.triggerParameter2Split);
|
||||||
@ -610,19 +538,7 @@ public class Trigger
|
|||||||
|
|
||||||
boolean checkProcess()
|
boolean checkProcess()
|
||||||
{
|
{
|
||||||
boolean running = false;
|
boolean running = ProcessListener.getRunningApps().contains(this.getProcessName());
|
||||||
|
|
||||||
if(getTriggerParameter2().contains(triggerParameter2Split))
|
|
||||||
{
|
|
||||||
String parts[] = triggerParameter2.split(triggerParameter2Split);
|
|
||||||
for(String appName : ProcessListener.getRunningApps())
|
|
||||||
{
|
|
||||||
if(appName.startsWith(parts[0]))
|
|
||||||
running = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
running = ProcessListener.getRunningApps().contains(this.getProcessName());
|
|
||||||
|
|
||||||
if(running)
|
if(running)
|
||||||
Miscellaneous.logEvent("i", "ProcessMonitoring", "App " + this.getProcessName() + " is currently running.", 4);
|
Miscellaneous.logEvent("i", "ProcessMonitoring", "App " + this.getProcessName() + " is currently running.", 4);
|
||||||
@ -1028,6 +944,8 @@ public class Trigger
|
|||||||
calSet.set(Calendar.SECOND, 0);
|
calSet.set(Calendar.SECOND, 0);
|
||||||
calSet.set(Calendar.MILLISECOND, 0);
|
calSet.set(Calendar.MILLISECOND, 0);
|
||||||
|
|
||||||
|
// if(this.applies(null))
|
||||||
|
// {
|
||||||
// If the starting time is a day ahead remove 1 day.
|
// If the starting time is a day ahead remove 1 day.
|
||||||
if(calSet.getTimeInMillis() > now.getTimeInMillis())
|
if(calSet.getTimeInMillis() > now.getTimeInMillis())
|
||||||
calSet.add(Calendar.DAY_OF_MONTH, -1);
|
calSet.add(Calendar.DAY_OF_MONTH, -1);
|
||||||
@ -1038,7 +956,15 @@ public class Trigger
|
|||||||
Calendar calSchedule = Calendar.getInstance();
|
Calendar calSchedule = Calendar.getInstance();
|
||||||
calSchedule.setTimeInMillis(nextScheduleTimestamp * 1000);
|
calSchedule.setTimeInMillis(nextScheduleTimestamp * 1000);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Das war mal aktiviert. Allerdings: Die ganze Funktion liefert zurück, wenn die Regel NOCH nicht
|
||||||
|
* zutrifft, aber wir z.B. gleich den zeitlichen Bereich betreten.
|
||||||
|
*/
|
||||||
|
// if(trigger.checkDateTime(calSchedule.getTime(), false))
|
||||||
|
// {
|
||||||
return calSchedule;
|
return calSchedule;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Miscellaneous.logEvent("i", "Trigger", "Trigger " + trigger.toString() + " is not executed repeatedly.", 5);
|
Miscellaneous.logEvent("i", "Trigger", "Trigger " + trigger.toString() + " is not executed repeatedly.", 5);
|
||||||
@ -1071,14 +997,73 @@ public class Trigger
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean triggerParameter; //if true->started event, if false->stopped
|
/*
|
||||||
String triggerParameter2;
|
* Can be several things:
|
||||||
|
* -PointOfInterest
|
||||||
|
* -TimeFrame
|
||||||
|
* -Event (like charging, cable plugged, etc.)
|
||||||
|
*/
|
||||||
|
|
||||||
|
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, profileActive, phoneCall; //phoneCall always needs to be at the very end because of Google's shitty so called privacy
|
||||||
|
|
||||||
|
public String getFullName(Context context)
|
||||||
|
{
|
||||||
|
switch(this)
|
||||||
|
{
|
||||||
|
case pointOfInterest:
|
||||||
|
return context.getResources().getString(R.string.triggerPointOfInterest);
|
||||||
|
case timeFrame:
|
||||||
|
return context.getResources().getString(R.string.triggerTimeFrame);
|
||||||
|
case charging:
|
||||||
|
return context.getResources().getString(R.string.triggerCharging);
|
||||||
|
case batteryLevel:
|
||||||
|
return context.getResources().getString(R.string.batteryLevel);
|
||||||
|
case usb_host_connection:
|
||||||
|
return context.getResources().getString(R.string.triggerUsb_host_connection);
|
||||||
|
case speed:
|
||||||
|
return context.getResources().getString(R.string.triggerSpeed);
|
||||||
|
case noiseLevel:
|
||||||
|
return context.getResources().getString(R.string.triggerNoiseLevel);
|
||||||
|
case wifiConnection:
|
||||||
|
return context.getResources().getString(R.string.wifiConnection);
|
||||||
|
case process_started_stopped:
|
||||||
|
return context.getResources().getString(R.string.anotherAppIsRunning);
|
||||||
|
case airplaneMode:
|
||||||
|
return context.getResources().getString(R.string.airplaneMode);
|
||||||
|
case roaming:
|
||||||
|
return context.getResources().getString(R.string.roaming);
|
||||||
|
case phoneCall:
|
||||||
|
return context.getResources().getString(R.string.phoneCall);
|
||||||
|
case nfcTag:
|
||||||
|
return context.getResources().getString(R.string.nfcTag);
|
||||||
|
case activityDetection:
|
||||||
|
return context.getResources().getString(R.string.activityDetection);
|
||||||
|
case bluetoothConnection:
|
||||||
|
return context.getResources().getString(R.string.bluetoothConnection);
|
||||||
|
case headsetPlugged:
|
||||||
|
return context.getResources().getString(R.string.triggerHeadsetPlugged);
|
||||||
|
case notification:
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
private boolean triggerParameter; //if true->started event, if false->stopped
|
||||||
|
private String triggerParameter2;
|
||||||
|
|
||||||
public static final String triggerParameter2Split = "tp2split";
|
public static final String triggerParameter2Split = "tp2split";
|
||||||
|
|
||||||
Trigger_Enum triggerType = null;
|
private Trigger_Enum triggerType = null;
|
||||||
PointOfInterest pointOfInterest = null;
|
private PointOfInterest pointOfInterest = null;
|
||||||
TimeFrame timeFrame;
|
private TimeFrame timeFrame;
|
||||||
|
|
||||||
public static String triggerPhoneCallStateRinging = "ringing";
|
public static String triggerPhoneCallStateRinging = "ringing";
|
||||||
public static String triggerPhoneCallStateStarted = "started";
|
public static String triggerPhoneCallStateStarted = "started";
|
||||||
@ -1088,17 +1073,17 @@ public class Trigger
|
|||||||
public static String triggerPhoneCallDirectionAny = "any";
|
public static String triggerPhoneCallDirectionAny = "any";
|
||||||
public static String triggerPhoneCallNumberAny = "any";
|
public static String triggerPhoneCallNumberAny = "any";
|
||||||
|
|
||||||
double speed; //km/h
|
private double speed; //km/h
|
||||||
long noiseLevelDb;
|
private long noiseLevelDb;
|
||||||
String processName = null;
|
private String processName = null;
|
||||||
int batteryLevel;
|
private int batteryLevel;
|
||||||
int phoneDirection = 0; // 0=any, 1=incoming, 2=outgoing
|
private int phoneDirection = 0; // 0=any, 1=incoming, 2=outgoing
|
||||||
String phoneNumber = null;
|
private String phoneNumber = null;
|
||||||
String nfcTagId = null;
|
private String nfcTagId = null;
|
||||||
String bluetoothEvent = null;
|
private String bluetoothEvent = null;
|
||||||
String bluetoothDeviceAddress = null;
|
private String bluetoothDeviceAddress = null;
|
||||||
int activityDetectionType = -1;
|
private int activityDetectionType = -1;
|
||||||
int headphoneType = -1;
|
private int headphoneType = -1;
|
||||||
|
|
||||||
public int getHeadphoneType()
|
public int getHeadphoneType()
|
||||||
{
|
{
|
||||||
@ -1481,7 +1466,7 @@ public class Trigger
|
|||||||
StringBuilder triggerBuilder = new StringBuilder();
|
StringBuilder triggerBuilder = new StringBuilder();
|
||||||
|
|
||||||
String appString;
|
String appString;
|
||||||
if (app.equalsIgnoreCase(anyAppString))
|
if (app.equalsIgnoreCase("-1"))
|
||||||
appString = Miscellaneous.getAnyContext().getResources().getString(R.string.anyApp);
|
appString = Miscellaneous.getAnyContext().getResources().getString(R.string.anyApp);
|
||||||
else
|
else
|
||||||
appString = "app " + app;
|
appString = "app " + app;
|
||||||
@ -1501,7 +1486,7 @@ public class Trigger
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setTriggerParameter2(anyAppString + triggerParameter2Split + directionEquals + triggerParameter2Split + triggerParameter2Split + directionEquals + triggerParameter2Split + triggerParameter2Split);
|
setTriggerParameter2("-1" + triggerParameter2Split + directionEquals + triggerParameter2Split + triggerParameter2Split + directionEquals + triggerParameter2Split + triggerParameter2Split);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case deviceOrientation:
|
case deviceOrientation:
|
||||||
@ -1513,26 +1498,6 @@ public class Trigger
|
|||||||
else
|
else
|
||||||
returnString.append(String.format(Miscellaneous.getAnyContext().getString(R.string.profileNotActive), getTriggerParameter2().split(Trigger.triggerParameter2Split)[0]));
|
returnString.append(String.format(Miscellaneous.getAnyContext().getString(R.string.profileNotActive), getTriggerParameter2().split(Trigger.triggerParameter2Split)[0]));
|
||||||
break;
|
break;
|
||||||
case screenState:
|
|
||||||
String state;
|
|
||||||
switch(triggerParameter2)
|
|
||||||
{
|
|
||||||
case "0":
|
|
||||||
state = Miscellaneous.getAnyContext().getString(R.string.off);
|
|
||||||
break;
|
|
||||||
case "1":
|
|
||||||
state = Miscellaneous.getAnyContext().getString(R.string.on);
|
|
||||||
break;
|
|
||||||
case "2":
|
|
||||||
state = Miscellaneous.getAnyContext().getString(R.string.unlocked);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
state = Miscellaneous.getAnyContext().getString(R.string.unknown);
|
|
||||||
}
|
|
||||||
|
|
||||||
returnString.append(String.format(Miscellaneous.getAnyContext().getString(R.string.screenIs), state));
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
returnString.append("error");
|
returnString.append("error");
|
||||||
break;
|
break;
|
||||||
@ -1586,6 +1551,10 @@ public class Trigger
|
|||||||
{
|
{
|
||||||
ArrayList<String> triggerTypesList = new ArrayList<String>();
|
ArrayList<String> triggerTypesList = new ArrayList<String>();
|
||||||
|
|
||||||
|
/*for(int i=0; i<Trigger_Enum.values().length; i++)
|
||||||
|
{
|
||||||
|
triggerTypesList.add(Trigger_Enum.values()[i].toString());
|
||||||
|
}*/
|
||||||
for(Trigger_Enum triggerType : Trigger_Enum.values())
|
for(Trigger_Enum triggerType : Trigger_Enum.values())
|
||||||
triggerTypesList.add(triggerType.name());
|
triggerTypesList.add(triggerType.name());
|
||||||
|
|
||||||
|
@ -263,9 +263,11 @@ public class XmlFileInterface
|
|||||||
else if(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerType() == Trigger_Enum.wifiConnection)
|
else if(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerType() == Trigger_Enum.wifiConnection)
|
||||||
serializer.text(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerParameter2());
|
serializer.text(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerParameter2());
|
||||||
else if(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerType() == Trigger_Enum.process_started_stopped)
|
else if(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerType() == Trigger_Enum.process_started_stopped)
|
||||||
serializer.text(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerParameter2());
|
serializer.text(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getProcessName());
|
||||||
else if(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerType() == Trigger_Enum.batteryLevel)
|
else if(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerType() == Trigger_Enum.batteryLevel)
|
||||||
serializer.text(String.valueOf(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getBatteryLevel()));
|
serializer.text(String.valueOf(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getBatteryLevel()));
|
||||||
|
// else if(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerType() == Trigger_Enum.phoneCall)
|
||||||
|
// serializer.text(String.valueOf(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getPhoneDirection()) + "," + String.valueOf(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getPhoneNumber()));
|
||||||
else if(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerType() == Trigger_Enum.nfcTag)
|
else if(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerType() == Trigger_Enum.nfcTag)
|
||||||
serializer.text(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getNfcTagId());
|
serializer.text(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getNfcTagId());
|
||||||
else if(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerType() == Trigger_Enum.activityDetection)
|
else if(Rule.getRuleCollection().get(i).getTriggerSet().get(j).getTriggerType() == Trigger_Enum.activityDetection)
|
||||||
@ -941,16 +943,8 @@ public class XmlFileInterface
|
|||||||
}
|
}
|
||||||
else if(newTrigger.getTriggerType() == Trigger_Enum.process_started_stopped)
|
else if(newTrigger.getTriggerType() == Trigger_Enum.process_started_stopped)
|
||||||
{
|
{
|
||||||
newTrigger.setTriggerParameter2(triggerParameter2);
|
|
||||||
|
|
||||||
if(triggerParameter2.contains(triggerParameter2Split))
|
|
||||||
{
|
|
||||||
String[] parts = triggerParameter2.split(triggerParameter2Split);
|
|
||||||
newTrigger.setProcessName(parts[1]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
newTrigger.setProcessName(triggerParameter2);
|
newTrigger.setProcessName(triggerParameter2);
|
||||||
|
newTrigger.setTriggerParameter2(triggerParameter2);
|
||||||
}
|
}
|
||||||
else if(newTrigger.getTriggerType() == Trigger_Enum.phoneCall)
|
else if(newTrigger.getTriggerType() == Trigger_Enum.phoneCall)
|
||||||
{
|
{
|
||||||
@ -1160,17 +1154,12 @@ public class XmlFileInterface
|
|||||||
newAction.setAction(Action_Enum.disableScreenRotation);
|
newAction.setAction(Action_Enum.disableScreenRotation);
|
||||||
else if(actionNameString.equals("disableScreenRotation"))
|
else if(actionNameString.equals("disableScreenRotation"))
|
||||||
newAction.setAction(Action_Enum.disableScreenRotation);
|
newAction.setAction(Action_Enum.disableScreenRotation);
|
||||||
else if(actionNameString.equals("playMusic"))
|
|
||||||
{
|
|
||||||
newAction.setAction(Action_Enum.controlMediaPlayback);
|
|
||||||
newAction.setParameter2("1");
|
|
||||||
}
|
|
||||||
else if(actionNameString.equals("wakeupDevice"))
|
else if(actionNameString.equals("wakeupDevice"))
|
||||||
{
|
{
|
||||||
newAction.setAction(Action_Enum.turnScreenOnOrOff);
|
newAction.setAction(Action_Enum.turnScreenOnOrOff);
|
||||||
newAction.setParameter1(true);
|
newAction.setParameter1(true);
|
||||||
}
|
}
|
||||||
// *** :deprecated
|
// *** deprecated
|
||||||
|
|
||||||
else
|
else
|
||||||
newAction.setAction(Action_Enum.valueOf(actionNameString));
|
newAction.setAction(Action_Enum.valueOf(actionNameString));
|
||||||
@ -1284,14 +1273,14 @@ public class XmlFileInterface
|
|||||||
{
|
{
|
||||||
String newTag;
|
String newTag;
|
||||||
|
|
||||||
if(tag.contains(Action.intentPairSeparator)) // already has new format
|
if(tag.contains(Action.intentPairSeperator)) // already has new format
|
||||||
newTag = tag;
|
newTag = tag;
|
||||||
else
|
else
|
||||||
newTag = tag.replace("/", Action.intentPairSeparator);
|
newTag = tag.replace("/", Action.intentPairSeperator);
|
||||||
|
|
||||||
String[] newTagPieces = newTag.split(";");
|
String[] newTagPieces = newTag.split(";");
|
||||||
|
|
||||||
if(newTagPieces.length < 2 || (!newTagPieces[0].contains(Actions.dummyPackageString) && newTagPieces[1].contains(Action.intentPairSeparator)))
|
if(newTagPieces.length < 2 || (!newTagPieces[0].contains(Actions.dummyPackageString) && newTagPieces[1].contains(Action.intentPairSeperator)))
|
||||||
{
|
{
|
||||||
newTag = Actions.dummyPackageString + ";" + newTag;
|
newTag = Actions.dummyPackageString + ";" + newTag;
|
||||||
newTagPieces = newTag.split(";");
|
newTagPieces = newTag.split(";");
|
||||||
@ -1301,7 +1290,7 @@ public class XmlFileInterface
|
|||||||
newTag += ";" + ActivityManageActionStartActivity.startByActivityString;
|
newTag += ";" + ActivityManageActionStartActivity.startByActivityString;
|
||||||
else if(newTagPieces.length >= 3)
|
else if(newTagPieces.length >= 3)
|
||||||
{
|
{
|
||||||
if(newTagPieces[2].contains(Action.intentPairSeparator))
|
if(newTagPieces[2].contains(Action.intentPairSeperator))
|
||||||
newTag = newTagPieces[0] + ";" + newTagPieces[1] + ";" + ActivityManageActionStartActivity.startByActivityString + ";" + newTagPieces[2];
|
newTag = newTagPieces[0] + ";" + newTagPieces[1] + ";" + ActivityManageActionStartActivity.startByActivityString + ";" + newTagPieces[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,15 +1,9 @@
|
|||||||
package com.jens.automation2.receivers;
|
package com.jens.automation2.receivers;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Notification;
|
|
||||||
import android.bluetooth.BluetoothDevice;
|
|
||||||
import android.content.IntentFilter;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Parcelable;
|
|
||||||
import android.service.notification.NotificationListenerService;
|
import android.service.notification.NotificationListenerService;
|
||||||
import android.service.notification.StatusBarNotification;
|
import android.service.notification.StatusBarNotification;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
@ -25,10 +19,9 @@ import java.util.Calendar;
|
|||||||
|
|
||||||
@SuppressLint("OverrideAbstract")
|
@SuppressLint("OverrideAbstract")
|
||||||
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
|
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
|
||||||
public class NotificationListener extends NotificationListenerService// implements AutomationListenerInterface
|
public class NotificationListener extends NotificationListenerService
|
||||||
{
|
{
|
||||||
static Calendar lastResponseToNotification = null;
|
static Calendar lastResponseToNotification = null;
|
||||||
static boolean listenerRunning = false;
|
|
||||||
static NotificationListener instance;
|
static NotificationListener instance;
|
||||||
static SimpleNotification lastNotification = null;
|
static SimpleNotification lastNotification = null;
|
||||||
|
|
||||||
@ -44,8 +37,6 @@ public class NotificationListener extends NotificationListenerService// implemen
|
|||||||
// a bitmap to be used instead of the small icon when showing the notification payload
|
// a bitmap to be used instead of the small icon when showing the notification payload
|
||||||
public static final String EXTRA_LARGE_ICON = "android.largeIcon";
|
public static final String EXTRA_LARGE_ICON = "android.largeIcon";
|
||||||
|
|
||||||
protected static IntentFilter notificationReceiverIntentFilter = null;
|
|
||||||
|
|
||||||
public static SimpleNotification getLastNotification()
|
public static SimpleNotification getLastNotification()
|
||||||
{
|
{
|
||||||
return lastNotification;
|
return lastNotification;
|
||||||
@ -87,7 +78,16 @@ public class NotificationListener extends NotificationListenerService// implemen
|
|||||||
{
|
{
|
||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT)
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT)
|
||||||
{
|
{
|
||||||
lastNotification = convertNotificationToSimpleNotification(created, sbn);
|
String app = sbn.getPackageName();
|
||||||
|
String title = sbn.getNotification().extras.getString(EXTRA_TITLE);
|
||||||
|
String text = sbn.getNotification().extras.getString(EXTRA_TEXT);
|
||||||
|
|
||||||
|
lastNotification = new SimpleNotification();
|
||||||
|
lastNotification.publishTime = Miscellaneous.calendarFromLong(sbn.getPostTime());
|
||||||
|
lastNotification.created = created;
|
||||||
|
lastNotification.app = app;
|
||||||
|
lastNotification.title = title;
|
||||||
|
lastNotification.text = text;
|
||||||
|
|
||||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.notification);
|
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.notification);
|
||||||
for (int i = 0; i < ruleCandidates.size(); i++)
|
for (int i = 0; i < ruleCandidates.size(); i++)
|
||||||
@ -100,95 +100,6 @@ public class NotificationListener extends NotificationListenerService// implemen
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
|
||||||
public static SimpleNotification convertNotificationToSimpleNotification(boolean created, StatusBarNotification input)
|
|
||||||
{
|
|
||||||
String app = input.getPackageName();
|
|
||||||
String title = "";
|
|
||||||
String text = "";
|
|
||||||
|
|
||||||
Bundle extras = input.getNotification().extras;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (extras.containsKey(EXTRA_TITLE))
|
|
||||||
title = extras.getString(EXTRA_TITLE).toString();
|
|
||||||
}
|
|
||||||
catch (NullPointerException e)
|
|
||||||
{
|
|
||||||
// https://www.b4x.com/android/forum/threads/solved-reading-statusbarnotifications-extras.64416/
|
|
||||||
// Some notifications have an empty title, like KDE connect
|
|
||||||
if(extras.containsKey(EXTRA_TITLE) && extras.get(EXTRA_TITLE) != null)
|
|
||||||
title = extras.get(EXTRA_TITLE).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (extras.containsKey(EXTRA_TEXT))
|
|
||||||
text = extras.getString(EXTRA_TEXT).toString();
|
|
||||||
}
|
|
||||||
catch (NullPointerException e)
|
|
||||||
{
|
|
||||||
// in stacked notifications the "surrounding" element has no text, only a title
|
|
||||||
if (extras.containsKey(EXTRA_TEXT) && extras.get(EXTRA_TEXT) != null)
|
|
||||||
text = extras.get(EXTRA_TEXT).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
SimpleNotification returnNotification = new SimpleNotification();
|
|
||||||
returnNotification.publishTime = Miscellaneous.calendarFromLong(input.getPostTime());
|
|
||||||
returnNotification.created = created;
|
|
||||||
returnNotification.app = app;
|
|
||||||
returnNotification.title = title;
|
|
||||||
returnNotification.text = text;
|
|
||||||
|
|
||||||
return returnNotification;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*@Override
|
|
||||||
public void startListener(AutomationService automationService)
|
|
||||||
{
|
|
||||||
if(instance == null)
|
|
||||||
instance = new NotificationListener();
|
|
||||||
|
|
||||||
if(notificationReceiverIntentFilter == null)
|
|
||||||
{
|
|
||||||
notificationReceiverIntentFilter = new IntentFilter();
|
|
||||||
notificationReceiverIntentFilter.addAction("android.service.notification.NotificationListenerService");
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if(!listenerRunning)
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("i", "NotificationListener", "Starting NotificationListener", 4);
|
|
||||||
listenerRunning = true;
|
|
||||||
AutomationService.getInstance().registerReceiver(instance, notificationReceiverIntentFilter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(Exception ex)
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("e", "BluetoothReceiver", "Error starting BluetoothReceiver: " + Log.getStackTraceString(ex), 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void stopListener(AutomationService automationService)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isListenerRunning()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Trigger.Trigger_Enum[] getMonitoredTrigger()
|
|
||||||
{
|
|
||||||
return new Trigger.Trigger_Enum[0];
|
|
||||||
}*/
|
|
||||||
|
|
||||||
public static class SimpleNotification
|
public static class SimpleNotification
|
||||||
{
|
{
|
||||||
boolean created;
|
boolean created;
|
||||||
@ -244,18 +155,6 @@ public class NotificationListener extends NotificationListenerService// implemen
|
|||||||
{
|
{
|
||||||
this.text = text;
|
this.text = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString()
|
|
||||||
{
|
|
||||||
return "SimpleNotification{" +
|
|
||||||
"created=" + created +
|
|
||||||
", publishTime=" + publishTime +
|
|
||||||
", app='" + app + '\'' +
|
|
||||||
", title='" + title + '\'' +
|
|
||||||
", text='" + text + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -269,13 +168,4 @@ public class NotificationListener extends NotificationListenerService// implemen
|
|||||||
{
|
{
|
||||||
super.onListenerDisconnected();
|
super.onListenerDisconnected();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dismissNotification(StatusBarNotification sbn)
|
|
||||||
{
|
|
||||||
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
|
|
||||||
cancelNotification(sbn.getPackageName(), sbn.getTag(), sbn.getId());
|
|
||||||
else
|
|
||||||
cancelNotification(sbn.getKey());
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
package com.jens.automation2.receivers;
|
package com.jens.automation2.receivers;
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
import android.app.ActivityManager.RunningAppProcessInfo;
|
import android.app.ActivityManager.RunningAppProcessInfo;
|
||||||
import android.app.ActivityManager.RunningServiceInfo;
|
import android.app.ActivityManager.RunningServiceInfo;
|
||||||
@ -9,7 +8,6 @@ import android.content.Context;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
|
||||||
import com.jens.automation2.Action;
|
|
||||||
import com.jens.automation2.ActivityPermissions;
|
import com.jens.automation2.ActivityPermissions;
|
||||||
import com.jens.automation2.AutomationService;
|
import com.jens.automation2.AutomationService;
|
||||||
import com.jens.automation2.Miscellaneous;
|
import com.jens.automation2.Miscellaneous;
|
||||||
@ -210,12 +208,12 @@ public class ProcessListener implements AutomationListenerInterface
|
|||||||
workHandler.sendMessage(answer);
|
workHandler.sendMessage(answer);
|
||||||
|
|
||||||
//activate rule(s)
|
//activate rule(s)
|
||||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.process_started_stopped);
|
/*ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByProcess();
|
||||||
for(int i=0; i<ruleCandidates.size(); i++)
|
for(int i=0; i<ruleCandidates.size(); i++)
|
||||||
{
|
{
|
||||||
if(ruleCandidates.get(i).getsGreenLight(automationService))
|
if(ruleCandidates.get(i).applies(automationService))
|
||||||
ruleCandidates.get(i).activate(automationService, false);
|
ruleCandidates.get(i).activate(automationService);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
isMonitoringActive = false;
|
isMonitoringActive = false;
|
||||||
|
|
||||||
@ -233,7 +231,6 @@ public class ProcessListener implements AutomationListenerInterface
|
|||||||
|
|
||||||
final ActivityManager activityManager = (ActivityManager)automationService.getSystemService(Context.ACTIVITY_SERVICE);
|
final ActivityManager activityManager = (ActivityManager)automationService.getSystemService(Context.ACTIVITY_SERVICE);
|
||||||
final List<RunningTaskInfo> services = activityManager.getRunningTasks(Integer.MAX_VALUE);
|
final List<RunningTaskInfo> services = activityManager.getRunningTasks(Integer.MAX_VALUE);
|
||||||
final List<RunningAppProcessInfo> apps = activityManager.getRunningAppProcesses();
|
|
||||||
|
|
||||||
ArrayList<String> runningAppsListReference;
|
ArrayList<String> runningAppsListReference;
|
||||||
if(lastWritten == 1)
|
if(lastWritten == 1)
|
||||||
@ -249,23 +246,32 @@ public class ProcessListener implements AutomationListenerInterface
|
|||||||
|
|
||||||
runningAppsListReference.clear();
|
runningAppsListReference.clear();
|
||||||
|
|
||||||
/*for (int i = 0; i < services.size(); i++)
|
for (int i = 0; i < services.size(); i++)
|
||||||
{
|
{
|
||||||
if(!runningAppsListReference.contains(services.get(i).baseActivity.getClassName()))
|
if(!runningAppsListReference.contains(services.get(i).baseActivity.getClassName()))
|
||||||
{
|
{
|
||||||
// you may broadcast a new application launch here.
|
// you may broadcast a new application launch here.
|
||||||
runningAppsListReference.add(services.get(i).baseActivity.getClassName());
|
runningAppsListReference.add(services.get(i).baseActivity.getClassName());
|
||||||
}
|
}
|
||||||
}*/
|
|
||||||
for (int i = 0; i < apps.size(); i++)
|
|
||||||
{
|
|
||||||
if(!runningAppsListReference.contains(apps.get(i).processName))
|
|
||||||
{
|
|
||||||
// you may broadcast a new application launch here.
|
|
||||||
runningAppsListReference.add(apps.get(i).processName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// for(String runningApp : runningAppsListReference)
|
||||||
|
// {
|
||||||
|
// Miscellaneous.logEvent("i", "Running app", runningApp, 5);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// List<RunningAppProcessInfo> procInfos = activityManager.getRunningAppProcesses();
|
||||||
|
// for(int i = 0; i < procInfos.size(); i++)
|
||||||
|
// {
|
||||||
|
// ArrayList<String> runningPkgs = new ArrayList<String>(Arrays.asList(procInfos.get(i).pkgList));
|
||||||
|
//
|
||||||
|
// Collection diff = subtractSets(runningPkgs, stalkList);
|
||||||
|
//
|
||||||
|
// if(diff != null)
|
||||||
|
// {
|
||||||
|
// stalkList.removeAll(diff);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
// Set marker to the one to be written next.
|
// Set marker to the one to be written next.
|
||||||
if(lastWritten == 1)
|
if(lastWritten == 1)
|
||||||
@ -345,7 +351,7 @@ public class ProcessListener implements AutomationListenerInterface
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkIfThisIsActive(RunningAppProcessInfo target)
|
private boolean checkifThisIsActive(RunningAppProcessInfo target)
|
||||||
{
|
{
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
RunningTaskInfo info;
|
RunningTaskInfo info;
|
||||||
@ -391,6 +397,7 @@ public class ProcessListener implements AutomationListenerInterface
|
|||||||
|
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.arg1 = 1;
|
message.arg1 = 1;
|
||||||
|
// schedulingHandler.sendMessageDelayed(message, Settings.timeBetweenNoiseLevelMeasurements * 1000);
|
||||||
schedulingHandler.sendMessageDelayed(message, 10000);
|
schedulingHandler.sendMessageDelayed(message, 10000);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -437,7 +444,7 @@ public class ProcessListener implements AutomationListenerInterface
|
|||||||
|
|
||||||
public static boolean haveAllPermission()
|
public static boolean haveAllPermission()
|
||||||
{
|
{
|
||||||
return ActivityPermissions.havePermission(Manifest.permission.GET_TASKS, Miscellaneous.getAnyContext());
|
return ActivityPermissions.havePermission("android.permission.GET_TASKS", Miscellaneous.getAnyContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -451,4 +458,6 @@ public class ProcessListener implements AutomationListenerInterface
|
|||||||
{
|
{
|
||||||
return new Trigger_Enum[] { Trigger_Enum.process_started_stopped };
|
return new Trigger_Enum[] { Trigger_Enum.process_started_stopped };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,162 +0,0 @@
|
|||||||
package com.jens.automation2.receivers;
|
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.content.BroadcastReceiver;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.IntentFilter;
|
|
||||||
import android.os.BatteryManager;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import com.jens.automation2.ActivityPermissions;
|
|
||||||
import com.jens.automation2.AutomationService;
|
|
||||||
import com.jens.automation2.Miscellaneous;
|
|
||||||
import com.jens.automation2.Rule;
|
|
||||||
import com.jens.automation2.Trigger.Trigger_Enum;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public class ScreenStateReceiver extends BroadcastReceiver implements AutomationListenerInterface
|
|
||||||
{
|
|
||||||
static int screenState = -1; // initialize with a better value than this
|
|
||||||
public static AutomationService automationServiceRef = null;
|
|
||||||
|
|
||||||
private static boolean screenStateReceiverActive = false;
|
|
||||||
private static IntentFilter screenStateIntentFilter = null;
|
|
||||||
private static Intent screenStatusIntent = null;
|
|
||||||
private static BroadcastReceiver screenStateReceiverInstance = null;
|
|
||||||
|
|
||||||
public static BroadcastReceiver getScreenStateReceiverInstance()
|
|
||||||
{
|
|
||||||
if(screenStateReceiverInstance == null)
|
|
||||||
screenStateReceiverInstance = new ScreenStateReceiver();
|
|
||||||
|
|
||||||
return screenStateReceiverInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void startScreenStateReceiver(final AutomationService automationServiceRef)
|
|
||||||
{
|
|
||||||
if(!screenStateReceiverActive)
|
|
||||||
{
|
|
||||||
ScreenStateReceiver.automationServiceRef = automationServiceRef;
|
|
||||||
|
|
||||||
if(screenStateReceiverInstance == null)
|
|
||||||
screenStateReceiverInstance = new ScreenStateReceiver();
|
|
||||||
|
|
||||||
if(screenStateIntentFilter == null)
|
|
||||||
{
|
|
||||||
screenStateIntentFilter = new IntentFilter();
|
|
||||||
screenStateIntentFilter.addAction(Intent.ACTION_SCREEN_OFF);
|
|
||||||
screenStateIntentFilter.addAction(Intent.ACTION_SCREEN_ON);
|
|
||||||
screenStateIntentFilter.addAction(Intent.ACTION_USER_PRESENT);
|
|
||||||
// Intent.ACTION_USER_UNLOCKED
|
|
||||||
}
|
|
||||||
|
|
||||||
screenStatusIntent = automationServiceRef.registerReceiver(screenStateReceiverInstance, screenStateIntentFilter);
|
|
||||||
|
|
||||||
screenStateReceiverActive = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static void stopScreenStateReceiver()
|
|
||||||
{
|
|
||||||
if(screenStateReceiverActive)
|
|
||||||
{
|
|
||||||
if(screenStateReceiverInstance != null)
|
|
||||||
{
|
|
||||||
automationServiceRef.unregisterReceiver(screenStateReceiverInstance);
|
|
||||||
screenStateReceiverInstance = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
screenStateReceiverActive = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isScreenStateReceiverActive()
|
|
||||||
{
|
|
||||||
return screenStateReceiverActive;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getScreenState()
|
|
||||||
{
|
|
||||||
return screenState;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static int currentChargingState = 0; //0=unknown, 1=no, 2=yes
|
|
||||||
|
|
||||||
public static int getCurrentChargingState()
|
|
||||||
{
|
|
||||||
return currentChargingState;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onReceive(Context context, Intent intent)
|
|
||||||
{
|
|
||||||
if (intent == null)
|
|
||||||
return;
|
|
||||||
if (context == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Miscellaneous.logEvent("e", "ScreenStateReceiver", "Received: " + intent.getAction(), 3);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if(intent.getAction().equals(Intent.ACTION_SCREEN_OFF))
|
|
||||||
{
|
|
||||||
ScreenStateReceiver.screenState = 0;
|
|
||||||
}
|
|
||||||
else if(intent.getAction().equals(Intent.ACTION_SCREEN_ON))
|
|
||||||
{
|
|
||||||
ScreenStateReceiver.screenState = 1;
|
|
||||||
}
|
|
||||||
else if(intent.getAction().equals(Intent.ACTION_USER_PRESENT))
|
|
||||||
{
|
|
||||||
ScreenStateReceiver.screenState = 2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("e", "ScreenStateReceiver", "Unknown state received: " + intent.getAction(), 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(Exception e)
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("e", "ScreenStateReceiver", "Error receiving screen state: " + e.getMessage(), 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.screenState);
|
|
||||||
for(int i=0; i<ruleCandidates.size(); i++)
|
|
||||||
{
|
|
||||||
if(ruleCandidates.get(i).getsGreenLight(context))
|
|
||||||
ruleCandidates.get(i).activate(automationServiceRef, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void startListener(AutomationService automationService)
|
|
||||||
{
|
|
||||||
ScreenStateReceiver.startScreenStateReceiver(automationService);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void stopListener(AutomationService automationService)
|
|
||||||
{
|
|
||||||
ScreenStateReceiver.stopScreenStateReceiver();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean haveAllPermission()
|
|
||||||
{
|
|
||||||
return ActivityPermissions.havePermission(Manifest.permission.READ_PHONE_STATE, Miscellaneous.getAnyContext()) &&
|
|
||||||
ActivityPermissions.havePermission(Manifest.permission.BATTERY_STATS, Miscellaneous.getAnyContext());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isListenerRunning()
|
|
||||||
{
|
|
||||||
return ScreenStateReceiver.isScreenStateReceiverActive();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Trigger_Enum[] getMonitoredTrigger()
|
|
||||||
{
|
|
||||||
return new Trigger_Enum[] { Trigger_Enum.screenState };
|
|
||||||
}
|
|
||||||
}
|
|
@ -17,7 +17,7 @@ public class StartupIntentReceiver extends BroadcastReceiver
|
|||||||
{
|
{
|
||||||
Settings.readFromPersistentStorage(context);
|
Settings.readFromPersistentStorage(context);
|
||||||
|
|
||||||
// Miscellaneous.logEvent("i", "Boot event", "Received event: " + intent.getAction(), 5);
|
Miscellaneous.logEvent("i", "Boot event", "Received event: " + intent.getAction(), 5);
|
||||||
|
|
||||||
if(Settings.startServiceAtSystemBoot)
|
if(Settings.startServiceAtSystemBoot)
|
||||||
{
|
{
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24"
|
|
||||||
android:tint="?attr/colorControlNormal">
|
|
||||||
<path
|
|
||||||
android:fillColor="@android:color/white"
|
|
||||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
|
|
||||||
</vector>
|
|
@ -16,14 +16,14 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
|
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
|
||||||
android:text="@string/controlCenter"
|
android:text="@string/settings"
|
||||||
android:layout_marginBottom="@dimen/default_margin"/>
|
android:layout_marginBottom="@dimen/default_margin"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/bMoreSettings"
|
android:id="@+id/bMoreSettings"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/settings" />
|
android:text="@string/moreSettings" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -83,25 +83,11 @@
|
|||||||
android:layout_margin="@dimen/default_margin"
|
android:layout_margin="@dimen/default_margin"
|
||||||
android:background="#aa000000" />
|
android:background="#aa000000" />
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/chkShareConfigAndLog"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:text="@string/shareConfigAndLogFilesWithDev" />
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/bSendEmailToDev"
|
android:id="@+id/bShareConfigAndLog"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/sendEmailToDev" />
|
android:text="@string/shareConfigAndLogFilesWithDev" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_span="2"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_margin="@dimen/default_margin"
|
|
||||||
android:background="#aa000000" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvFileStoreLocation"
|
android:id="@+id/tvFileStoreLocation"
|
@ -1,155 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="@dimen/default_margin" >
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical" >
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/closeNotifications"
|
|
||||||
android:textSize="25dp"
|
|
||||||
android:layout_marginBottom="@dimen/default_margin" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="@dimen/default_margin"
|
|
||||||
android:text="@string/notificationCloseActionExplanation" />
|
|
||||||
|
|
||||||
<TableLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:shrinkColumns="1"
|
|
||||||
android:stretchColumns="1">
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/application" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_marginHorizontal="@dimen/default_margin"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/etActivityOrActionPath"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/anyApp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/bSelectApp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/selectApplication" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:layout_marginVertical="@dimen/default_margin"
|
|
||||||
android:background="#aa000000" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:text="@string/comparisonCaseInsensitive"
|
|
||||||
android:layout_marginBottom="@dimen/default_margin"/>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="@string/title" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<Spinner
|
|
||||||
android:id="@+id/spinnerTitleDirection"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/etNotificationTitle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ems="10" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:layout_marginVertical="@dimen/default_margin"
|
|
||||||
android:background="#aa000000" />
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="@string/text" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<Spinner
|
|
||||||
android:id="@+id/spinnerTextDirection"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/etNotificationText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ems="10" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</TableRow>>
|
|
||||||
|
|
||||||
</TableLayout>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/bSaveActionCloseNotification"
|
|
||||||
android:layout_marginTop="@dimen/default_margin"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/save" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
@ -1,78 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="@dimen/default_margin" >
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_span="2"
|
|
||||||
android:textSize="25dp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:layout_marginBottom="@dimen/default_margin"
|
|
||||||
android:text="@string/actionMediaControl" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="@dimen/default_margin"
|
|
||||||
android:text="@string/actionMediaControlNotice" />
|
|
||||||
|
|
||||||
<RadioGroup
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" >
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/rbMediaPlayPause"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/playPause" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/rbMediaPlay"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/play" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/rbMediaPause"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/pause" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/rbMediaStop"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/stop" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/rbMediaPrevious"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/previous" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/rbMediaNext"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/next" />
|
|
||||||
|
|
||||||
</RadioGroup>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/bSaveControlMediaAction"
|
|
||||||
android:layout_marginTop="@dimen/default_margin"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/save" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
@ -1,90 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="@dimen/default_margin" >
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical" >
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/createNotification"
|
|
||||||
android:textSize="25dp"
|
|
||||||
android:layout_marginBottom="@dimen/default_margin" />
|
|
||||||
|
|
||||||
<TableLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:shrinkColumns="1"
|
|
||||||
android:stretchColumns="1">
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginRight="@dimen/default_margin"
|
|
||||||
android:text="@string/title" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/etNotificationTitle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ems="10" />
|
|
||||||
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="@string/text" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/etNotificationText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ems="10" />
|
|
||||||
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
</TableLayout>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:layout_marginVertical="@dimen/default_margin"
|
|
||||||
android:background="#aa000000" />
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvLegend"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dip"
|
|
||||||
android:text="@string/urlLegend" />
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/bSaveActionNotification"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/default_margin"
|
|
||||||
android:text="@string/save" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
@ -52,15 +52,6 @@
|
|||||||
android:layout_marginVertical="@dimen/default_margin"
|
android:layout_marginVertical="@dimen/default_margin"
|
||||||
android:background="#aa000000" />
|
android:background="#aa000000" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/profileWarning"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
|
||||||
android:textColor="@color/lightRed"
|
|
||||||
android:layout_marginBottom="@dimen/default_margin"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -96,13 +96,6 @@
|
|||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:layout_marginVertical="@dimen/default_margin"
|
android:layout_marginVertical="@dimen/default_margin"
|
||||||
android:background="#aa000000" />
|
android:background="#aa000000" />
|
||||||
<TextView
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:text="@string/comparisonCaseInsensitive"
|
|
||||||
android:layout_marginBottom="@dimen/default_margin"/>
|
|
||||||
|
|
||||||
<TableRow
|
<TableRow
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
||||||
@ -172,7 +165,7 @@
|
|||||||
</TableLayout>
|
</TableLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/bSaveActionCloseNotification"
|
android:id="@+id/bSaveTriggerNotification"
|
||||||
android:layout_marginTop="@dimen/default_margin"
|
android:layout_marginTop="@dimen/default_margin"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -327,11 +327,11 @@
|
|||||||
android:text="@string/privacy" />
|
android:text="@string/privacy" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/bControlCenter"
|
android:id="@+id/bSettings"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
android:text="@string/controlCenter" />
|
android:text="@string/settings" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/bDonate"
|
android:id="@+id/bDonate"
|
||||||
@ -341,13 +341,6 @@
|
|||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
android:text="@string/donate" />
|
android:text="@string/donate" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/default_margin"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/emailContactNotice" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
<string name="end">Ende</string>
|
<string name="end">Ende</string>
|
||||||
<string name="save">Speichern</string>
|
<string name="save">Speichern</string>
|
||||||
<string name="urlToTrigger">URL, die ausgelöst werden soll:</string>
|
<string name="urlToTrigger">URL, die ausgelöst werden soll:</string>
|
||||||
<string name="urlLegend">Variablen:\nSie können die folgenden Variablen verwenden. Vor dem Auslösen werden sie mit dem entsprechenden Wert Ihres Geräts ersetzt. Die Klammern müssen in den Text mit aufgenommen werden.\n\n[uniqueid] - Die Unique ID Ihres Geräts\n[serialnr] - Die Seriennummer Ihres Geräts (< Android 9)\n[latitude] - Ihr gegenwärtiger Breitengrad\n[longitude] - Ihr gegenwärtiger Längengrad\n[phonenr] - Nummer des letzten ein- oder ausgehenden Anrufs\n[d] - Tag des Monats, 2-stellig mit führender Null\n[m] - Monat als Zahl, mit führenden Nullen\n[Y] - Vierstellige Jahreszahl\n[h] - Stunde im 12-Stunden-Format, mit führenden Nullen\n[H] - Stunde im 24-Stunden-Format, mit führenden Nullen\n[i] - Minuten, mit führenden Nullen\n[s] - Sekunden, mit führenden Nullen\n[ms] - milliseconds\n[notificationTitle] - Titel der letzten Benachrichtigung\n[notificationText] - Text der letzten Benachrichtigung</string>
|
<string name="urlLegend">Variablen:\nSie können die folgenden Variablen verwenden. Vor dem Auslösen werden sie mit dem entsprechenden Wert Ihres Geräts ersetzt. Die Klammern müssen in den Text mit aufgenommen werden.\n\n[uniqueid] - Die Unique ID Ihres Geräts\n[serialnr] - Die Seriennummer Ihres Geräts\n[latitude] - Ihr gegenwärtiger Breitengrad\n[longitude] - Ihr gegenwärtiger Längengrad\n[phonenr] - Nummer des letzten ein- oder ausgehenden Anrufs\n[d] - Tag des Monats, 2-stellig mit führender Null\n[m] - Monat als Zahl, mit führenden Nullen\n[Y] - Vierstellige Jahreszahl\n[h] - Stunde im 12-Stunden-Format, mit führenden Nullen\n[H] - Stunde im 24-Stunden-Format, mit führenden Nullen\n[i] - Minuten, mit führenden Nullen\n[s] - Sekunden, mit führenden Nullen\n[ms] - milliseconds\n[notificationTitle] - Titel der letzten Benachrichtigung\n[notificationText] - Text der letzten Benachrichtigung</string>
|
||||||
<string name="wifi">WLAN</string>
|
<string name="wifi">WLAN</string>
|
||||||
<string name="activating">Aktiviere</string>
|
<string name="activating">Aktiviere</string>
|
||||||
<string name="deactivating">Deaktiviere</string>
|
<string name="deactivating">Deaktiviere</string>
|
||||||
@ -403,7 +403,7 @@
|
|||||||
<string name="startNewThreadForRuleExecution">Für Regelaktivierung neuen Thread starten.</string>
|
<string name="startNewThreadForRuleExecution">Für Regelaktivierung neuen Thread starten.</string>
|
||||||
<string name="newThreadRules">Neuer Thread</string>
|
<string name="newThreadRules">Neuer Thread</string>
|
||||||
<string name="showIcon">Symbol</string>
|
<string name="showIcon">Symbol</string>
|
||||||
<string name="showIconWhenServiceIsRunning">Symbol anzeigen, wenn Dienst läuft (verstecken funktioniert nur unterhalb Android 7). Wenn Sie auf einer höheren Version sind, gehen Sie in die System Einstellungen, dann Automation und dann Benachrichtigungen. Deaktivieren Sie die \"Service notification\".</string>
|
<string name="showIconWhenServiceIsRunning">Symbol anzeigen, wenn Dienst läuft (verstecken funktioniert nur unterhalb Android 7)</string>
|
||||||
<string name="ruleHistory">Regel Historie (letzte zuerst):</string>
|
<string name="ruleHistory">Regel Historie (letzte zuerst):</string>
|
||||||
<string name="someOptionsNotAvailableYet">Manche Optionen sind deaktiviert, da sie noch nicht funktionieren. Sie kommen in einer späteren Programmversion dazu.</string>
|
<string name="someOptionsNotAvailableYet">Manche Optionen sind deaktiviert, da sie noch nicht funktionieren. Sie kommen in einer späteren Programmversion dazu.</string>
|
||||||
<string name="lockSoundChanges">Tonänderungen sperren</string>
|
<string name="lockSoundChanges">Tonänderungen sperren</string>
|
||||||
@ -532,7 +532,7 @@
|
|||||||
<string name="fileDoesNotExist">Datei existiert nicht.</string>
|
<string name="fileDoesNotExist">Datei existiert nicht.</string>
|
||||||
<string name="noFileManageInstalled">Kein Dateimanager installiert.</string>
|
<string name="noFileManageInstalled">Kein Dateimanager installiert.</string>
|
||||||
<string name="alwaysPlayExplanation">Wenn diese Einstellung aktiv ist, wird der Ton immer abgespielt. Wenn die Einstellung inaktiv ist, wird der Ton nur dann abgespielt, wenn das Telefon weder auf stumm noch auf Vibration steht, d.h. Klingeltöne aktiv sind. Allerdings hat es keinen Einfluß auf die Medien-Lautstärke. D.h., wenn diese stumm ist, werden Sie so oder so nichts zu hören bekommen.</string>
|
<string name="alwaysPlayExplanation">Wenn diese Einstellung aktiv ist, wird der Ton immer abgespielt. Wenn die Einstellung inaktiv ist, wird der Ton nur dann abgespielt, wenn das Telefon weder auf stumm noch auf Vibration steht, d.h. Klingeltöne aktiv sind. Allerdings hat es keinen Einfluß auf die Medien-Lautstärke. D.h., wenn diese stumm ist, werden Sie so oder so nichts zu hören bekommen.</string>
|
||||||
<string name="shareConfigAndLogFilesWithDev">Konfigurations- und Logdateien anhängen</string>
|
<string name="shareConfigAndLogFilesWithDev">Konfigurations- und Logdatei mit Entwickler teilen (via email).</string>
|
||||||
<string name="shareConfigAndLogExplanation">Dies wird eine neue Email öffnen mit Konfigurations- und Logdateien als Zip-Anhang. Sie wird nicht automatisch versendet. D.h. Sie können so z.B. auch den Adressaten zu sich selbst ändern.</string>
|
<string name="shareConfigAndLogExplanation">Dies wird eine neue Email öffnen mit Konfigurations- und Logdateien als Zip-Anhang. Sie wird nicht automatisch versendet. D.h. Sie können so z.B. auch den Adressaten zu sich selbst ändern.</string>
|
||||||
<string name="notificationTriggerExplanation">Dieser Auslöser reagiert auf Benachrichtigungen anderer Anwendung im Benachrichtigungsbereich von Android (oder wenn diese geschlossen werden). Sie können eine bestimmte Anwendung festlegen, von die Nachricht stammen muß. Wenn nicht, zählt jede Benachrichtigung. Sie können auch Zeichenketten für Titel oder Nachrichteninhalt festlegen, die enthalten sein müssen. Die Groß-/Kleinschreibung wird hierbei nicht berücksichtigt.</string>
|
<string name="notificationTriggerExplanation">Dieser Auslöser reagiert auf Benachrichtigungen anderer Anwendung im Benachrichtigungsbereich von Android (oder wenn diese geschlossen werden). Sie können eine bestimmte Anwendung festlegen, von die Nachricht stammen muß. Wenn nicht, zählt jede Benachrichtigung. Sie können auch Zeichenketten für Titel oder Nachrichteninhalt festlegen, die enthalten sein müssen. Die Groß-/Kleinschreibung wird hierbei nicht berücksichtigt.</string>
|
||||||
<string name="addParameters">Parameter hinzufügen</string>
|
<string name="addParameters">Parameter hinzufügen</string>
|
||||||
@ -648,7 +648,7 @@
|
|||||||
<string name="profileNotActive">Profil %1$s ist nicht 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="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="profileCouldNotBeDeleted">Profil konnte nicht gelöscht werden.</string>
|
||||||
<string name="ruleXIsUsingProfileY">Dieses Profil kann nicht gelöscht werden. Regel %1$s verwendet noch Profil %2$s.</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="noRepetition">keine Wiederholung</string>
|
||||||
<string name="usingAuthentication">mit Authentifizierung</string>
|
<string name="usingAuthentication">mit Authentifizierung</string>
|
||||||
<string name="toNumber">zu Nummer</string>
|
<string name="toNumber">zu Nummer</string>
|
||||||
@ -659,35 +659,4 @@
|
|||||||
<string name="pickActivityManually">Manuell 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="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>
|
<string name="launcherNotFound">Eine Start-Activity dieser Anwendung konnte nicht gefunden werden. Sie müssen manuell eine auswählen.</string>
|
||||||
<string name="enterTitle">Geben Sie einen Titel ein.</string>
|
|
||||||
<string name="enterText">Geben Sie einen Text ein.</string>
|
|
||||||
<string name="info">Info</string>
|
|
||||||
<string name="createNotification">Benachrichtigung erstellen</string>
|
|
||||||
<string name="profileWasNotFound">Das Profil, das in dieser Regel referenziert wird, existiert scheinbar nicht mehr. Das alphabetisch erste wurde stattdessen ausgewählt.</string>
|
|
||||||
<string name="closeNotifications">Benachrichtigung(en) schließen</string>
|
|
||||||
<string name="comparisonCaseInsensitive">Groß-/Kleinschreibung ist egal.</string>
|
|
||||||
<string name="notificationCloseActionExplanation">Wenn Sie keine Kriterien angeben, werden ALLE Benachrichtigungen geschlossen. Es wird also empfohlen, zumindest eine Anwendung zu spezifizieren und/oder Titel oder Text anzugeben.</string>
|
|
||||||
<string name="profileWarning">Die Einstellungen, die Sie hier vornehmen, können dazu führen, dass Sie bestimmte Dinge auf Ihrem Telefon nicht mehr mitbekommen. Sie können sogar Ihren Wecker zum Schweigen bringen. Was auch immer Sie hier einstellen - es wird empfohlen, es zu testen.</string>
|
|
||||||
<string name="ifString">falls</string>
|
|
||||||
<string name="pleaseSelectActionValue">Bitte wählen Sie eine Aktion!</string>
|
|
||||||
<string name="android.permission.MEDIA_CONTENT_CONTROL">Medien steuern</string>
|
|
||||||
<string name="play">abspielen</string>
|
|
||||||
<string name="stop">stop</string>
|
|
||||||
<string name="next">nächster</string>
|
|
||||||
<string name="previous">vorheriger</string>
|
|
||||||
<string name="pause">pausieren</string>
|
|
||||||
<string name="playPause">abspielen/pause umschalten</string>
|
|
||||||
<string name="selectCommand">Kommando auswählen</string>
|
|
||||||
<string name="unlocked">entsperrt</string>
|
|
||||||
<string name="on">an</string>
|
|
||||||
<string name="off">aus</string>
|
|
||||||
<string name="actionMediaControlNotice">Bedenken Sie, daß diese Aktion nicht notwendigerweise mit allen Playern funktioniert. Und selbst, wenn es mit einem grundsätzlich funktioniert, müssen auch nicht alle der u.g. Kommandos funktionieren.</string>
|
|
||||||
<string name="screenState">Bildschirm Status</string>
|
|
||||||
<string name="actionMediaControl">Medien steuern</string>
|
|
||||||
<string name="selectDesiredState">Bitte gewünschten Zustand wählen</string>
|
|
||||||
<string name="screenIs">Bildschirm ist %1$s</string>
|
|
||||||
<string name="sendEmailToDev">Email an Entwickler schicken</string>
|
|
||||||
<string name="controlCenter">Steuerungszentrale</string>
|
|
||||||
<string name="emailContactNotice">Email ist mein bevorzugtes Kommunikationsmittel, um Fehler zu melden, Fragen zu stellen or Vorschläge zu machen. Bitte gehen Sie für weitere Infos in die Steuerungszentrale.</string>
|
|
||||||
<string name="featureCeasedToWorkLastWorkingAndroidVersion">Aufgrund Google\'s unendlicher Weisheit, ist die letzte Android Version, mit der diese Funktion noch funktioniert, die Version %1$s. Sie können es hier einrichten, aber vermutlich wird es keine Auswirkung haben.</string>
|
|
||||||
</resources>
|
</resources>
|
@ -358,12 +358,12 @@
|
|||||||
<string name="networkAccuracy">Red exactitud [m]</string>
|
<string name="networkAccuracy">Red exactitud [m]</string>
|
||||||
<string name="minimumTimeForLocationUpdates">Tiempo mínimo para cambio en milisegundos para actualizar posición</string>
|
<string name="minimumTimeForLocationUpdates">Tiempo mínimo para cambio en milisegundos para actualizar posición</string>
|
||||||
<string name="timeForUpdate">Tiempo para actualizar [milisegundos]</string>
|
<string name="timeForUpdate">Tiempo para actualizar [milisegundos]</string>
|
||||||
<string name="urlLegend">Variables: Puede usar esas variables. Mientras ejecuta van a sustituir con los valores correspondientes en su dispositivo. Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dispositivo\n[serialnr] - el número de serie de su dispositivo (< Android 9)\n[latitude] - su latitud\n[longitude] - su longitud\n[phonenr] - Ùltimo número de llamada realizada tanto de salida como entrante\n[d] - Dia del mes, 2 digitos con cero al comienzo\n[m] - número del mes, 2 digitos con cero al comienzo\n[Y] - Número del año, 4 digitos\n[h] - Hora, formato 12 horas con cero al comienzo\n[H] - Hora, formato 24 horas con cero al comienzo\n[i] - Minutos con cero al comienzo\n[s] - Segundos con cero al comienzo\n[ms] - milisegundos\n[notificationTitle] - Título de la última notificación\n[notificationText] - Texto de la última notificación</string>
|
<string name="urlLegend">Variables: Puede usar esas variables. Mientras ejecuta van a sustituir con los valores correspondientes en su dispositivo. Incluya las paréntecis en su texto. [uniqueid] - el número único de su dispositivo [serialnr] - el número de serie de su dispositivo [latitude] - su latitud [longitude] - su longitud [phonenr] - Ùltimo número de llamada realizada tanto de salida como entrante [d] - Dia del mes, 2 digitos con cero al comienzo [m] - número del mes, 2 digitos con cero al comienzo [Y] - Número del año, 4 digitos [h] - Hora, formato 12 horas con cero al comienzo [H] - Hora, formato 24 horas con cero al comienzo [i] - Minutos con cero al comienzo [s] - Segundos con cero al comienzo [ms] - milisegundos [notificationTitle] - Título de la última notificación [notificationText] - Texto de la última notificación</string>
|
||||||
<string name="screenRotationAlreadyEnabled">Rotación del monitor todavia esta activado.</string>
|
<string name="screenRotationAlreadyEnabled">Rotación del monitor todavia esta activado.</string>
|
||||||
<string name="screenRotationAlreadyDisabled">Rotación del monitor todavia esta desactivado.</string>
|
<string name="screenRotationAlreadyDisabled">Rotación del monitor todavia esta desactivado.</string>
|
||||||
<string name="needLocationPermForWifiList">Se puede usar la lista de wifis conocidos para determinar los sitios en los cuales estuvo. Por eso el permiso de localización es necesario para cargar la lista de wifis. Si quiere elegir uno de la lista tiene que conceder el permiso. En caso contrario todavia puede introducir un nombre wifi manualmente.</string>
|
<string name="needLocationPermForWifiList">Se puede usar la lista de wifis conocidos para determinar los sitios en los cuales estuvo. Por eso el permiso de localización es necesario para cargar la lista de wifis. Si quiere elegir uno de la lista tiene que conceder el permiso. En caso contrario todavia puede introducir un nombre wifi manualmente.</string>
|
||||||
<string name="com.wireguard.android.permission.CONTROL_TUNNELS">Controlar conexiones de la app Wireguard</string>
|
<string name="com.wireguard.android.permission.CONTROL_TUNNELS">Controlar conexiones de la app Wireguard</string>
|
||||||
<string name="shareConfigAndLogFilesWithDev">Adjuntar configuración y procotolo.</string>
|
<string name="shareConfigAndLogFilesWithDev">Enviar configuración y procotolo al desarollador (vía email).</string>
|
||||||
<string name="rootExplanation">Necesita permiso root para esta función. Después encienda la función \"ejecutar regla manualmente\" para presentar el permiso superuser dialogo. Es necesario elegir \"siempre permitir root para esta app\". En caso contrario la regla no puede funcionar en segundo plano.</string>
|
<string name="rootExplanation">Necesita permiso root para esta función. Después encienda la función \"ejecutar regla manualmente\" para presentar el permiso superuser dialogo. Es necesario elegir \"siempre permitir root para esta app\". En caso contrario la regla no puede funcionar en segundo plano.</string>
|
||||||
<string name="helpTextRules">Todas las condiciones están \"Y\"-conectadas. La regla solo va a aplicarse cuando todas las condiciones se aplican. Si quiere \"O\", cree otra regla.</string>
|
<string name="helpTextRules">Todas las condiciones están \"Y\"-conectadas. La regla solo va a aplicarse cuando todas las condiciones se aplican. Si quiere \"O\", cree otra regla.</string>
|
||||||
<string name="timeBetweenNoiseLevelMeasurementsSummary">Segundos entre dos ensayos de nivel de ruido</string>
|
<string name="timeBetweenNoiseLevelMeasurementsSummary">Segundos entre dos ensayos de nivel de ruido</string>
|
||||||
@ -470,7 +470,7 @@
|
|||||||
<string name="noMapsApplicationFound">Parece que no hay una aplicación de mapa en su dispositivo.</string>
|
<string name="noMapsApplicationFound">Parece que no hay una aplicación de mapa en su dispositivo.</string>
|
||||||
<string name="soundMode">Modo de sonido de llamada.</string>
|
<string name="soundMode">Modo de sonido de llamada.</string>
|
||||||
<string name="showIcon">Monstrar icono</string>
|
<string name="showIcon">Monstrar icono</string>
|
||||||
<string name="showIconWhenServiceIsRunning">Monstrar icono cuando el servicio esta activo (ocultando solo funciona antes Android 7). Si está en una versión superior, vaya a configuración del sistema, luego Automatización, luego notificaciones y deshabilite \"Service notification\".</string>
|
<string name="showIconWhenServiceIsRunning">Monstrar icono cuando el servicio esta activo (ocultando solo funciona antes Android 7)</string>
|
||||||
<string name="currentVolume">Volumen actual</string>
|
<string name="currentVolume">Volumen actual</string>
|
||||||
<string name="volumeTest">Calibrado de volumen</string>
|
<string name="volumeTest">Calibrado de volumen</string>
|
||||||
<string name="permissionsTitle">Permisos necesarios</string>
|
<string name="permissionsTitle">Permisos necesarios</string>
|
||||||
@ -588,7 +588,7 @@
|
|||||||
<string name="vibrate">Vibrar</string>
|
<string name="vibrate">Vibrar</string>
|
||||||
<string name="test">Probar</string>
|
<string name="test">Probar</string>
|
||||||
<string name="VibrateExplanation">Elija la duración de la vibración, seguido de un coma y una duración de una pausa. Puedes concatenar tantos como quiere. Separelos con comas tambien. Por ejemplo el patrón 100,500,500,1000,100 va a vibrar 100, esperar 500, vibrar 500, esperar 1000, vibrar 100 ms. Si cree que una vibración está perdida, pruebe incrementar la pausa antes de esta vibración.</string>
|
<string name="VibrateExplanation">Elija la duración de la vibración, seguido de un coma y una duración de una pausa. Puedes concatenar tantos como quiere. Separelos con comas tambien. Por ejemplo el patrón 100,500,500,1000,100 va a vibrar 100, esperar 500, vibrar 500, esperar 1000, vibrar 100 ms. Si cree que una vibración está perdida, pruebe incrementar la pausa antes de esta vibración.</string>
|
||||||
<string name="pleaseEnterValidVibrationPattern">Por favor inserte un patrón de vibración válido.</string>
|
<string name="pleaseEnterValidVibrationPattern">Por favor introduzca un patrón de vibración válido.</string>
|
||||||
<string name="tabsPlacementSummary">Elija done la barra de tabs está puesto.</string>
|
<string name="tabsPlacementSummary">Elija done la barra de tabs está puesto.</string>
|
||||||
<string name="intentDataComment">Si su parametro es de tipo Uri y especifica \"IntentData\" como nombre (minúscula/mayáscula no es importante), el parametro no está añadido como un parametro normal con puExtra(), pero estará añadido al intent con setData().</string>
|
<string name="intentDataComment">Si su parametro es de tipo Uri y especifica \"IntentData\" como nombre (minúscula/mayáscula no es importante), el parametro no está añadido como un parametro normal con puExtra(), pero estará añadido al intent con setData().</string>
|
||||||
<string name="locationEngineDisabledLong">Desafortunadamente su posición todavia no puede ser determinada. Gratitud va para Google por su sabiduria y amabilidad infinita.\n\nDejenme explicarselo mas. Comenzando con Android 10 un nuevo permiso se introdujo que es necesario para determinar la posición en el fondo (que es necesario para una app como esta). Aunque lo considero una buena idea, conlleva a una chicana para desarolladores.\n\nCuando se esta desarrollando una app se puede intentar calificar para este permiso mientras se sigue un catalogo de condiciones. Desafortunadamente nuevas versiones de mi app fueron rechazadas por un periodo de trés meses. Cumplé todas las condiciones, pero Google\'s mierda servicio para desarolladores afirmó que no. Despues de presentar pruebas, que cumplí con todo, recibí una respuesta de \"No puedo ayudarte mas.\". En algun momento me rendí.\n\nComo consecuencia la version Google Play todavia no sabe usar la locación como una condición. Mi única alternativa fue remover la applicación de Google Play.\n\nLo siento mucho, pero hicé todo lo posible para discutir con un support que no sabe aprobar la prueba de Turing repetidamente.\n\nLa noticia positiva: Usted todavia puede tener todo!\n\nAutomation ahora es open source y se puede encontrar en F-Droid. Es un app store que se preocupa por su privacidad - en vez de solo simular eso. Simplemente guarde su configuración, desinstale la app, instale la de F-Droid, restaure su configuración - terminado.\n\nCliquee aqui para averiguar más:</string>
|
<string name="locationEngineDisabledLong">Desafortunadamente su posición todavia no puede ser determinada. Gratitud va para Google por su sabiduria y amabilidad infinita.\n\nDejenme explicarselo mas. Comenzando con Android 10 un nuevo permiso se introdujo que es necesario para determinar la posición en el fondo (que es necesario para una app como esta). Aunque lo considero una buena idea, conlleva a una chicana para desarolladores.\n\nCuando se esta desarrollando una app se puede intentar calificar para este permiso mientras se sigue un catalogo de condiciones. Desafortunadamente nuevas versiones de mi app fueron rechazadas por un periodo de trés meses. Cumplé todas las condiciones, pero Google\'s mierda servicio para desarolladores afirmó que no. Despues de presentar pruebas, que cumplí con todo, recibí una respuesta de \"No puedo ayudarte mas.\". En algun momento me rendí.\n\nComo consecuencia la version Google Play todavia no sabe usar la locación como una condición. Mi única alternativa fue remover la applicación de Google Play.\n\nLo siento mucho, pero hicé todo lo posible para discutir con un support que no sabe aprobar la prueba de Turing repetidamente.\n\nLa noticia positiva: Usted todavia puede tener todo!\n\nAutomation ahora es open source y se puede encontrar en F-Droid. Es un app store que se preocupa por su privacidad - en vez de solo simular eso. Simplemente guarde su configuración, desinstale la app, instale la de F-Droid, restaure su configuración - terminado.\n\nCliquee aqui para averiguar más:</string>
|
||||||
@ -626,7 +626,7 @@
|
|||||||
<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="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="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="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">Inserte números válidos en todos los campos.</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="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="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="deviceOrientationTimeAcceptIntervalSummary">Aceptar nuevas señales de movimiento cada x milisegundos</string>
|
||||||
@ -646,7 +646,7 @@
|
|||||||
<string name="recommendedForBetterReliability">Recomendado para una mejor fiabilidad</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="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="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 %1$s hace referencia al perfil %2$s.</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="profileCouldNotBeDeleted">No se pudo eliminar el perfil.</string>
|
||||||
<string name="noRepetition">sin repetición</string>
|
<string name="noRepetition">sin repetición</string>
|
||||||
<string name="usingAuthentication">uso de la autenticación</string>
|
<string name="usingAuthentication">uso de la autenticación</string>
|
||||||
@ -658,35 +658,4 @@
|
|||||||
<string name="pickActivityManually">Eligir manualmente</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="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>
|
<string name="launcherNotFound">No se puede encontrar una launcher activity. Tiene que elegir una manualmente.</string>
|
||||||
<string name="info">Info</string>
|
|
||||||
<string name="createNotification">Crear notificación</string>
|
|
||||||
<string name="enterTitle">Inserte un título.</string>
|
|
||||||
<string name="enterText">Inserte un texto.</string>
|
|
||||||
<string name="profileWasNotFound">El perfil utilizado en esta regla ya no parece existir. Se ha seleccionado el primero alfabéticamente.</string>
|
|
||||||
<string name="notificationCloseActionExplanation">Si no especifica ningún criterio, esta acción cerrará TODAS las notificaciones. Por lo tanto, se recomienda al menos especificar criterios para al menos 1 de la aplicación, título o texto.</string>
|
|
||||||
<string name="closeNotifications">Cerrar notificación(es)</string>
|
|
||||||
<string name="comparisonCaseInsensitive">Las comparaciones se realizan sin distinción de mayúsculas y minúsculas</string>
|
|
||||||
<string name="profileWarning">La configuración que realice aquí puede hacer que ya no note ciertas cosas de su teléfono. Incluso puede silenciar su alarma de despertar. Así que hagas lo que hagas, se recomienda que lo pruebes.</string>
|
|
||||||
<string name="ifString">si</string>
|
|
||||||
<string name="on">encendido</string>
|
|
||||||
<string name="off">apagado</string>
|
|
||||||
<string name="unlocked">desbloqueado</string>
|
|
||||||
<string name="play">reproducir</string>
|
|
||||||
<string name="pause">pausar</string>
|
|
||||||
<string name="previous">ultimo</string>
|
|
||||||
<string name="next">proximo</string>
|
|
||||||
<string name="stop">parar</string>
|
|
||||||
<string name="android.permission.MEDIA_CONTENT_CONTROL">Controlar la reproducción de medios</string>
|
|
||||||
<string name="actionMediaControl">Controlar la reproducción de medios</string>
|
|
||||||
<string name="pleaseSelectActionValue">Por favor elije una acción!</string>
|
|
||||||
<string name="playPause">alternar reproducir/pausar</string>
|
|
||||||
<string name="selectCommand">Elije el comando</string>
|
|
||||||
<string name="screenState">Estado de la pantalla</string>
|
|
||||||
<string name="selectDesiredState">Elije el estado deseado</string>
|
|
||||||
<string name="controlCenter">Centro de control</string>
|
|
||||||
<string name="screenIs">pantalla esta %1$s</string>
|
|
||||||
<string name="sendEmailToDev">Enviar email al desrollador</string>
|
|
||||||
<string name="featureCeasedToWorkLastWorkingAndroidVersion">Debido a la infinita sabiduría de Google, la última versión de Android en la que se sabe que funciona esta función es %1$s. Puede configurarlo, pero probablemente no tendrá ningún efecto.</string>
|
|
||||||
<string name="emailContactNotice">El correo electrónico es mi método preferido de contacto para informar errores, hacer preguntas o hacer propuestas. Vaya al centro de control para obtener más información.</string>
|
|
||||||
<string name="actionMediaControlNotice">Ten en cuenta que esta acción puede no funcionar con TODOS los jugadores. E incluso si lo hace, no todos los botones funcionan necesariamente.</string>
|
|
||||||
</resources>
|
</resources>
|
@ -456,10 +456,10 @@
|
|||||||
<string name="settingsSetToDefault">Impostazioni predefinite ripristinate.</string>
|
<string name="settingsSetToDefault">Impostazioni predefinite ripristinate.</string>
|
||||||
<string name="settingsWillTakeTime">Alcune impostazioni non saranno applicate prima che alcune impostazioni contestuali cambino o che il servizio venga riavviato.</string>
|
<string name="settingsWillTakeTime">Alcune impostazioni non saranno applicate prima che alcune impostazioni contestuali cambino o che il servizio venga riavviato.</string>
|
||||||
<string name="shareConfigAndLogExplanation">Questo creerà una email con la tua configurazione e i file di log allegati come file zip. Non sarà inviata automaticamente, dovrai premere \"invia\". Puoi anche cambiare il destinatario con te stesso, per esempio.</string>
|
<string name="shareConfigAndLogExplanation">Questo creerà una email con la tua configurazione e i file di log allegati come file zip. Non sarà inviata automaticamente, dovrai premere \"invia\". Puoi anche cambiare il destinatario con te stesso, per esempio.</string>
|
||||||
<string name="shareConfigAndLogFilesWithDev">Agganciare i file di configurazione e di registro</string>
|
<string name="shareConfigAndLogFilesWithDev">Condividere i file di configurazione e di registro con lo sviluppatore (via e-mail).</string>
|
||||||
<string name="showHelp">Mostra Aiuto</string>
|
<string name="showHelp">Mostra Aiuto</string>
|
||||||
<string name="showIcon">Mostra icona</string>
|
<string name="showIcon">Mostra icona</string>
|
||||||
<string name="showIconWhenServiceIsRunning">Mostra una icona quando il servizio è attivo (nasconderla funziona solo in versioni inferiori ad Android 7). Se hai una versione superiore, vai alle impostazioni di sistema, quindi all\'automazione, quindi alle notifiche e disabilita la \"Service notification\".</string>
|
<string name="showIconWhenServiceIsRunning">Mostra una icona quando il servizio è attivo (nasconderla funziona solo in versioni inferiori ad Android 7)</string>
|
||||||
<string name="showOnMap">Mostra sulla mappa</string>
|
<string name="showOnMap">Mostra sulla mappa</string>
|
||||||
<string name="someOptionsNotAvailableYet">Alcune opzioni sono disabilitate in quanto non ancora implementate. Saranno introdotte in una versione successiva.</string>
|
<string name="someOptionsNotAvailableYet">Alcune opzioni sono disabilitate in quanto non ancora implementate. Saranno introdotte in una versione successiva.</string>
|
||||||
<string name="soundMode">Modalità sonora</string>
|
<string name="soundMode">Modalità sonora</string>
|
||||||
@ -533,7 +533,7 @@
|
|||||||
<string name="tuesday">Martedì</string>
|
<string name="tuesday">Martedì</string>
|
||||||
<string name="unknownError">Errore indeterminato.</string>
|
<string name="unknownError">Errore indeterminato.</string>
|
||||||
<string name="until">finchè</string>
|
<string name="until">finchè</string>
|
||||||
<string name="urlLegend">Variabili:\n È possibile utilizzare le seguenti variabili. All\'attivazione saranno sostituite con il valore corrispondente sul dispositivo. Includi le parentesi nel tuo testo.\n\n[uniqueid] - Il numero di serie del tuo dispositivo\n[serialnr] - Il serial number del tuo dispositivio (< Android 9)\n[latitude] - La latitudine del tuo dispositivo\n[longitude] - La longitudine del tuo dispositivo\n[phonenr] - Numero dell\'ultima chiamata (entrante o uscente)\n[d] - Il giorno del mese, sempre 2 cifre\n[m] - Mese in formato numerico, sempre 2 cifre\n[Y] - L\’anno, sempre 4 cifre\n[h] - Ore in formato 12 ore, sempre 2 cifre con due punti\n[H] - Ore in formato 24 ore, sempre 2 cifre con due punti\n[i] - Minuti, sempre 2 cifre\n[s] - Secondi, sempre 2 cifre\n[ms] - millisecondi, sempre 3 cifre [notificationTitle] - titolo dell\'ultima notifica [notificationText] - testo dell\'ultima notifica</string>
|
<string name="urlLegend">Variabili:\n È possibile utilizzare le seguenti variabili. All\'attivazione saranno sostituite con il valore corrispondente sul dispositivo. Includi le parentesi nel tuo testo.\n\n[uniqueid] - Il numero di serie del tuo dispositivo\n[serialnr] - Il serial number del tuo dispositivio\n[latitude] - La latitudine del tuo dispositivo\n[longitude] - La longitudine del tuo dispositivo\n[phonenr] - Numero dell\'ultima chiamata (entrante o uscente)\n[d] - Il giorno del mese, sempre 2 cifre\n[m] - Mese in formato numerico, sempre 2 cifre\n[Y] - L\’anno, sempre 4 cifre\n[h] - Ore in formato 12 ore, sempre 2 cifre con due punti\n[H] - Ore in formato 24 ore, sempre 2 cifre con due punti\n[i] - Minuti, sempre 2 cifre\n[s] - Secondi, sempre 2 cifre\n[ms] - millisecondi, sempre 3 cifre [notificationTitle] - titolo dell\'ultima notifica [notificationText] - testo dell\'ultima notifica</string>
|
||||||
<string name="urlToTrigger">URL da caricare:</string>
|
<string name="urlToTrigger">URL da caricare:</string>
|
||||||
<string name="urlTooShort">L\'url deve avere almeno 10 caratteri.</string>
|
<string name="urlTooShort">L\'url deve avere almeno 10 caratteri.</string>
|
||||||
<string name="usbTetheringFailForAboveGingerbread">Questo molto probabilmente non funzionerà dato che sei su una versione superiore ad Android 2.3. Tuttavia è possibile utilizzare la connessione wifi tethering per attivare la regola.</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>
|
||||||
@ -647,7 +647,7 @@
|
|||||||
<string name="checkSettings">Controlla le impostazioni</string>
|
<string name="checkSettings">Controlla le impostazioni</string>
|
||||||
<string name="profileActive">profilo %1$s è attivo</string>
|
<string name="profileActive">profilo %1$s è attivo</string>
|
||||||
<string name="profileNotActive">profilo %1$s non attivo</string>
|
<string name="profileNotActive">profilo %1$s non attivo</string>
|
||||||
<string name="ruleXIsUsingProfileY">Impossibile eliminare questo profilo. La regola %1$s fa riferimento al profilo %2$s.</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="profileCouldNotBeDeleted">Impossibile eliminare il profilo.</string>
|
||||||
<string name="noRepetition">nessuna ripetizione</string>
|
<string name="noRepetition">nessuna ripetizione</string>
|
||||||
<string name="usingAuthentication">utilizzo dell\'autenticazione</string>
|
<string name="usingAuthentication">utilizzo dell\'autenticazione</string>
|
||||||
@ -659,35 +659,4 @@
|
|||||||
<string name="pickActivityManually">Scegli manualmente</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="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>
|
<string name="launcherNotFound">Impossibile identificare un\'attività di avvio di questa app. Dovrai sceglierne uno manualmente.</string>
|
||||||
<string name="createNotification">Crea notifica</string>
|
|
||||||
<string name="enterTitle">Inserisci un titolo.</string>
|
|
||||||
<string name="enterText">Immettere un testo.</string>
|
|
||||||
<string name="info">Info</string>
|
|
||||||
<string name="profileWasNotFound">Il profilo utilizzato in questa regola non sembra più esistere. Il primo in ordine alfabetico è stato selezionato.</string>
|
|
||||||
<string name="comparisonCaseInsensitive">I confronti sono fatti caso-INsensitive</string>
|
|
||||||
<string name="closeNotifications">Chiudi notifica(e)</string>
|
|
||||||
<string name="notificationCloseActionExplanation">Se non specifichi alcun criterio, questa azione chiuderà TUTTE le notifiche. Quindi si consiglia di specificare almeno i criteri per almeno 1 di applicazione, titolo o testo.</string>
|
|
||||||
<string name="profileWarning">Le impostazioni che fai qui possono far sì che tu non noti più certe cose dal tuo telefono. Possono anche mettere a tacere la sveglia. Quindi, qualunque cosa tu faccia, ti consigliamo di testarlo.</string>
|
|
||||||
<string name="ifString">se</string>
|
|
||||||
<string name="actionMediaControlNotice">Tieni presente che questa azione potrebbe non funzionare con TUTTI i giocatori là fuori. E anche se lo fa, non tutti i pulsanti funzionano necessariamente.</string>
|
|
||||||
<string name="pleaseSelectActionValue">Seleziona un\'azione!</string>
|
|
||||||
<string name="stop">fermarsi</string>
|
|
||||||
<string name="android.permission.MEDIA_CONTENT_CONTROL">Controllare la riproduzione multimediale</string>
|
|
||||||
<string name="next">prossimo</string>
|
|
||||||
<string name="previous">precedente</string>
|
|
||||||
<string name="pause">pausa</string>
|
|
||||||
<string name="play">giocare</string>
|
|
||||||
<string name="playPause">attiva/disattiva riproduzione/pausa</string>
|
|
||||||
<string name="selectCommand">Seleziona comando</string>
|
|
||||||
<string name="actionMediaControl">Controllare la riproduzione multimediale</string>
|
|
||||||
<string name="featureCeasedToWorkLastWorkingAndroidVersion">A causa della saggezza infinita di Google, l\'ultima versione di Android su cui questa funzione è nota per funzionare è %1 $s. Puoi configurarlo, ma probabilmente non avrà alcun effetto.</string>
|
|
||||||
<string name="screenState">Stato dello schermo</string>
|
|
||||||
<string name="selectDesiredState">Seleziona lo stato desiderato</string>
|
|
||||||
<string name="unlocked">Sbloccato</string>
|
|
||||||
<string name="off">spento</string>
|
|
||||||
<string name="on">attivo</string>
|
|
||||||
<string name="screenIs">lo schermo è %1$s</string>
|
|
||||||
<string name="sendEmailToDev">Invia email allo sviluppatore</string>
|
|
||||||
<string name="controlCenter">Centro di controllo</string>
|
|
||||||
<string name="emailContactNotice">L\'e-mail è il mio metodo di contatto preferito per segnalare bug, porre domande o fare proposte. Vai al centro di controllo per saperne di più.</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<string name="end">Einde</string>
|
<string name="end">Einde</string>
|
||||||
<string name="save">Opslaan</string>
|
<string name="save">Opslaan</string>
|
||||||
<string name="urlToTrigger">URL om te activeren:</string>
|
<string name="urlToTrigger">URL om te activeren:</string>
|
||||||
<string name="urlLegend">Variabelen:U kunt de volgende variabelen gebruiken. Bij het triggeren zullen ze worden vervangen door de corresponderende waarde op je apparaat. Zet de haakjes in uw tekst. \n[uniqueid] - Het unieke id van uw apparaat[serialnr] - Het serienummer van uw apparaat (< Android 9)[latitude] - De breedtegraad van uw apparaat[longitude] - De lengtegraad van uw apparaat[phonenr] - Nummer van het laatste inkomende of uitgaande gesprek[d] - Dag van de maand, 2 cijfers met voorloopnullen[m] - Numerieke weergave van een maand, met voorloopnullen[Y] - een volledige numerieke weergave van een jaar, 4 cijfers[h] - 12-uurs indeling van een uur, met voorloopnullen[H] - 24-uurs indeling van een uur, met voorloopnullen[i] - minuten, met voorloopnullen[s] - seconden, met voorloopnullen[ms] - milliseconden[notificationTitle] - titel van de laatste melding[notificationText] - tekst van de laatste melding</string>
|
<string name="urlLegend">Variabelen:U kunt de volgende variabelen gebruiken. Bij het triggeren zullen ze worden vervangen door de corresponderende waarde op je apparaat. Zet de haakjes in uw tekst. \n[uniqueid] - Het unieke id van uw apparaat[serienummer] - Het serienummer van uw apparaat[latitude] - De breedtegraad van uw apparaat[longitude] - De lengtegraad van uw apparaat[phonenr] - Nummer van het laatste inkomende of uitgaande gesprek[d] - Dag van de maand, 2 cijfers met voorloopnullen[m] - Numerieke weergave van een maand, met voorloopnullen[Y] - een volledige numerieke weergave van een jaar, 4 cijfers[h] - 12-uurs indeling van een uur, met voorloopnullen[H] - 24-uurs indeling van een uur, met voorloopnullen[i] - minuten, met voorloopnullen[s] - seconden, met voorloopnullen[ms] - milliseconden[notificationTitle] - titel van de laatste melding[notificationText] - tekst van de laatste melding</string>
|
||||||
<string name="wifi">wifi</string>
|
<string name="wifi">wifi</string>
|
||||||
<string name="activating">Activeren</string>
|
<string name="activating">Activeren</string>
|
||||||
<string name="deactivating">Deactiveren</string>
|
<string name="deactivating">Deactiveren</string>
|
||||||
@ -401,7 +401,7 @@
|
|||||||
<string name="startNewThreadForRuleExecution">Start nieuw process voor activatie regel.</string>
|
<string name="startNewThreadForRuleExecution">Start nieuw process voor activatie regel.</string>
|
||||||
<string name="newThreadRules">Nieuw process</string>
|
<string name="newThreadRules">Nieuw process</string>
|
||||||
<string name="showIcon">Pictogram tonen</string>
|
<string name="showIcon">Pictogram tonen</string>
|
||||||
<string name="showIconWhenServiceIsRunning">Pictogram tonen als de service draait (verbergen werkt alleen onder Android 7). Als u een hogere versie gebruikt, gaat u naar systeeminstellingen, vervolgens automatisering, vervolgens meldingen en schakelt u de \"Service notification\" uit.</string>
|
<string name="showIconWhenServiceIsRunning">Pictogram tonen als de service draait (verbergen werkt alleen onder Android 7)</string>
|
||||||
<string name="ruleHistory">Regelgeschiedenis (meest recente eerst):</string>
|
<string name="ruleHistory">Regelgeschiedenis (meest recente eerst):</string>
|
||||||
<string name="someOptionsNotAvailableYet">Sommige opties zijn uitgeschakeld omdat ze nog niet gebruikt kunnen worden. Ze zullen in een latere programmaversie worden geïntroduceerd.</string>
|
<string name="someOptionsNotAvailableYet">Sommige opties zijn uitgeschakeld omdat ze nog niet gebruikt kunnen worden. Ze zullen in een latere programmaversie worden geïntroduceerd.</string>
|
||||||
<string name="lockSoundChanges">Geluidswijzigingen vergrendelen</string>
|
<string name="lockSoundChanges">Geluidswijzigingen vergrendelen</string>
|
||||||
@ -530,7 +530,7 @@
|
|||||||
<string name="selectSoundFile">Selecteer geluidsbestand</string>
|
<string name="selectSoundFile">Selecteer geluidsbestand</string>
|
||||||
<string name="fileDoesNotExist">Bestand bestaat niet.</string>
|
<string name="fileDoesNotExist">Bestand bestaat niet.</string>
|
||||||
<string name="noFileManageInstalled">Geen bestandsmanager geïnstalleerd.</string>
|
<string name="noFileManageInstalled">Geen bestandsmanager geïnstalleerd.</string>
|
||||||
<string name="shareConfigAndLogFilesWithDev">Config en log vastmaken</string>
|
<string name="shareConfigAndLogFilesWithDev">Deel config en log bestanden met ontwikkelaar (via email).</string>
|
||||||
<string name="shareConfigAndLogExplanation">Dit zal een nieuwe email starten met uw configuratie en log bestanden als zip bestand bijgevoegd. Het zal niet automatisch verzonden worden, je moet nog steeds op "verzenden" drukken. U kunt ook de ontvanger veranderen in bijvoorbeeld uzelf.</string>
|
<string name="shareConfigAndLogExplanation">Dit zal een nieuwe email starten met uw configuratie en log bestanden als zip bestand bijgevoegd. Het zal niet automatisch verzonden worden, je moet nog steeds op "verzenden" drukken. U kunt ook de ontvanger veranderen in bijvoorbeeld uzelf.</string>
|
||||||
<string name="startAppChoiceNote">Hier heeft u 2 algemene opties:. Je kunt een programma starten door een activiteit te selecteren. Stel je dit voor als het voorselecteren van een specifiek scherm/venster van een applicatie. Onthoud dat dit niet altijd zal werken. Dit komt omdat de vensters van een toepassing met elkaar kunnen interageren, bv. parameters doorgeven. Bij het botweg starten van een specifiek scherm heeft die interactie niet plaatsgevonden en kan het venster direct sluiten (waardoor het nooit echt getoond wordt). Probeer het desondanks! Je kunt een activiteitspad handmatig invoeren, maar het is aan te bevelen om de knop "Kiezen" te gebruiken. Als u besluit het pad handmatig in te voeren, voer dan in het bovenste veld de pakketnaam van de toepassing in en in het onderste veld het volledige pad van de activiteit.. Selectie door actie In tegenstelling tot het selecteren van een specifiek venster kunt u een programma ook door een actie starten. Dit is hetzelfde als roepen "Ik zou graag xyz willen" en als er een programma is geïnstalleerd dat u daarbij kan helpen, wordt het gestart. Een goed voorbeeld zou kunnen zijn start browser - je kunt er zelfs meerdere geïnstalleerd hebben (een is meestal de standaard). U moet dit handmatig invoeren, PackageName is hier optioneel. Houd in gedachten dat er geen variabelen zullen worden opgelost. Als je bijvoorbeeld de camera wilt starten met "MediaStore.ACTION_IMAGE_CAPTURE" zal dat niet werken. U moet een kijkje nemen in de Android documentatie en in plaats daarvan de werkelijke waarde van deze variabele gebruiken, die in dit voorbeeld zou zijn: "android.media.action.IMAGE_CAPTURE"</string>
|
<string name="startAppChoiceNote">Hier heeft u 2 algemene opties:. Je kunt een programma starten door een activiteit te selecteren. Stel je dit voor als het voorselecteren van een specifiek scherm/venster van een applicatie. Onthoud dat dit niet altijd zal werken. Dit komt omdat de vensters van een toepassing met elkaar kunnen interageren, bv. parameters doorgeven. Bij het botweg starten van een specifiek scherm heeft die interactie niet plaatsgevonden en kan het venster direct sluiten (waardoor het nooit echt getoond wordt). Probeer het desondanks! Je kunt een activiteitspad handmatig invoeren, maar het is aan te bevelen om de knop "Kiezen" te gebruiken. Als u besluit het pad handmatig in te voeren, voer dan in het bovenste veld de pakketnaam van de toepassing in en in het onderste veld het volledige pad van de activiteit.. Selectie door actie In tegenstelling tot het selecteren van een specifiek venster kunt u een programma ook door een actie starten. Dit is hetzelfde als roepen "Ik zou graag xyz willen" en als er een programma is geïnstalleerd dat u daarbij kan helpen, wordt het gestart. Een goed voorbeeld zou kunnen zijn start browser - je kunt er zelfs meerdere geïnstalleerd hebben (een is meestal de standaard). U moet dit handmatig invoeren, PackageName is hier optioneel. Houd in gedachten dat er geen variabelen zullen worden opgelost. Als je bijvoorbeeld de camera wilt starten met "MediaStore.ACTION_IMAGE_CAPTURE" zal dat niet werken. U moet een kijkje nemen in de Android documentatie en in plaats daarvan de werkelijke waarde van deze variabele gebruiken, die in dit voorbeeld zou zijn: "android.media.action.IMAGE_CAPTURE"</string>
|
||||||
<string name="errorRunningRule">Er is een fout opgetreden bij het uitvoeren van een regel.</string>
|
<string name="errorRunningRule">Er is een fout opgetreden bij het uitvoeren van een regel.</string>
|
||||||
@ -645,7 +645,7 @@
|
|||||||
<string name="profileActive">profile %1$s is actief</string>
|
<string name="profileActive">profile %1$s is actief</string>
|
||||||
<string name="profileNotActive">profile %1$s is niet 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="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 %1$s verwijst naar het profiel %2$s.</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="profileCouldNotBeDeleted">Profiel kan niet worden verwijderd.</string>
|
||||||
<string name="noRepetition">geen herhaling</string>
|
<string name="noRepetition">geen herhaling</string>
|
||||||
<string name="usingAuthentication">authenticatie gebruiken</string>
|
<string name="usingAuthentication">authenticatie gebruiken</string>
|
||||||
@ -657,35 +657,4 @@
|
|||||||
<string name="pickActivityManually">Handmatig kiezen</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="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>
|
<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>
|
||||||
<string name="info">Info</string>
|
|
||||||
<string name="profileWasNotFound">Het profiel dat in deze regel wordt gebruikt, lijkt niet meer te bestaan. De alfabetisch eerste is geselecteerd.</string>
|
|
||||||
<string name="enterText">Voer een tekst in.</string>
|
|
||||||
<string name="enterTitle">Voer een titel in.</string>
|
|
||||||
<string name="createNotification">Melding maken</string>
|
|
||||||
<string name="notificationCloseActionExplanation">Als u geen criteria opgeeft, worden met deze actie ALLE meldingen gesloten. Het is dus aan te raden om in ieder geval criteria te specificeren voor minimaal 1 van de toepassing, titel of tekst.</string>
|
|
||||||
<string name="closeNotifications">Melding(en) sluiten</string>
|
|
||||||
<string name="comparisonCaseInsensitive">Vergelijkingen worden gedaan case-INsensitief</string>
|
|
||||||
<string name="profileWarning">De instellingen die je hier maakt kunnen ervoor zorgen dat je bepaalde dingen niet meer van je telefoon merkt. Ze kunnen zelfs je wekker dempen. Dus wat je ook doet - het wordt aanbevolen om het te testen.</string>
|
|
||||||
<string name="ifString">als</string>
|
|
||||||
<string name="emailContactNotice">E-mail is mijn favoriete contactmethode om bugs te melden, vragen te stellen of voorstellen te doen. Ga naar het controlecentrum voor meer informatie.</string>
|
|
||||||
<string name="controlCenter">Controlecentrum</string>
|
|
||||||
<string name="sendEmailToDev">Stuur een e-mail naar de ontwikkelaar</string>
|
|
||||||
<string name="screenIs">scherm is %1$s</string>
|
|
||||||
<string name="on">op</string>
|
|
||||||
<string name="off">af</string>
|
|
||||||
<string name="unlocked">ontgrendeld</string>
|
|
||||||
<string name="selectDesiredState">Selecteer de gewenste status</string>
|
|
||||||
<string name="screenState">Schermstatus</string>
|
|
||||||
<string name="featureCeasedToWorkLastWorkingAndroidVersion">Vanwege de oneindige wijsheid van Google is de laatste Android-versie waarvan bekend is dat deze functie werkt% 1 $ s. U kunt het configureren, maar het zal waarschijnlijk geen effect hebben.</string>
|
|
||||||
<string name="actionMediaControl">Het afspelen van media regelen</string>
|
|
||||||
<string name="selectCommand">Opdracht Selecteren</string>
|
|
||||||
<string name="playPause">schakelaar afspelen/pauzeren</string>
|
|
||||||
<string name="play">afspelen</string>
|
|
||||||
<string name="pause">pauzeren</string>
|
|
||||||
<string name="previous">vorig</string>
|
|
||||||
<string name="next">volgend</string>
|
|
||||||
<string name="android.permission.MEDIA_CONTENT_CONTROL">Het afspelen van media regelen</string>
|
|
||||||
<string name="stop">stoppen</string>
|
|
||||||
<string name="pleaseSelectActionValue">Selecteer een actie!</string>
|
|
||||||
<string name="actionMediaControlNotice">Houd er rekening mee dat deze actie mogelijk niet werkt met ALLE spelers die er zijn. En zelfs als dat zo is, werkt niet elke knop noodzakelijkerwijs.</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -14,6 +14,4 @@
|
|||||||
<color name="brightScreenTextColor">#FFFFFF</color>
|
<color name="brightScreenTextColor">#FFFFFF</color>
|
||||||
<color name="darkScreenBackgroundColor">#444444</color>
|
<color name="darkScreenBackgroundColor">#444444</color>
|
||||||
<color name="darkScreenTextColor">#eeeeee</color>
|
<color name="darkScreenTextColor">#eeeeee</color>
|
||||||
<color name="red">#FF0000</color>
|
|
||||||
<color name="lightRed">#EC5959</color>
|
|
||||||
</resources>
|
</resources>
|
@ -70,7 +70,7 @@
|
|||||||
<string name="end">End</string>
|
<string name="end">End</string>
|
||||||
<string name="save">Save</string>
|
<string name="save">Save</string>
|
||||||
<string name="urlToTrigger">URL to trigger:</string>
|
<string name="urlToTrigger">URL to trigger:</string>
|
||||||
<string name="urlLegend">Variables:\nYou can use the following variables. Upon triggering they will be replaced with the corresponding value on your device. Include the brackets in your text.\n\n[uniqueid] - Your device\'s unique id\n[serialnr] - Your device\'s serial number (< Android 9)\n[latitude] - Your device\'s latitude\n[longitude] - Your device\'s longitude\n[phonenr] - Number of last incoming or outgoing call\n[d] - Day of the month, 2 digits with leading zeros\n[m] - Numeric representation of a month, with leading zeros\n[Y] - A full numeric representation of a year, 4 digits\n[h] - 12-hour format of an hour with leading zeros\n[H] - 24-hour format of an hour with leading zeros\n[i] - Minutes with leading zeros\n[s] - Seconds, with leading zeros\n[ms] - milliseconds\n[notificationTitle] - title of last notification\n[notificationText] - text of last notification</string>
|
<string name="urlLegend">Variables:\nYou can use the following variables. Upon triggering they will be replaced with the corresponding value on your device. Include the brackets in your text.\n\n[uniqueid] - Your device\'s unique id\n[serialnr] - Your device\'s serial number\n[latitude] - Your device\'s latitude\n[longitude] - Your device\'s longitude\n[phonenr] - Number of last incoming or outgoing call\n[d] - Day of the month, 2 digits with leading zeros\n[m] - Numeric representation of a month, with leading zeros\n[Y] - A full numeric representation of a year, 4 digits\n[h] - 12-hour format of an hour with leading zeros\n[H] - 24-hour format of an hour with leading zeros\n[i] - Minutes with leading zeros\n[s] - Seconds, with leading zeros\n[ms] - milliseconds\n[notificationTitle] - title of last notification\n[notificationText] - text of last notification</string>
|
||||||
<string name="wifi">wifi</string>
|
<string name="wifi">wifi</string>
|
||||||
<string name="activating">Activating</string>
|
<string name="activating">Activating</string>
|
||||||
<string name="deactivating">Deactivating</string>
|
<string name="deactivating">Deactivating</string>
|
||||||
@ -496,7 +496,7 @@
|
|||||||
<string name="startNewThreadForRuleExecution">Start new thread for rule activation.</string>
|
<string name="startNewThreadForRuleExecution">Start new thread for rule activation.</string>
|
||||||
<string name="newThreadRules">New thread</string>
|
<string name="newThreadRules">New thread</string>
|
||||||
<string name="showIcon">Show icon</string>
|
<string name="showIcon">Show icon</string>
|
||||||
<string name="showIconWhenServiceIsRunning">Show icon when service is running (hiding it only works below Android 7). If you\'re on a higher version, go to system settings, then Automation, then notifications and disable the \"Service notification\".</string>
|
<string name="showIconWhenServiceIsRunning">Show icon when service is running (hiding it only works below Android 7)</string>
|
||||||
<string name="ruleHistory">Rule history (most recent first):</string>
|
<string name="ruleHistory">Rule history (most recent first):</string>
|
||||||
<string name="someOptionsNotAvailableYet">Some options are disabled as they cannot be used, yet. They will be introduced in a later program version.</string>
|
<string name="someOptionsNotAvailableYet">Some options are disabled as they cannot be used, yet. They will be introduced in a later program version.</string>
|
||||||
<string name="lockSoundChanges">Lock sound changes</string>
|
<string name="lockSoundChanges">Lock sound changes</string>
|
||||||
@ -631,7 +631,7 @@
|
|||||||
<string name="selectSoundFile">Select sound file</string>
|
<string name="selectSoundFile">Select sound file</string>
|
||||||
<string name="fileDoesNotExist">File does not exist.</string>
|
<string name="fileDoesNotExist">File does not exist.</string>
|
||||||
<string name="noFileManageInstalled">No file manager installed.</string>
|
<string name="noFileManageInstalled">No file manager installed.</string>
|
||||||
<string name="shareConfigAndLogFilesWithDev">Attach config and log files.</string>
|
<string name="shareConfigAndLogFilesWithDev">Share config and log files with developer (via email).</string>
|
||||||
<string name="shareConfigAndLogExplanation">This will start a new email with your config and log files attached as zip file. It will not be sent automatically, you still need to hit \"send\". You can also change the recipient to yourself for example.</string>
|
<string name="shareConfigAndLogExplanation">This will start a new email with your config and log files attached as zip file. It will not be sent automatically, you still need to hit \"send\". You can also change the recipient to yourself for example.</string>
|
||||||
<string name="startAppChoiceNote">Here you have 2 general options:\n\n1. You can start a program by selecting an activity. Imagine this like preselecting a specific screen/window of an application. Keep in mind this may not always work. This is because the windows of an app might interact with each other, e.g. pass on parameters. When bluntly starting a specific screen that interaction has not happened and the window might close instantly (therefore it\'s never really shown). Try it nevertheless! You can enter an activity path manually, but it\'s recommended to use the \"Select\" button. If you decide to enter it manually enter the app\'s package name in the upper field and the full path of the activity in the lower one.\n\n2. Selection by action In contrast to selecting a specific window you can also start a program by an action. This is like shouting out \"I\'d would like xyz\" and if there\'s an app installed that can help you with that it will be started. A good example would be start browser - you might even have multiple installed (one is usually the default one). You need to enter this manually, PackageName is optional here. Keep in mind no variables will be resolved. If you want to start the camera for example using \"MediaStore.ACTION_IMAGE_CAPTURE\" will not work. You have to take a look at the Android documentation and use this variable\'s actual value instead which in this example would be \"android.media.action.IMAGE_CAPTURE\".</string>
|
<string name="startAppChoiceNote">Here you have 2 general options:\n\n1. You can start a program by selecting an activity. Imagine this like preselecting a specific screen/window of an application. Keep in mind this may not always work. This is because the windows of an app might interact with each other, e.g. pass on parameters. When bluntly starting a specific screen that interaction has not happened and the window might close instantly (therefore it\'s never really shown). Try it nevertheless! You can enter an activity path manually, but it\'s recommended to use the \"Select\" button. If you decide to enter it manually enter the app\'s package name in the upper field and the full path of the activity in the lower one.\n\n2. Selection by action In contrast to selecting a specific window you can also start a program by an action. This is like shouting out \"I\'d would like xyz\" and if there\'s an app installed that can help you with that it will be started. A good example would be start browser - you might even have multiple installed (one is usually the default one). You need to enter this manually, PackageName is optional here. Keep in mind no variables will be resolved. If you want to start the camera for example using \"MediaStore.ACTION_IMAGE_CAPTURE\" will not work. You have to take a look at the Android documentation and use this variable\'s actual value instead which in this example would be \"android.media.action.IMAGE_CAPTURE\".</string>
|
||||||
<string name="errorRunningRule">There was an error running a rule.</string>
|
<string name="errorRunningRule">There was an error running a rule.</string>
|
||||||
@ -743,7 +743,7 @@
|
|||||||
<string name="profileActive">profile %1$s is active</string>
|
<string name="profileActive">profile %1$s is active</string>
|
||||||
<string name="profileNotActive">profile %1$s is not 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="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 %1$s is referencing profile %2$s.</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="profileCouldNotBeDeleted">Profile could not be deleted.</string>
|
||||||
<string name="noRepetition">no repetition</string>
|
<string name="noRepetition">no repetition</string>
|
||||||
<string name="usingAuthentication">using authentication</string>
|
<string name="usingAuthentication">using authentication</string>
|
||||||
@ -755,35 +755,4 @@
|
|||||||
<string name="pickActivityManually">Choose manually</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="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>
|
<string name="launcherNotFound">A launcher activity of this app could not be identified. You will have to pick one manually.</string>
|
||||||
<string name="createNotification">Create notification</string>
|
|
||||||
<string name="enterTitle">Enter a title.</string>
|
|
||||||
<string name="enterText">Enter a text.</string>
|
|
||||||
<string name="info">Info</string>
|
|
||||||
<string name="profileWasNotFound">The profile used in this rule doesn\'t seem to exist anymore. The alphabetically first one has been selected.</string>
|
|
||||||
<string name="notificationCloseActionExplanation">If you don\'t specify any criteria this action will close ALL notifications. So it\'s advised to at least specify criteria for at least 1 of application, title or text.</string>
|
|
||||||
<string name="closeNotifications">Close notification(s)</string>
|
|
||||||
<string name="comparisonCaseInsensitive">Comparisons are done case-INsensitive</string>
|
|
||||||
<string name="profileWarning">The settings you can adjust here, can cause that you don\'t notice certain things from your phone anymore. They may even silence your wakeup alarm. So whatever you do - it is recommended you test it.</string>
|
|
||||||
<string name="ifString">if</string>
|
|
||||||
<string name="emailContactNotice">Email is my preferred method of contact to report bugs, ask questions or make proposals. Go to control center to learn more.</string>
|
|
||||||
<string name="controlCenter">Control center</string>
|
|
||||||
<string name="sendEmailToDev">Send email to developer</string>
|
|
||||||
<string name="screenIs">screen is %1$s</string>
|
|
||||||
<string name="on">on</string>
|
|
||||||
<string name="off">off</string>
|
|
||||||
<string name="unlocked">unlocked</string>
|
|
||||||
<string name="selectDesiredState">Select desired state</string>
|
|
||||||
<string name="screenState">Screen state</string>
|
|
||||||
<string name="featureCeasedToWorkLastWorkingAndroidVersion">Because of Google\'s infinite wisdom, the last Android version this feature is known to work on is %1$s. You can configure it, but it probably will not have any effect.</string>
|
|
||||||
<string name="actionMediaControl">Control media playback</string>
|
|
||||||
<string name="selectCommand">Select command</string>
|
|
||||||
<string name="playPause">toggle play/pause</string>
|
|
||||||
<string name="play">play</string>
|
|
||||||
<string name="pause">pause</string>
|
|
||||||
<string name="previous">previous</string>
|
|
||||||
<string name="next">next</string>
|
|
||||||
<string name="android.permission.MEDIA_CONTENT_CONTROL">Control media playback</string>
|
|
||||||
<string name="stop">stop</string>
|
|
||||||
<string name="pleaseSelectActionValue">Please select an action!</string>
|
|
||||||
<string name="actionMediaControlNotice">Keep in mind that this action may not work with ALL players out there. And even if it does, not every buttons does necessarily work.</string>
|
|
||||||
</resources>
|
</resources>
|
@ -5,7 +5,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.1.0'
|
classpath 'com.android.tools.build:gradle:7.0.4'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
1
fastlane/metadata/android/de-DE/changelogs/117.txt
Normal file
1
fastlane/metadata/android/de-DE/changelogs/117.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
* Fehler beim Setzen des Klingelmodus behoben
|
@ -20,7 +20,6 @@ Mögliche Auslöser:
|
|||||||
* Telefongespräch im Gange
|
* Telefongespräch im Gange
|
||||||
* Benachrichtigungen anderer Anwendungen
|
* Benachrichtigungen anderer Anwendungen
|
||||||
* Geräteausrichtung (Gyroskop)
|
* Geräteausrichtung (Gyroskop)
|
||||||
* Profile aktiv oder nicht
|
|
||||||
|
|
||||||
Mögliche Aktionen:
|
Mögliche Aktionen:
|
||||||
* WLAN ein-/ausschalten
|
* WLAN ein-/ausschalten
|
||||||
@ -41,7 +40,6 @@ Mögliche Aktionen:
|
|||||||
* Bildschirmhelligkeit ändern
|
* Bildschirmhelligkeit ändern
|
||||||
* SMS verschicken
|
* SMS verschicken
|
||||||
* Sounddatei abspielen.
|
* Sounddatei abspielen.
|
||||||
* Benachrichtigungen erstellen
|
|
||||||
|
|
||||||
Es ist ziemlich schwierig diese Anwendung über die vielen verschiedenen Geräte und Android Versionen am Laufen zu halten. Ich kann vieles im Emulator testen, aber eben nicht alles.
|
Es ist ziemlich schwierig diese Anwendung über die vielen verschiedenen Geräte und Android Versionen am Laufen zu halten. Ich kann vieles im Emulator testen, aber eben nicht alles.
|
||||||
Wenn also eine bestimmte Funktion nicht so tut wie sie sollte - lassen Sie es mich wissen. Über die Jahre habe ich noch alle Fehler behoben, die mir vernünftig gemeldet wurden. Aber dafür bin ich auf Ihre Mithilfe angewiesen.
|
Wenn also eine bestimmte Funktion nicht so tut wie sie sollte - lassen Sie es mich wissen. Über die Jahre habe ich noch alle Fehler behoben, die mir vernünftig gemeldet wurden. Aber dafür bin ich auf Ihre Mithilfe angewiesen.
|
||||||
|
@ -1,7 +1 @@
|
|||||||
* New trigger: screen state (on/off)
|
|
||||||
* New action: Create notification
|
* New action: Create notification
|
||||||
* New action: Close notification(s)
|
|
||||||
* New action: Control media playback
|
|
||||||
* Fixed: Translation bug in dutch variables text
|
|
||||||
* Fixed: Variables were not replaced when sending text messages
|
|
||||||
* Fixed: Service wouldn't always start after device has been powered on
|
|
@ -20,7 +20,6 @@ Supported triggers:
|
|||||||
* Phone call running
|
* Phone call running
|
||||||
* Notifications of other apps
|
* Notifications of other apps
|
||||||
* Device orientation (gyroscope)
|
* Device orientation (gyroscope)
|
||||||
* Profile active or not
|
|
||||||
|
|
||||||
Supported actions:
|
Supported actions:
|
||||||
* Change wifi state
|
* Change wifi state
|
||||||
@ -41,7 +40,6 @@ Supported actions:
|
|||||||
* Change screen brightness
|
* Change screen brightness
|
||||||
* Send text message
|
* Send text message
|
||||||
* Play sound file
|
* Play sound file
|
||||||
* Create notifications
|
|
||||||
|
|
||||||
It's quite hard to keep this app working across the many different hardwares as well as the many changes Android undergoes over the versions. I can test it in the emulator, but that cannot show all bugs.
|
It's quite hard to keep this app working across the many different hardwares as well as the many changes Android undergoes over the versions. I can test it in the emulator, but that cannot show all bugs.
|
||||||
So if a certain feature is not working on your device - let me know. Over the years I have fixed almost all bugs that have been reasonably reported to me. But for that I'm dependend on your input.
|
So if a certain feature is not working on your device - let me know. Over the years I have fixed almost all bugs that have been reasonably reported to me. But for that I'm dependend on your input.
|
||||||
|
1
fastlane/metadata/android/es-ES/changelogs/117.txt
Normal file
1
fastlane/metadata/android/es-ES/changelogs/117.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
* Se ha corregido un error en la configuración del modo de anillo
|
@ -20,7 +20,6 @@ Disparadores:
|
|||||||
* Llamado de teléfono activo
|
* Llamado de teléfono activo
|
||||||
* Notificaciónes de otras apps
|
* Notificaciónes de otras apps
|
||||||
* Orientación del dispositivo (giroscopio)
|
* Orientación del dispositivo (giroscopio)
|
||||||
* Perfil activado o no
|
|
||||||
|
|
||||||
Aciónes:
|
Aciónes:
|
||||||
* Pasar de wifi
|
* Pasar de wifi
|
||||||
@ -41,7 +40,6 @@ Aciónes:
|
|||||||
* Cambiar luminosidad del monitor
|
* Cambiar luminosidad del monitor
|
||||||
* Enviar mensaje
|
* Enviar mensaje
|
||||||
* Tocar archivo sonido
|
* Tocar archivo sonido
|
||||||
* Crear notificaciones
|
|
||||||
|
|
||||||
Es muy dificil mantener esta applicación functionando en todos los hardwares y versiónes de Android. Puedo probrar mucho en el emulator, pero no puedo enviar todos los errores.
|
Es muy dificil mantener esta applicación functionando en todos los hardwares y versiónes de Android. Puedo probrar mucho en el emulator, pero no puedo enviar todos los errores.
|
||||||
Si una función no funcióna - digame. En muchos años resolvaba la mayoria de los errores que los halladores me informaron bien. Pero dependo en su ayuda.
|
Si una función no funcióna - digame. En muchos años resolvaba la mayoria de los errores que los halladores me informaron bien. Pero dependo en su ayuda.
|
||||||
|
1
fastlane/metadata/android/it-IT/changelogs/117.txt
Normal file
1
fastlane/metadata/android/it-IT/changelogs/117.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
* Risolto un bug nell'impostazione della modalità anello
|
@ -20,7 +20,6 @@ Eventi supportati:
|
|||||||
* Chiamata in esecuzione
|
* Chiamata in esecuzione
|
||||||
* Notificazione di un altra applicazione
|
* Notificazione di un altra applicazione
|
||||||
* Orientamento del dispositivo (giroscopio)
|
* Orientamento del dispositivo (giroscopio)
|
||||||
* Profilo attivo o meno
|
|
||||||
|
|
||||||
Azioni supportate:
|
Azioni supportate:
|
||||||
* Cambia lo stato del wifi
|
* Cambia lo stato del wifi
|
||||||
@ -41,7 +40,6 @@ Azioni supportate:
|
|||||||
* Cambia la luminosità dello schermo
|
* Cambia la luminosità dello schermo
|
||||||
* Manda un messaggio di testo
|
* Manda un messaggio di testo
|
||||||
* Esegui un file musicale
|
* Esegui un file musicale
|
||||||
* Creare notifiche
|
|
||||||
|
|
||||||
È 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.
|
È 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.
|
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.
|
||||||
|
1
fastlane/metadata/android/nl-NL/changelogs/117.txt
Normal file
1
fastlane/metadata/android/nl-NL/changelogs/117.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
* Een bug opgelost in de ringmodus instellen
|
@ -22,7 +22,6 @@ Ondersteunde triggers:
|
|||||||
* Lopend telefoongesprek
|
* Lopend telefoongesprek
|
||||||
* Meldingen van andere apps
|
* Meldingen van andere apps
|
||||||
* Apparaat oriëntatie (gyroscoop)
|
* Apparaat oriëntatie (gyroscoop)
|
||||||
* Profiel actief of niet
|
|
||||||
|
|
||||||
Ondersteunde acties:
|
Ondersteunde acties:
|
||||||
* Wijzig wifi status
|
* Wijzig wifi status
|
||||||
@ -43,7 +42,6 @@ Ondersteunde acties:
|
|||||||
* Verander de helderheid van het scherm
|
* Verander de helderheid van het scherm
|
||||||
* Verstuur tekstbericht
|
* Verstuur tekstbericht
|
||||||
* Geluidsbestand afspelen
|
* Geluidsbestand afspelen
|
||||||
* Meldingen maken
|
|
||||||
|
|
||||||
Het is lastig om deze App werkend te houden over de vele verschillende hardware en de vele veranderingen die Android ondergaat in de loop der versies.
|
Het is lastig om deze App werkend te houden over de vele verschillende hardware en de vele veranderingen die Android ondergaat in de loop der versies.
|
||||||
Ik test het in een emulator, maar dat kan niet alle bugs laten zien.
|
Ik test het in een emulator, maar dat kan niet alle bugs laten zien.
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
||||||
|
Loading…
Reference in New Issue
Block a user