Compare commits
40 Commits
master
...
developmen
Author | SHA1 | Date | |
---|---|---|---|
92e58149a7 | |||
efaf0ed270 | |||
a9673e65b9 | |||
592abe5b0d | |||
dd7c3cb1d6 | |||
38665ccd92 | |||
c60347b990 | |||
1e7ccf5200 | |||
9b84b8dad7 | |||
a19c84ea51 | |||
3a14a56fd0 | |||
2dfc538343 | |||
67a58077cc | |||
df68f7ca5c | |||
ad18313284 | |||
29a93e0e43 | |||
a5d54c18d8 | |||
62f5ad0005 | |||
4eb7133d9d | |||
343cbba8f8 | |||
51caae0794 | |||
e39a2411ba | |||
98b49036a7 | |||
a7c4cc0965 | |||
5d67452486 | |||
7e12a0f3e5 | |||
5786c1bfd4 | |||
cf500c740e | |||
41efa7c11b | |||
965bf55811 | |||
13fd4c2aae | |||
195a60cfe0 | |||
76563eb89b | |||
7733d57435 | |||
481e4d1896 | |||
5af59e1754 | |||
619f348a28 | |||
9bf353ea3a | |||
af90b566c8 | |||
0e51c577d5 |
@ -11,8 +11,8 @@ android {
|
|||||||
compileSdkVersion 31
|
compileSdkVersion 31
|
||||||
buildToolsVersion '29.0.2'
|
buildToolsVersion '29.0.2'
|
||||||
useLibrary 'org.apache.http.legacy'
|
useLibrary 'org.apache.http.legacy'
|
||||||
versionCode 119
|
versionCode 120
|
||||||
versionName "1.7.5"
|
versionName "1.7.6"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@ -28,7 +28,6 @@ android {
|
|||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
flavorDimensions "version"
|
flavorDimensions "version"
|
||||||
|
|
||||||
productFlavors
|
productFlavors
|
||||||
@ -57,6 +56,7 @@ android {
|
|||||||
abortOnError false
|
abortOnError false
|
||||||
checkReleaseBuilds false
|
checkReleaseBuilds false
|
||||||
}
|
}
|
||||||
|
namespace 'com.jens.automation2'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="com.jens.automation2">
|
|
||||||
|
|
||||||
<supports-screens
|
<supports-screens
|
||||||
android:anyDensity="true"
|
android:anyDensity="true"
|
||||||
@ -159,12 +158,14 @@
|
|||||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||||
<activity android:name=".ActivityControlCenter" />
|
<activity android:name=".ActivityControlCenter" />
|
||||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||||
|
<activity android:name=".ActivityManageTriggerBroadcast" />
|
||||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||||
<activity android:name=".ActivityManageActionCreateNotification" />
|
<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 android:name=".ActivityManageActionControlMedia" />
|
||||||
|
<activity android:name=".ActivityManageActionSendBroadcast" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ActivityMainTabLayout"
|
android:name=".ActivityMainTabLayout"
|
||||||
android:launchMode="singleTask">
|
android:launchMode="singleTask">
|
||||||
|
@ -12,6 +12,7 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import com.google.android.gms.location.DetectedActivity;
|
import com.google.android.gms.location.DetectedActivity;
|
||||||
import com.jens.automation2.receivers.ActivityDetectionReceiver;
|
import com.jens.automation2.receivers.ActivityDetectionReceiver;
|
||||||
|
import com.jens.automation2.receivers.BroadcastListener;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
@ -348,6 +349,10 @@ public class Rule implements Comparable<Rule>
|
|||||||
if(oneTrigger.getTimeFrame().repetition > 0)
|
if(oneTrigger.getTimeFrame().repetition > 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if(oneTrigger.getTriggerType().equals(Trigger.Trigger_Enum.broadcastReceived))
|
||||||
|
{
|
||||||
|
return oneTrigger.getTriggerParameter() == BroadcastListener.getInstance().hasBroadcastOccurredSince(oneTrigger.getTriggerParameter2(), getLastExecution());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -386,7 +391,8 @@ public class Rule implements Comparable<Rule>
|
|||||||
if (!oneTrigger.applies(null, context))
|
if (!oneTrigger.applies(null, context))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Miscellaneous.logEvent("i", String.format(context.getResources().getString(R.string.ruleCheckOf), this.getName()), String.format("Rule %1$s generally applies currently. Checking if it's really due, yet will be done separately.", this.getName()), 3);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="com.jens.automation2">
|
|
||||||
|
|
||||||
<supports-screens
|
<supports-screens
|
||||||
android:anyDensity="true"
|
android:anyDensity="true"
|
||||||
@ -157,12 +156,14 @@
|
|||||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||||
<activity android:name=".ActivityControlCenter" />
|
<activity android:name=".ActivityControlCenter" />
|
||||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||||
|
<activity android:name=".ActivityManageTriggerBroadcast" />
|
||||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||||
<activity android:name=".ActivityManageActionCreateNotification" />
|
<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 android:name=".ActivityManageActionControlMedia" />
|
||||||
|
<activity android:name=".ActivityManageActionSendBroadcast" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ActivityMainTabLayout"
|
android:name=".ActivityMainTabLayout"
|
||||||
android:launchMode="singleTask">
|
android:launchMode="singleTask">
|
||||||
|
@ -10,6 +10,7 @@ import android.os.Looper;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.jens.automation2.receivers.BroadcastListener;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -345,6 +346,10 @@ public class Rule implements Comparable<Rule>
|
|||||||
if(oneTrigger.getTimeFrame().repetition > 0)
|
if(oneTrigger.getTimeFrame().repetition > 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if(oneTrigger.getTriggerType().equals(Trigger.Trigger_Enum.broadcastReceived))
|
||||||
|
{
|
||||||
|
return oneTrigger.getTriggerParameter() == BroadcastListener.getInstance().hasBroadcastOccurredSince(oneTrigger.getTriggerParameter2(), getLastExecution());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -383,7 +388,8 @@ public class Rule implements Comparable<Rule>
|
|||||||
if (!oneTrigger.applies(null, context))
|
if (!oneTrigger.applies(null, context))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Miscellaneous.logEvent("i", String.format(context.getResources().getString(R.string.ruleCheckOf), this.getName()), String.format("Rule %1$s generally applies currently. Checking if it's really due, yet will be done separately.", this.getName()), 3);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
package="com.jens.automation2">
|
|
||||||
|
|
||||||
<supports-screens
|
<supports-screens
|
||||||
android:anyDensity="true"
|
android:anyDensity="true"
|
||||||
@ -65,7 +64,6 @@
|
|||||||
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
|
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
|
||||||
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
|
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
||||||
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
@ -145,12 +143,14 @@
|
|||||||
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
<activity android:name=".ActivityManageTriggerTimeFrame" />
|
||||||
<activity android:name=".ActivityControlCenter" />
|
<activity android:name=".ActivityControlCenter" />
|
||||||
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
<activity android:name=".ActivityManageTriggerPhoneCall" />
|
||||||
|
<activity android:name=".ActivityManageTriggerBroadcast" />
|
||||||
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
<activity android:name=".ActivityManageActionBrightnessSetting" />
|
||||||
<activity android:name=".ActivityManageActionCreateNotification" />
|
<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 android:name=".ActivityManageActionControlMedia" />
|
||||||
|
<activity android:name=".ActivityManageActionSendBroadcast" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ActivityMainTabLayout"
|
android:name=".ActivityMainTabLayout"
|
||||||
android:launchMode="singleTask">
|
android:launchMode="singleTask">
|
||||||
|
@ -12,6 +12,7 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import com.google.android.gms.location.DetectedActivity;
|
import com.google.android.gms.location.DetectedActivity;
|
||||||
import com.jens.automation2.receivers.ActivityDetectionReceiver;
|
import com.jens.automation2.receivers.ActivityDetectionReceiver;
|
||||||
|
import com.jens.automation2.receivers.BroadcastListener;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
@ -348,6 +349,10 @@ public class Rule implements Comparable<Rule>
|
|||||||
if(oneTrigger.getTimeFrame().repetition > 0)
|
if(oneTrigger.getTimeFrame().repetition > 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if(oneTrigger.getTriggerType().equals(Trigger.Trigger_Enum.broadcastReceived))
|
||||||
|
{
|
||||||
|
return oneTrigger.getTriggerParameter() == BroadcastListener.getInstance().hasBroadcastOccurredSince(oneTrigger.getTriggerParameter2(), getLastExecution());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -386,7 +391,8 @@ public class Rule implements Comparable<Rule>
|
|||||||
if (!oneTrigger.applies(null, context))
|
if (!oneTrigger.applies(null, context))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Miscellaneous.logEvent("i", String.format(context.getResources().getString(R.string.ruleCheckOf), this.getName()), String.format("Rule %1$s generally applies currently. Checking if it's really due, yet will be done separately.", this.getName()), 3);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.jens.automation2">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@ import android.os.Build;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.http.client.methods.HttpGet;
|
import org.apache.http.client.methods.HttpGet;
|
||||||
|
|
||||||
@ -21,108 +23,112 @@ public class Action
|
|||||||
public static final String intentPairSeparator = "intPairSplit";
|
public static final String intentPairSeparator = "intPairSplit";
|
||||||
public static final String vibrateSeparator = ",";
|
public static final String vibrateSeparator = ",";
|
||||||
|
|
||||||
public enum Action_Enum {
|
public enum Action_Enum
|
||||||
setWifi,
|
{
|
||||||
setBluetooth,
|
setWifi,
|
||||||
setUsbTethering,
|
setBluetooth,
|
||||||
setWifiTethering,
|
setUsbTethering,
|
||||||
setBluetoothTethering,
|
setWifiTethering,
|
||||||
setDisplayRotation,
|
setBluetoothTethering,
|
||||||
turnWifiOn,turnWifiOff,
|
setDisplayRotation,
|
||||||
turnBluetoothOn,turnBluetoothOff,
|
turnWifiOn,turnWifiOff,
|
||||||
triggerUrl,
|
turnBluetoothOn,turnBluetoothOff,
|
||||||
changeSoundProfile,
|
triggerUrl,
|
||||||
turnUsbTetheringOn,turnUsbTetheringOff,
|
changeSoundProfile,
|
||||||
turnWifiTetheringOn,turnWifiTetheringOff,
|
turnUsbTetheringOn,turnUsbTetheringOff,
|
||||||
enableScreenRotation,disableScreenRotation,
|
turnWifiTetheringOn,turnWifiTetheringOff,
|
||||||
startOtherActivity,
|
enableScreenRotation,disableScreenRotation,
|
||||||
waitBeforeNextAction,
|
startOtherActivity,
|
||||||
turnScreenOnOrOff,
|
waitBeforeNextAction,
|
||||||
setAirplaneMode,
|
turnScreenOnOrOff,
|
||||||
setDataConnection,
|
setAirplaneMode,
|
||||||
speakText,
|
setDataConnection,
|
||||||
playMusic,
|
speakText,
|
||||||
controlMediaPlayback,
|
playMusic,
|
||||||
setScreenBrightness,
|
controlMediaPlayback,
|
||||||
playSound,
|
setScreenBrightness,
|
||||||
vibrate,
|
playSound,
|
||||||
createNotification,
|
vibrate,
|
||||||
closeNotification,
|
createNotification,
|
||||||
sendTextMessage;
|
closeNotification,
|
||||||
|
sendBroadcast,
|
||||||
public String getFullName(Context context)
|
sendTextMessage;
|
||||||
{
|
|
||||||
switch(this)
|
public String getFullName(Context context)
|
||||||
{
|
{
|
||||||
case setWifi:
|
switch(this)
|
||||||
return context.getResources().getString(R.string.actionSetWifi);
|
{
|
||||||
case setBluetooth:
|
case setWifi:
|
||||||
return context.getResources().getString(R.string.actionSetBluetooth);
|
return context.getResources().getString(R.string.actionSetWifi);
|
||||||
case setWifiTethering:
|
case setBluetooth:
|
||||||
return context.getResources().getString(R.string.actionSetWifiTethering);
|
return context.getResources().getString(R.string.actionSetBluetooth);
|
||||||
case setBluetoothTethering:
|
case setWifiTethering:
|
||||||
return context.getResources().getString(R.string.actionSetBluetoothTethering);
|
return context.getResources().getString(R.string.actionSetWifiTethering);
|
||||||
case setUsbTethering:
|
case setBluetoothTethering:
|
||||||
return context.getResources().getString(R.string.actionSetUsbTethering);
|
return context.getResources().getString(R.string.actionSetBluetoothTethering);
|
||||||
case setDisplayRotation:
|
case setUsbTethering:
|
||||||
return context.getResources().getString(R.string.actionSetDisplayRotation);
|
return context.getResources().getString(R.string.actionSetUsbTethering);
|
||||||
case turnWifiOn:
|
case setDisplayRotation:
|
||||||
return context.getResources().getString(R.string.actionTurnWifiOn);
|
return context.getResources().getString(R.string.actionSetDisplayRotation);
|
||||||
case turnWifiOff:
|
case turnWifiOn:
|
||||||
return context.getResources().getString(R.string.actionTurnWifiOff);
|
return context.getResources().getString(R.string.actionTurnWifiOn);
|
||||||
case turnBluetoothOn:
|
case turnWifiOff:
|
||||||
return context.getResources().getString(R.string.actionTurnBluetoothOn);
|
return context.getResources().getString(R.string.actionTurnWifiOff);
|
||||||
case turnBluetoothOff:
|
case turnBluetoothOn:
|
||||||
return context.getResources().getString(R.string.actionTurnBluetoothOff);
|
return context.getResources().getString(R.string.actionTurnBluetoothOn);
|
||||||
case triggerUrl:
|
case turnBluetoothOff:
|
||||||
return context.getResources().getString(R.string.actionTriggerUrl);
|
return context.getResources().getString(R.string.actionTurnBluetoothOff);
|
||||||
case changeSoundProfile:
|
case triggerUrl:
|
||||||
return context.getResources().getString(R.string.actionChangeSoundProfile);
|
return context.getResources().getString(R.string.actionTriggerUrl);
|
||||||
case turnUsbTetheringOn:
|
case changeSoundProfile:
|
||||||
return context.getResources().getString(R.string.actionTurnUsbTetheringOn);
|
return context.getResources().getString(R.string.actionChangeSoundProfile);
|
||||||
case turnUsbTetheringOff:
|
case turnUsbTetheringOn:
|
||||||
return context.getResources().getString(R.string.actionTurnUsbTetheringOff);
|
return context.getResources().getString(R.string.actionTurnUsbTetheringOn);
|
||||||
case turnWifiTetheringOn:
|
case turnUsbTetheringOff:
|
||||||
return context.getResources().getString(R.string.actionTurnWifiTetheringOn);
|
return context.getResources().getString(R.string.actionTurnUsbTetheringOff);
|
||||||
case turnWifiTetheringOff:
|
case turnWifiTetheringOn:
|
||||||
return context.getResources().getString(R.string.actionTurnWifiTetheringOff);
|
return context.getResources().getString(R.string.actionTurnWifiTetheringOn);
|
||||||
case enableScreenRotation:
|
case turnWifiTetheringOff:
|
||||||
return context.getResources().getString(R.string.actionEnableScreenRotation);
|
return context.getResources().getString(R.string.actionTurnWifiTetheringOff);
|
||||||
case disableScreenRotation:
|
case enableScreenRotation:
|
||||||
return context.getResources().getString(R.string.actionDisableScreenRotation);
|
return context.getResources().getString(R.string.actionEnableScreenRotation);
|
||||||
case startOtherActivity:
|
case disableScreenRotation:
|
||||||
return context.getResources().getString(R.string.startOtherActivity);
|
return context.getResources().getString(R.string.actionDisableScreenRotation);
|
||||||
case waitBeforeNextAction:
|
case startOtherActivity:
|
||||||
return context.getResources().getString(R.string.waitBeforeNextAction);
|
return context.getResources().getString(R.string.startOtherActivity);
|
||||||
case turnScreenOnOrOff:
|
case waitBeforeNextAction:
|
||||||
return context.getResources().getString(R.string.turnScreenOnOrOff);
|
return context.getResources().getString(R.string.waitBeforeNextAction);
|
||||||
case vibrate:
|
case turnScreenOnOrOff:
|
||||||
return context.getResources().getString(R.string.vibrate);
|
return context.getResources().getString(R.string.turnScreenOnOrOff);
|
||||||
case setAirplaneMode:
|
case vibrate:
|
||||||
return context.getResources().getString(R.string.airplaneMode);
|
return context.getResources().getString(R.string.vibrate);
|
||||||
case setDataConnection:
|
case setAirplaneMode:
|
||||||
return context.getResources().getString(R.string.actionDataConnection);
|
return context.getResources().getString(R.string.airplaneMode);
|
||||||
case speakText:
|
case setDataConnection:
|
||||||
return context.getResources().getString(R.string.actionSpeakText);
|
return context.getResources().getString(R.string.actionDataConnection);
|
||||||
case playMusic:
|
case speakText:
|
||||||
return context.getResources().getString(R.string.actionPlayMusic);
|
return context.getResources().getString(R.string.actionSpeakText);
|
||||||
case controlMediaPlayback:
|
case playMusic:
|
||||||
return context.getResources().getString(R.string.actionMediaControl);
|
return context.getResources().getString(R.string.actionPlayMusic);
|
||||||
case playSound:
|
case controlMediaPlayback:
|
||||||
return context.getResources().getString(R.string.playSound);
|
return context.getResources().getString(R.string.actionMediaControl);
|
||||||
case sendTextMessage:
|
case playSound:
|
||||||
return context.getResources().getString(R.string.sendTextMessage);
|
return context.getResources().getString(R.string.playSound);
|
||||||
case setScreenBrightness:
|
case sendTextMessage:
|
||||||
return context.getResources().getString(R.string.setScreenBrightness);
|
return context.getResources().getString(R.string.sendTextMessage);
|
||||||
case createNotification:
|
case setScreenBrightness:
|
||||||
return context.getResources().getString(R.string.createNotification);
|
return context.getResources().getString(R.string.setScreenBrightness);
|
||||||
case closeNotification:
|
case createNotification:
|
||||||
return context.getResources().getString(R.string.closeNotifications);
|
return context.getResources().getString(R.string.createNotification);
|
||||||
default:
|
case closeNotification:
|
||||||
return "Unknown";
|
return context.getResources().getString(R.string.closeNotifications);
|
||||||
}
|
case sendBroadcast:
|
||||||
}
|
return context.getResources().getString(R.string.sendBroadcast);
|
||||||
};
|
default:
|
||||||
|
return "Unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private Action_Enum action;
|
private Action_Enum action;
|
||||||
private boolean parameter1 = false;
|
private boolean parameter1 = false;
|
||||||
@ -258,6 +264,9 @@ public class Action
|
|||||||
case closeNotification:
|
case closeNotification:
|
||||||
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.closeNotifications));
|
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.closeNotifications));
|
||||||
break;
|
break;
|
||||||
|
case sendBroadcast:
|
||||||
|
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.sendBroadcast));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
returnString.append(action.toString());
|
returnString.append(action.toString());
|
||||||
}
|
}
|
||||||
@ -430,7 +439,7 @@ public class Action
|
|||||||
|
|
||||||
return (String[])actionTypesList.toArray(new String[actionTypesList.size()]);
|
return (String[])actionTypesList.toArray(new String[actionTypesList.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(Context context, boolean toggleActionIfPossible)
|
public void run(Context context, boolean toggleActionIfPossible)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -533,6 +542,9 @@ public class Action
|
|||||||
else
|
else
|
||||||
Miscellaneous.logEvent("w", "Close notification", "Close notification was requested, but OS version is too low: " + String.valueOf(Build.VERSION.SDK_INT), 2);
|
Miscellaneous.logEvent("w", "Close notification", "Close notification was requested, but OS version is too low: " + String.valueOf(Build.VERSION.SDK_INT), 2);
|
||||||
break;
|
break;
|
||||||
|
case sendBroadcast:
|
||||||
|
Actions.sendBroadcast(context, this.getParameter2());
|
||||||
|
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;
|
||||||
@ -636,7 +648,7 @@ public class Action
|
|||||||
//Do something with result
|
//Do something with result
|
||||||
//Toast.makeText(context, text, duration) result;
|
//Toast.makeText(context, text, duration) result;
|
||||||
Miscellaneous.logEvent("i", "HTTP RESULT", result, 3);
|
Miscellaneous.logEvent("i", "HTTP RESULT", result, 3);
|
||||||
Actions myAction=new Actions();
|
Actions myAction = new Actions();
|
||||||
myAction.useDownloadedWebpage(result);
|
myAction.useDownloadedWebpage(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,15 @@ public class Actions
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class WifiStuff
|
public static void sendBroadcast(Context context, String action)
|
||||||
|
{
|
||||||
|
Miscellaneous.logEvent("i", "sendBroadcast", "Sending broadcast with action " + action, 5);
|
||||||
|
Intent broadcastIntent = new Intent();
|
||||||
|
broadcastIntent.setAction(action);
|
||||||
|
context.sendBroadcast(broadcastIntent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class WifiStuff
|
||||||
{
|
{
|
||||||
public static Boolean setWifi(Context context, Boolean desiredState, boolean toggleActionIfPossible)
|
public static Boolean setWifi(Context context, Boolean desiredState, boolean toggleActionIfPossible)
|
||||||
{
|
{
|
||||||
|
@ -353,11 +353,15 @@ public class ActivityControlCenter extends Activity
|
|||||||
systemInfoText.append("Device details" + Miscellaneous.lineSeparator);
|
systemInfoText.append("Device details" + Miscellaneous.lineSeparator);
|
||||||
systemInfoText.append("OS version: " + System.getProperty("os.version") + Miscellaneous.lineSeparator);
|
systemInfoText.append("OS version: " + System.getProperty("os.version") + Miscellaneous.lineSeparator);
|
||||||
systemInfoText.append("API Level: " + android.os.Build.VERSION.SDK + Miscellaneous.lineSeparator);
|
systemInfoText.append("API Level: " + android.os.Build.VERSION.SDK + Miscellaneous.lineSeparator);
|
||||||
|
systemInfoText.append("Target SDK: " + Miscellaneous.getAnyContext().getApplicationInfo().targetSdkVersion + Miscellaneous.lineSeparator);
|
||||||
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("Rooted: " + String.valueOf(Miscellaneous.isPhoneRooted()));
|
||||||
systemInfoText.append("Country: " + Miscellaneous.getUserCountry(Miscellaneous.getAnyContext()) + Miscellaneous.lineSeparator);
|
systemInfoText.append("Country: " + Miscellaneous.getUserCountry(Miscellaneous.getAnyContext()) + Miscellaneous.lineSeparator);
|
||||||
systemInfoText.append("OS language: " + Locale.getDefault().getDisplayName());
|
systemInfoText.append("OS language: " + Locale.getDefault().getDisplayName() + Miscellaneous.lineSeparator);
|
||||||
|
systemInfoText.append("Logfile written: " + String.valueOf(Settings.writeLogFile) + Miscellaneous.lineSeparator);
|
||||||
|
systemInfoText.append("Log level: " + String.valueOf(Settings.logLevel));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
I've checked the Locale methods on my Android 4.1.2 device, and the results:
|
I've checked the Locale methods on my Android 4.1.2 device, and the results:
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package com.jens.automation2;
|
package com.jens.automation2;
|
||||||
|
|
||||||
import static com.jens.automation2.Trigger.triggerParameter2Split;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
@ -18,8 +16,6 @@ import android.view.View;
|
|||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
|
||||||
import android.widget.CompoundButton;
|
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@ -49,7 +45,6 @@ public class ActivityManageActionCloseNotification extends Activity
|
|||||||
TextView tvSelectedApplication;
|
TextView tvSelectedApplication;
|
||||||
|
|
||||||
private static List<PackageInfo> pInfos = null;
|
private static List<PackageInfo> pInfos = null;
|
||||||
public static Trigger resultingTrigger;
|
|
||||||
|
|
||||||
private static String[] directions;
|
private static String[] directions;
|
||||||
|
|
||||||
@ -271,6 +266,7 @@ public class ActivityManageActionCloseNotification extends Activity
|
|||||||
directions = new String[] {
|
directions = new String[] {
|
||||||
getResources().getString(R.string.directionStringEquals),
|
getResources().getString(R.string.directionStringEquals),
|
||||||
getResources().getString(R.string.directionStringContains),
|
getResources().getString(R.string.directionStringContains),
|
||||||
|
getResources().getString(R.string.directionStringDoesNotContain),
|
||||||
getResources().getString(R.string.directionStringStartsWith),
|
getResources().getString(R.string.directionStringStartsWith),
|
||||||
getResources().getString(R.string.directionStringEndsWith),
|
getResources().getString(R.string.directionStringEndsWith),
|
||||||
getResources().getString(R.string.directionStringNotEquals)
|
getResources().getString(R.string.directionStringNotEquals)
|
||||||
|
@ -0,0 +1,83 @@
|
|||||||
|
package com.jens.automation2;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
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 ActivityManageActionSendBroadcast extends Activity
|
||||||
|
{
|
||||||
|
EditText etBroadcastToSend;
|
||||||
|
Button bBroadcastSendShowSuggestions, bSaveSendBroadcast;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState)
|
||||||
|
{
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_manage_action_send_broadcast);
|
||||||
|
|
||||||
|
etBroadcastToSend = (EditText)findViewById(R.id.etBroadcastToSend);
|
||||||
|
bBroadcastSendShowSuggestions = (Button)findViewById(R.id.bBroadcastSendShowSuggestions);
|
||||||
|
bSaveSendBroadcast = (Button)findViewById(R.id.bSaveSendBroadcast);
|
||||||
|
|
||||||
|
bSaveSendBroadcast.setOnClickListener(new View.OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(View view)
|
||||||
|
{
|
||||||
|
if(checkInput())
|
||||||
|
{
|
||||||
|
Intent answer = new Intent();
|
||||||
|
answer.putExtra(ActivityManageRule.intentNameActionParameter2, etBroadcastToSend.getText().toString());
|
||||||
|
setResult(RESULT_OK, answer);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
bBroadcastSendShowSuggestions.setOnClickListener(new View.OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(View v)
|
||||||
|
{
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(ActivityManageActionSendBroadcast.this);
|
||||||
|
builder.setTitle(getResources().getString(R.string.selectBroadcast));
|
||||||
|
builder.setItems(ActivityManageTriggerBroadcast.broadcastSuggestions, new DialogInterface.OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialogInterface, int which)
|
||||||
|
{
|
||||||
|
etBroadcastToSend.setText(ActivityManageTriggerBroadcast.broadcastSuggestions[which]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
builder.create().show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Intent input = getIntent();
|
||||||
|
|
||||||
|
if(input.hasExtra(ActivityManageRule.intentNameActionParameter2))
|
||||||
|
etBroadcastToSend.setText(input.getStringExtra(ActivityManageRule.intentNameActionParameter2));
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean checkInput()
|
||||||
|
{
|
||||||
|
String broadcastToSend = etBroadcastToSend.getText().toString();
|
||||||
|
if(StringUtils.isEmpty(broadcastToSend))
|
||||||
|
{
|
||||||
|
Toast.makeText(ActivityManageActionSendBroadcast.this, getResources().getString(R.string.enterBroadcast), Toast.LENGTH_SHORT).show();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@ -380,7 +380,13 @@ public class ActivityManageActionStartActivity extends Activity
|
|||||||
int targetSdkVersion = getApplicationContext().getApplicationInfo().targetSdkVersion;
|
int targetSdkVersion = getApplicationContext().getApplicationInfo().targetSdkVersion;
|
||||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && targetSdkVersion >= 30 && !ActivityPermissions.havePermission(Manifest.permission.QUERY_ALL_PACKAGES, ActivityManageActionStartActivity.this))// && shouldShowRequestPermissionRationale(Manifest.permission.QUERY_ALL_PACKAGES))
|
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && targetSdkVersion >= 30 && !ActivityPermissions.havePermission(Manifest.permission.QUERY_ALL_PACKAGES, ActivityManageActionStartActivity.this))// && shouldShowRequestPermissionRationale(Manifest.permission.QUERY_ALL_PACKAGES))
|
||||||
{
|
{
|
||||||
requestPermissions(new String[] {Manifest.permission.QUERY_ALL_PACKAGES}, requestCodeForRequestQueryAllPackagesPermission);
|
if(BuildConfig.FLAVOR.equals("googlePlayFlavor"))
|
||||||
|
{
|
||||||
|
// This ain't possible anymore.
|
||||||
|
Miscellaneous.messageBox(getResources().getString(R.string.info), getResources().getString(R.string.featureNotInGooglePlayVersion) + Miscellaneous.lineSeparator + Miscellaneous.lineSeparator + getResources().getString(R.string.startActivityInsertManually), ActivityManageActionStartActivity.this).show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
requestPermissions(new String[] {Manifest.permission.QUERY_ALL_PACKAGES}, requestCodeForRequestQueryAllPackagesPermission);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
getAppList();
|
getAppList();
|
||||||
|
@ -119,6 +119,10 @@ public class ActivityManageRule extends Activity
|
|||||||
final static int requestCodeActionCloseNotificationEdit = 806;
|
final static int requestCodeActionCloseNotificationEdit = 806;
|
||||||
final static int requestCodeActionControlMediaAdd = 807;
|
final static int requestCodeActionControlMediaAdd = 807;
|
||||||
final static int requestCodeActionControlMediaEdit = 808;
|
final static int requestCodeActionControlMediaEdit = 808;
|
||||||
|
final static int requestCodeTriggerBroadcastReceivedAdd = 809;
|
||||||
|
final static int requestCodeTriggerBroadcastReceivedEdit = 810;
|
||||||
|
final static int requestCodeActionSendBroadcastAdd = 811;
|
||||||
|
final static int requestCodeActionSendBroadcastEdit = 812;
|
||||||
|
|
||||||
public static ActivityManageRule getInstance()
|
public static ActivityManageRule getInstance()
|
||||||
{
|
{
|
||||||
@ -298,6 +302,12 @@ public class ActivityManageRule extends Activity
|
|||||||
devicePositionEditor.putExtra(ActivityManageTriggerDeviceOrientation.vectorFieldName, selectedTrigger.getTriggerParameter2());
|
devicePositionEditor.putExtra(ActivityManageTriggerDeviceOrientation.vectorFieldName, selectedTrigger.getTriggerParameter2());
|
||||||
startActivityForResult(devicePositionEditor, requestCodeTriggerDeviceOrientationEdit);
|
startActivityForResult(devicePositionEditor, requestCodeTriggerDeviceOrientationEdit);
|
||||||
break;
|
break;
|
||||||
|
case broadcastReceived:
|
||||||
|
Intent broadcastEditor = new Intent(ActivityManageRule.this, ActivityManageTriggerBroadcast.class);
|
||||||
|
broadcastEditor.putExtra(intentNameTriggerParameter1, selectedTrigger.getTriggerParameter());
|
||||||
|
broadcastEditor.putExtra(intentNameTriggerParameter2, selectedTrigger.getTriggerParameter2());
|
||||||
|
startActivityForResult(broadcastEditor, requestCodeTriggerBroadcastReceivedEdit);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -367,6 +377,11 @@ public class ActivityManageRule extends Activity
|
|||||||
activityEditVibrateIntent.putExtra("vibratePattern", a.getParameter2());
|
activityEditVibrateIntent.putExtra("vibratePattern", a.getParameter2());
|
||||||
startActivityForResult(activityEditVibrateIntent, requestCodeActionVibrateEdit);
|
startActivityForResult(activityEditVibrateIntent, requestCodeActionVibrateEdit);
|
||||||
break;
|
break;
|
||||||
|
case sendBroadcast:
|
||||||
|
Intent activityEditSendBroadcastIntent = new Intent(ActivityManageRule.this, ActivityManageActionSendBroadcast.class);
|
||||||
|
activityEditSendBroadcastIntent.putExtra(intentNameActionParameter2, a.getParameter2());
|
||||||
|
startActivityForResult(activityEditSendBroadcastIntent, requestCodeActionSendBroadcastEdit);
|
||||||
|
break;
|
||||||
case controlMediaPlayback:
|
case controlMediaPlayback:
|
||||||
Intent activityEditControlMediaIntent = new Intent(ActivityManageRule.this, ActivityManageActionControlMedia.class);
|
Intent activityEditControlMediaIntent = new Intent(ActivityManageRule.this, ActivityManageActionControlMedia.class);
|
||||||
activityEditControlMediaIntent.putExtra(ActivityManageRule.intentNameActionParameter2, a.getParameter2());
|
activityEditControlMediaIntent.putExtra(ActivityManageRule.intentNameActionParameter2, a.getParameter2());
|
||||||
@ -508,6 +523,8 @@ public class ActivityManageRule extends Activity
|
|||||||
items.add(new Item(typesLong[i].toString(), R.drawable.plane));
|
items.add(new Item(typesLong[i].toString(), R.drawable.plane));
|
||||||
else if(types[i].toString().equals(Trigger_Enum.roaming.toString()))
|
else if(types[i].toString().equals(Trigger_Enum.roaming.toString()))
|
||||||
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.broadcastReceived.toString()))
|
||||||
|
items.add(new Item(typesLong[i].toString(), R.drawable.satellite));
|
||||||
else if(types[i].toString().equals(Trigger_Enum.phoneCall.toString()))
|
else if(types[i].toString().equals(Trigger_Enum.phoneCall.toString()))
|
||||||
{
|
{
|
||||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, "android.permission.SEND_SMS"))
|
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, "android.permission.SEND_SMS"))
|
||||||
@ -531,6 +548,10 @@ public class ActivityManageRule extends Activity
|
|||||||
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()))
|
else if(types[i].toString().equals(Trigger_Enum.screenState.toString()))
|
||||||
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.deviceStarts.toString()))
|
||||||
|
items.add(new Item(typesLong[i].toString(), R.drawable.alarm));
|
||||||
|
else if(types[i].toString().equals(Trigger_Enum.serviceStarts.toString()))
|
||||||
|
items.add(new Item(typesLong[i].toString(), R.drawable.alarm));
|
||||||
else
|
else
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.placeholder));
|
items.add(new Item(typesLong[i].toString(), R.drawable.placeholder));
|
||||||
}
|
}
|
||||||
@ -595,7 +616,7 @@ public class ActivityManageRule extends Activity
|
|||||||
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.usb_host_connection)
|
else if(triggerType == Trigger_Enum.usb_host_connection)
|
||||||
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)};
|
||||||
else if(triggerType == Trigger_Enum.speed | triggerType == Trigger_Enum.noiseLevel | triggerType == Trigger_Enum.batteryLevel)
|
else if(triggerType == Trigger_Enum.speed || triggerType == Trigger_Enum.noiseLevel || triggerType == Trigger_Enum.batteryLevel)
|
||||||
booleanChoices = new String[]{getResources().getString(R.string.exceeds), getResources().getString(R.string.dropsBelow)};
|
booleanChoices = new String[]{getResources().getString(R.string.exceeds), getResources().getString(R.string.dropsBelow)};
|
||||||
else if(triggerType == Trigger_Enum.wifiConnection)
|
else if(triggerType == Trigger_Enum.wifiConnection)
|
||||||
{
|
{
|
||||||
@ -698,6 +719,21 @@ public class ActivityManageRule extends Activity
|
|||||||
{
|
{
|
||||||
newTrigger.setTriggerType(Trigger_Enum.screenState);
|
newTrigger.setTriggerType(Trigger_Enum.screenState);
|
||||||
getTriggerScreenStateDialog().show();
|
getTriggerScreenStateDialog().show();
|
||||||
|
Miscellaneous.messageBox(getResources().getString(R.string.info), getResources().getString(R.string.lockedCommentScreenMustBeOff), ActivityManageRule.this).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(triggerType == Trigger_Enum.deviceStarts)
|
||||||
|
{
|
||||||
|
newTrigger.setTriggerType(Trigger_Enum.deviceStarts);
|
||||||
|
ruleToEdit.getTriggerSet().add(newTrigger);
|
||||||
|
refreshTriggerList();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(triggerType == Trigger_Enum.serviceStarts)
|
||||||
|
{
|
||||||
|
newTrigger.setTriggerType(Trigger_Enum.serviceStarts);
|
||||||
|
ruleToEdit.getTriggerSet().add(newTrigger);
|
||||||
|
refreshTriggerList();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(triggerType == Trigger_Enum.headsetPlugged)
|
else if(triggerType == Trigger_Enum.headsetPlugged)
|
||||||
@ -708,6 +744,13 @@ public class ActivityManageRule extends Activity
|
|||||||
if (NfcReceiver.checkNfcRequirements(ActivityManageRule.this, true))
|
if (NfcReceiver.checkNfcRequirements(ActivityManageRule.this, true))
|
||||||
getTriggerParameterDialog(context, booleanChoices).show();
|
getTriggerParameterDialog(context, booleanChoices).show();
|
||||||
}
|
}
|
||||||
|
else if(triggerType == Trigger_Enum.broadcastReceived)
|
||||||
|
{
|
||||||
|
newTrigger.setTriggerType(Trigger_Enum.broadcastReceived);
|
||||||
|
Intent broadcastTriggerEditor = new Intent(myContext, ActivityManageTriggerBroadcast.class);
|
||||||
|
startActivityForResult(broadcastTriggerEditor, requestCodeTriggerBroadcastReceivedAdd);
|
||||||
|
return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
getTriggerParameterDialog(context, booleanChoices).show();
|
getTriggerParameterDialog(context, booleanChoices).show();
|
||||||
|
|
||||||
@ -1044,7 +1087,9 @@ public class ActivityManageRule extends Activity
|
|||||||
String[] choices = {
|
String[] choices = {
|
||||||
Miscellaneous.getAnyContext().getResources().getString(R.string.off),
|
Miscellaneous.getAnyContext().getResources().getString(R.string.off),
|
||||||
Miscellaneous.getAnyContext().getResources().getString(R.string.on),
|
Miscellaneous.getAnyContext().getResources().getString(R.string.on),
|
||||||
Miscellaneous.getAnyContext().getResources().getString(R.string.unlocked)
|
Miscellaneous.getAnyContext().getResources().getString(R.string.unlocked),
|
||||||
|
Miscellaneous.getAnyContext().getResources().getString(R.string.lockedWithoutSecurity),
|
||||||
|
Miscellaneous.getAnyContext().getResources().getString(R.string.lockedWithSecurity)
|
||||||
};
|
};
|
||||||
|
|
||||||
alertDialog.setItems(choices, new DialogInterface.OnClickListener()
|
alertDialog.setItems(choices, new DialogInterface.OnClickListener()
|
||||||
@ -1052,6 +1097,7 @@ public class ActivityManageRule extends Activity
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which)
|
public void onClick(DialogInterface dialog, int which)
|
||||||
{
|
{
|
||||||
|
newTrigger.setTriggerParameter(true);
|
||||||
newTrigger.setTriggerParameter2(String.valueOf(which));
|
newTrigger.setTriggerParameter2(String.valueOf(which));
|
||||||
ruleToEdit.getTriggerSet().add(newTrigger);
|
ruleToEdit.getTriggerSet().add(newTrigger);
|
||||||
refreshTriggerList();
|
refreshTriggerList();
|
||||||
@ -1330,8 +1376,18 @@ public class ActivityManageRule extends Activity
|
|||||||
{
|
{
|
||||||
if(resultCode == RESULT_OK)
|
if(resultCode == RESULT_OK)
|
||||||
{
|
{
|
||||||
newTrigger = ActivityManageTriggerNotification.resultingTrigger;
|
Trigger editedTrigger = new Trigger();
|
||||||
newTrigger.setParentRule(ruleToEdit);
|
editedTrigger.setTriggerType(Trigger_Enum.notification);
|
||||||
|
editedTrigger.setTriggerParameter(data.getBooleanExtra(ActivityManageTriggerNotification.intentNameNotificationDirection, false));
|
||||||
|
editedTrigger.setTriggerParameter2(
|
||||||
|
data.getStringExtra(ActivityManageTriggerNotification.intentNameNotificationApp) + Trigger.triggerParameter2Split +
|
||||||
|
data.getStringExtra(ActivityManageTriggerNotification.intentNameNotificationTitleDir) + Trigger.triggerParameter2Split +
|
||||||
|
data.getStringExtra(ActivityManageTriggerNotification.intentNameNotificationTitle) + Trigger.triggerParameter2Split +
|
||||||
|
data.getStringExtra(ActivityManageTriggerNotification.intentNameNotificationTextDir) + Trigger.triggerParameter2Split +
|
||||||
|
data.getStringExtra(ActivityManageTriggerNotification.intentNameNotificationText)
|
||||||
|
);
|
||||||
|
editedTrigger.setParentRule(ruleToEdit);
|
||||||
|
ruleToEdit.getTriggerSet().set(editIndex, editedTrigger);
|
||||||
this.refreshTriggerList();
|
this.refreshTriggerList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1341,7 +1397,7 @@ public class ActivityManageRule extends Activity
|
|||||||
{
|
{
|
||||||
newTrigger.setParentRule(ruleToEdit);
|
newTrigger.setParentRule(ruleToEdit);
|
||||||
ruleToEdit.getTriggerSet().add(newTrigger);
|
ruleToEdit.getTriggerSet().add(newTrigger);
|
||||||
newTrigger.setTriggerParameter2(data.getStringExtra("triggerParameter2"));
|
newTrigger.setTriggerParameter2(data.getStringExtra(intentNameTriggerParameter2));
|
||||||
this.refreshTriggerList();
|
this.refreshTriggerList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1433,6 +1489,16 @@ public class ActivityManageRule extends Activity
|
|||||||
this.refreshActionList();
|
this.refreshActionList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(requestCode == requestCodeActionSendBroadcastAdd)
|
||||||
|
{
|
||||||
|
if(resultCode == RESULT_OK)
|
||||||
|
{
|
||||||
|
newAction.setParentRule(ruleToEdit);
|
||||||
|
newAction.setParameter2(data.getStringExtra(intentNameActionParameter2));
|
||||||
|
ruleToEdit.getActionSet().add(newAction);
|
||||||
|
this.refreshActionList();
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(requestCode == requestCodeActionControlMediaAdd)
|
else if(requestCode == requestCodeActionControlMediaAdd)
|
||||||
{
|
{
|
||||||
if(resultCode == RESULT_OK)
|
if(resultCode == RESULT_OK)
|
||||||
@ -1479,6 +1545,18 @@ public class ActivityManageRule extends Activity
|
|||||||
this.refreshActionList();
|
this.refreshActionList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(requestCode == requestCodeActionSendBroadcastEdit)
|
||||||
|
{
|
||||||
|
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 == requestCodeActionControlMediaEdit)
|
else if(requestCode == requestCodeActionControlMediaEdit)
|
||||||
{
|
{
|
||||||
if(resultCode == RESULT_OK)
|
if(resultCode == RESULT_OK)
|
||||||
@ -1612,6 +1690,30 @@ public class ActivityManageRule extends Activity
|
|||||||
this.refreshTriggerList();
|
this.refreshTriggerList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(requestCode == requestCodeTriggerBroadcastReceivedAdd)
|
||||||
|
{
|
||||||
|
if(resultCode == RESULT_OK)
|
||||||
|
{
|
||||||
|
newTrigger.setTriggerParameter(data.getBooleanExtra(ActivityManageRule.intentNameTriggerParameter1, true));
|
||||||
|
newTrigger.setTriggerParameter2(data.getStringExtra(ActivityManageRule.intentNameTriggerParameter2));
|
||||||
|
newTrigger.setParentRule(ruleToEdit);
|
||||||
|
ruleToEdit.getTriggerSet().add(newTrigger);
|
||||||
|
this.refreshTriggerList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(requestCode == requestCodeTriggerBroadcastReceivedEdit)
|
||||||
|
{
|
||||||
|
if(resultCode == RESULT_OK)
|
||||||
|
{
|
||||||
|
Trigger editedTrigger = new Trigger();
|
||||||
|
editedTrigger.setTriggerType(Trigger_Enum.broadcastReceived);
|
||||||
|
editedTrigger.setTriggerParameter(data.getBooleanExtra(ActivityManageRule.intentNameTriggerParameter1, true));
|
||||||
|
editedTrigger.setTriggerParameter2(data.getStringExtra(ActivityManageRule.intentNameTriggerParameter2));
|
||||||
|
editedTrigger.setParentRule(ruleToEdit);
|
||||||
|
ruleToEdit.getTriggerSet().set(editIndex, editedTrigger);
|
||||||
|
this.refreshTriggerList();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AlertDialog getActionTypeDialog()
|
protected AlertDialog getActionTypeDialog()
|
||||||
@ -1665,6 +1767,8 @@ public class ActivityManageRule extends Activity
|
|||||||
items.add(new Item(typesLong[i].toString(), R.drawable.notification));
|
items.add(new Item(typesLong[i].toString(), R.drawable.notification));
|
||||||
else if(types[i].toString().equals(Action_Enum.closeNotification.toString()))
|
else if(types[i].toString().equals(Action_Enum.closeNotification.toString()))
|
||||||
items.add(new Item(typesLong[i].toString(), R.drawable.notification));
|
items.add(new Item(typesLong[i].toString(), R.drawable.notification));
|
||||||
|
else if(types[i].toString().equals(Action_Enum.sendBroadcast.toString()))
|
||||||
|
items.add(new Item(typesLong[i].toString(), R.drawable.satellite));
|
||||||
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))
|
||||||
@ -1716,7 +1820,7 @@ public class ActivityManageRule extends Activity
|
|||||||
newAction.setAction(Action_Enum.setWifi);
|
newAction.setAction(Action_Enum.setWifi);
|
||||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||||
|
|
||||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
if(context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.Q)
|
||||||
Miscellaneous.messageBox(context.getResources().getString(R.string.app_name), context.getResources().getString(R.string.android10WifiToggleNotice), context).show();
|
Miscellaneous.messageBox(context.getResources().getString(R.string.app_name), context.getResources().getString(R.string.android10WifiToggleNotice), context).show();
|
||||||
}
|
}
|
||||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setBluetooth.toString()))
|
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setBluetooth.toString()))
|
||||||
@ -1827,6 +1931,12 @@ 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.sendBroadcast.toString()))
|
||||||
|
{
|
||||||
|
newAction.setAction(Action_Enum.sendBroadcast);
|
||||||
|
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionSendBroadcast.class);
|
||||||
|
startActivityForResult(intent, requestCodeActionSendBroadcastAdd);
|
||||||
|
}
|
||||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.controlMediaPlayback.toString()))
|
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.controlMediaPlayback.toString()))
|
||||||
{
|
{
|
||||||
newAction.setAction(Action_Enum.controlMediaPlayback);
|
newAction.setAction(Action_Enum.controlMediaPlayback);
|
||||||
|
@ -0,0 +1,421 @@
|
|||||||
|
package com.jens.automation2;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
public class ActivityManageTriggerBroadcast extends Activity
|
||||||
|
{
|
||||||
|
RadioButton rbBroadcastReceived, rbBroadcastNotReceived;
|
||||||
|
EditText etBroadcastTriggerAction;
|
||||||
|
Button bBroadcastShowSuggestions, bSaveTriggerBroadcast;
|
||||||
|
TextView tvBroadcastUrl;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState)
|
||||||
|
{
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_manage_trigger_broadcasts);
|
||||||
|
|
||||||
|
bBroadcastShowSuggestions = findViewById(R.id.bBroadcastShowSuggestions);
|
||||||
|
bSaveTriggerBroadcast = findViewById(R.id.bSaveTriggerBroadcast);
|
||||||
|
etBroadcastTriggerAction = findViewById(R.id.etBroadcastTriggerAction);
|
||||||
|
rbBroadcastReceived = findViewById(R.id.rbBroadcastReceived);
|
||||||
|
rbBroadcastNotReceived = findViewById(R.id.rbBroadcastNotReceived);
|
||||||
|
tvBroadcastUrl = findViewById(R.id.tvBroadcastUrl);
|
||||||
|
|
||||||
|
if(getIntent().hasExtra(ActivityManageRule.intentNameTriggerParameter1) && getIntent().hasExtra(ActivityManageRule.intentNameTriggerParameter2))
|
||||||
|
{
|
||||||
|
if(getIntent().getBooleanExtra(ActivityManageRule.intentNameTriggerParameter1, true))
|
||||||
|
rbBroadcastReceived.setChecked(true);
|
||||||
|
else
|
||||||
|
rbBroadcastNotReceived.setChecked(true);
|
||||||
|
|
||||||
|
etBroadcastTriggerAction.setText(getIntent().getStringExtra(ActivityManageRule.intentNameTriggerParameter2));
|
||||||
|
}
|
||||||
|
|
||||||
|
tvBroadcastUrl.setOnClickListener(new View.OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(View view)
|
||||||
|
{
|
||||||
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(getResources().getString(R.string.broadcastListUrl)));
|
||||||
|
startActivity(browserIntent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
bBroadcastShowSuggestions.setOnClickListener(new View.OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(View view)
|
||||||
|
{
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(ActivityManageTriggerBroadcast.this);
|
||||||
|
builder.setTitle(getResources().getString(R.string.selectBroadcast));
|
||||||
|
builder.setItems(broadcastSuggestions, new DialogInterface.OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialogInterface, int which)
|
||||||
|
{
|
||||||
|
etBroadcastTriggerAction.setText(broadcastSuggestions[which]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
builder.create().show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
bSaveTriggerBroadcast.setOnClickListener(new View.OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(View v)
|
||||||
|
{
|
||||||
|
if(etBroadcastTriggerAction.getText() != null && !StringUtils.isEmpty(etBroadcastTriggerAction.getText().toString()))
|
||||||
|
{
|
||||||
|
Intent data = new Intent();
|
||||||
|
data.putExtra(ActivityManageRule.intentNameTriggerParameter1, rbBroadcastReceived.isChecked());
|
||||||
|
data.putExtra(ActivityManageRule.intentNameTriggerParameter2, etBroadcastTriggerAction.getText().toString());
|
||||||
|
ActivityManageTriggerBroadcast.this.setResult(RESULT_OK, data);
|
||||||
|
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Toast.makeText(ActivityManageTriggerBroadcast.this, getResources().getString(R.string.enterText), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String[] broadcastSuggestions = {
|
||||||
|
"android.accounts.LOGIN_ACCOUNTS_CHANGED",
|
||||||
|
"android.accounts.action.ACCOUNT_REMOVED",
|
||||||
|
"android.app.action.ACTION_PASSWORD_CHANGED",
|
||||||
|
"android.app.action.ACTION_PASSWORD_EXPIRING",
|
||||||
|
"android.app.action.ACTION_PASSWORD_FAILED",
|
||||||
|
"android.app.action.ACTION_PASSWORD_SUCCEEDED",
|
||||||
|
"android.app.action.AFFILIATED_PROFILE_TRANSFER_OWNERSHIP_COMPLETE",
|
||||||
|
"android.app.action.APPLICATION_DELEGATION_SCOPES_CHANGED",
|
||||||
|
"android.app.action.APP_BLOCK_STATE_CHANGED",
|
||||||
|
"android.app.action.AUTOMATIC_ZEN_RULE_STATUS_CHANGED",
|
||||||
|
"android.app.action.BUGREPORT_FAILED",
|
||||||
|
"android.app.action.BUGREPORT_SHARE",
|
||||||
|
"android.app.action.BUGREPORT_SHARING_DECLINED",
|
||||||
|
"android.app.action.DATA_SHARING_RESTRICTION_APPLIED",
|
||||||
|
"android.app.action.DATA_SHARING_RESTRICTION_CHANGED",
|
||||||
|
"android.app.action.DEVICE_ADMIN_DISABLED",
|
||||||
|
"android.app.action.DEVICE_ADMIN_DISABLE_REQUESTED",
|
||||||
|
"android.app.action.DEVICE_ADMIN_ENABLED",
|
||||||
|
"android.app.action.DEVICE_OWNER_CHANGED",
|
||||||
|
"android.app.action.INTERRUPTION_FILTER_CHANGED",
|
||||||
|
"android.app.action.INTERRUPTION_FILTER_CHANGED_INTERNAL",
|
||||||
|
"android.app.action.LOCK_TASK_ENTERING",
|
||||||
|
"android.app.action.LOCK_TASK_EXITING",
|
||||||
|
"android.app.action.MANAGED_USER_CREATED",
|
||||||
|
"android.app.action.NETWORK_LOGS_AVAILABLE",
|
||||||
|
"android.app.action.NEXT_ALARM_CLOCK_CHANGED",
|
||||||
|
"android.app.action.NOTIFICATION_CHANNEL_BLOCK_STATE_CHANGED",
|
||||||
|
"android.app.action.NOTIFICATION_CHANNEL_GROUP_BLOCK_STATE_CHANGED",
|
||||||
|
"android.app.action.NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED",
|
||||||
|
"android.app.action.NOTIFICATION_POLICY_CHANGED",
|
||||||
|
"android.app.action.NOTIFY_PENDING_SYSTEM_UPDATE",
|
||||||
|
"android.app.action.PROFILE_OWNER_CHANGED",
|
||||||
|
"android.app.action.PROFILE_PROVISIONING_COMPLETE",
|
||||||
|
"android.app.action.SECURITY_LOGS_AVAILABLE",
|
||||||
|
"android.app.action.SYSTEM_UPDATE_POLICY_CHANGED",
|
||||||
|
"android.app.action.TRANSFER_OWNERSHIP_COMPLETE",
|
||||||
|
"android.app.action.USER_ADDED",
|
||||||
|
"android.app.action.USER_REMOVED",
|
||||||
|
"android.app.action.USER_STARTED",
|
||||||
|
"android.app.action.USER_STOPPED",
|
||||||
|
"android.app.action.USER_SWITCHED",
|
||||||
|
"android.appwidget.action.APPWIDGET_DELETED",
|
||||||
|
"android.appwidget.action.APPWIDGET_DISABLED",
|
||||||
|
"android.appwidget.action.APPWIDGET_ENABLED",
|
||||||
|
"android.appwidget.action.APPWIDGET_HOST_RESTORED",
|
||||||
|
"android.appwidget.action.APPWIDGET_RESTORED",
|
||||||
|
"android.appwidget.action.APPWIDGET_UPDATE",
|
||||||
|
"android.appwidget.action.APPWIDGET_UPDATE_OPTIONS",
|
||||||
|
"android.bluetooth.a2dp.profile.action.ACTIVE_DEVICE_CHANGED",
|
||||||
|
"android.bluetooth.a2dp.profile.action.AVRCP_CONNECTION_STATE_CHANGED",
|
||||||
|
"android.bluetooth.a2dp.profile.action.CODEC_CONFIG_CHANGED",
|
||||||
|
"android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED",
|
||||||
|
"android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED",
|
||||||
|
"android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED",
|
||||||
|
"android.bluetooth.adapter.action.DISCOVERY_FINISHED",
|
||||||
|
"android.bluetooth.adapter.action.DISCOVERY_STARTED",
|
||||||
|
"android.bluetooth.adapter.action.LOCAL_NAME_CHANGED",
|
||||||
|
"android.bluetooth.adapter.action.SCAN_MODE_CHANGED",
|
||||||
|
"android.bluetooth.adapter.action.STATE_CHANGED",
|
||||||
|
"android.bluetooth.device.action.ACL_CONNECTED",
|
||||||
|
"android.bluetooth.device.action.ACL_DISCONNECTED",
|
||||||
|
"android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED",
|
||||||
|
"android.bluetooth.device.action.ALIAS_CHANGED",
|
||||||
|
"android.bluetooth.device.action.BATTERY_LEVEL_CHANGED",
|
||||||
|
"android.bluetooth.device.action.BOND_STATE_CHANGED",
|
||||||
|
"android.bluetooth.device.action.CLASS_CHANGED",
|
||||||
|
"android.bluetooth.device.action.CONNECTION_ACCESS_CANCEL",
|
||||||
|
"android.bluetooth.device.action.CONNECTION_ACCESS_REPLY",
|
||||||
|
"android.bluetooth.device.action.CONNECTION_ACCESS_REQUEST",
|
||||||
|
"android.bluetooth.device.action.FOUND",
|
||||||
|
"android.bluetooth.device.action.MAS_INSTANCE",
|
||||||
|
"android.bluetooth.device.action.NAME_CHANGED",
|
||||||
|
"android.bluetooth.device.action.NAME_FAILED",
|
||||||
|
"android.bluetooth.device.action.PAIRING_CANCEL",
|
||||||
|
"android.bluetooth.device.action.PAIRING_REQUEST",
|
||||||
|
"android.bluetooth.device.action.SDP_RECORD",
|
||||||
|
"android.bluetooth.device.action.SILENCE_MODE_CHANGED",
|
||||||
|
"android.bluetooth.device.action.UUID",
|
||||||
|
"android.bluetooth.devicepicker.action.DEVICE_SELECTED",
|
||||||
|
"android.bluetooth.devicepicker.action.LAUNCH",
|
||||||
|
"android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT",
|
||||||
|
"android.bluetooth.headset.profile.action.ACTIVE_DEVICE_CHANGED",
|
||||||
|
"android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED",
|
||||||
|
"android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED",
|
||||||
|
"android.bluetooth.hearingaid.profile.action.ACTIVE_DEVICE_CHANGED",
|
||||||
|
"android.bluetooth.hearingaid.profile.action.CONNECTION_STATE_CHANGED",
|
||||||
|
"android.bluetooth.hiddevice.profile.action.CONNECTION_STATE_CHANGED",
|
||||||
|
"android.bluetooth.input.profile.action.CONNECTION_STATE_CHANGED",
|
||||||
|
"android.bluetooth.input.profile.action.HANDSHAKE",
|
||||||
|
"android.bluetooth.input.profile.action.IDLE_TIME_CHANGED",
|
||||||
|
"android.bluetooth.input.profile.action.PROTOCOL_MODE_CHANGED",
|
||||||
|
"android.bluetooth.input.profile.action.REPORT",
|
||||||
|
"android.bluetooth.input.profile.action.VIRTUAL_UNPLUG_STATUS",
|
||||||
|
"android.bluetooth.pan.profile.action.CONNECTION_STATE_CHANGED",
|
||||||
|
"android.bluetooth.pbap.profile.action.CONNECTION_STATE_CHANGED",
|
||||||
|
"android.content.pm.action.SESSION_COMMITTED",
|
||||||
|
"android.content.pm.action.SESSION_UPDATED",
|
||||||
|
"android.hardware.action.NEW_PICTURE",
|
||||||
|
"android.hardware.action.NEW_VIDEO",
|
||||||
|
"android.hardware.hdmi.action.OSD_MESSAGE",
|
||||||
|
"android.hardware.input.action.QUERY_KEYBOARD_LAYOUTS",
|
||||||
|
"android.hardware.usb.action.USB_ACCESSORY_ATTACHED",
|
||||||
|
"android.hardware.usb.action.USB_ACCESSORY_DETACHED",
|
||||||
|
"android.hardware.usb.action.USB_DEVICE_ATTACHED",
|
||||||
|
"android.hardware.usb.action.USB_DEVICE_DETACHED",
|
||||||
|
"android.intent.action.ACTION_IDLE_MAINTENANCE_END",
|
||||||
|
"android.intent.action.ACTION_IDLE_MAINTENANCE_START",
|
||||||
|
"android.intent.action.ACTION_POWER_CONNECTED",
|
||||||
|
"android.intent.action.ACTION_POWER_DISCONNECTED",
|
||||||
|
"android.intent.action.ACTION_PREFERRED_ACTIVITY_CHANGED",
|
||||||
|
"android.intent.action.ACTION_SHUTDOWN",
|
||||||
|
"android.intent.action.AIRPLANE_MODE",
|
||||||
|
"android.intent.action.ALARM_CHANGED",
|
||||||
|
"android.intent.action.APPLICATION_RESTRICTIONS_CHANGED",
|
||||||
|
"android.intent.action.BATTERY_CHANGED",
|
||||||
|
"android.intent.action.BATTERY_LOW",
|
||||||
|
"android.intent.action.BATTERY_OKAY",
|
||||||
|
"android.intent.action.BOOT_COMPLETED",
|
||||||
|
"android.intent.action.CALL_DISCONNECT_CAUSE",
|
||||||
|
"android.intent.action.CAMERA_BUTTON",
|
||||||
|
"android.intent.action.CANCEL_ENABLE_ROLLBACK",
|
||||||
|
"android.intent.action.CLEAR_DNS_CACHE",
|
||||||
|
"android.intent.action.CLOSE_SYSTEM_DIALOGS",
|
||||||
|
"android.intent.action.CONFIGURATION_CHANGED",
|
||||||
|
"android.intent.action.CONTENT_CHANGED",
|
||||||
|
"android.intent.action.DATA_SMS_RECEIVED",
|
||||||
|
"android.intent.action.DATA_STALL_DETECTED",
|
||||||
|
"android.intent.action.DATE_CHANGED",
|
||||||
|
"android.intent.action.DEVICE_STORAGE_FULL",
|
||||||
|
"android.intent.action.DEVICE_STORAGE_LOW",
|
||||||
|
"android.intent.action.DEVICE_STORAGE_NOT_FULL",
|
||||||
|
"android.intent.action.DEVICE_STORAGE_OK",
|
||||||
|
"android.intent.action.DISTRACTING_PACKAGES_CHANGED",
|
||||||
|
"android.intent.action.DOCK_EVENT",
|
||||||
|
"android.intent.action.DOWNLOAD_COMPLETE",
|
||||||
|
"android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED",
|
||||||
|
"android.intent.action.DREAMING_STARTED",
|
||||||
|
"android.intent.action.DREAMING_STOPPED",
|
||||||
|
"android.intent.action.DROPBOX_ENTRY_ADDED",
|
||||||
|
"android.intent.action.DYNAMIC_SENSOR_CHANGED",
|
||||||
|
"android.intent.action.EMERGENCY_CALLBACK_MODE_CHANGED",
|
||||||
|
"android.intent.action.EMERGENCY_CALL_STATE_CHANGED",
|
||||||
|
"android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE",
|
||||||
|
"android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE",
|
||||||
|
"android.intent.action.FACTORY_RESET",
|
||||||
|
"android.intent.action.FETCH_VOICEMAIL",
|
||||||
|
"android.intent.action.GTALK_CONNECTED",
|
||||||
|
"android.intent.action.GTALK_DISCONNECTED",
|
||||||
|
"android.intent.action.HEADSET_PLUG",
|
||||||
|
"android.intent.action.HEADSET_PLUG",
|
||||||
|
"android.intent.action.INPUT_METHOD_CHANGED",
|
||||||
|
"android.intent.action.INTENT_FILTER_NEEDS_VERIFICATION",
|
||||||
|
"android.intent.action.LOCALE_CHANGED",
|
||||||
|
"android.intent.action.LOCKED_BOOT_COMPLETED",
|
||||||
|
"android.intent.action.MANAGE_PACKAGE_STORAGE",
|
||||||
|
"android.intent.action.MASTER_CLEAR_NOTIFICATION",
|
||||||
|
"android.intent.action.MEDIA_BAD_REMOVAL",
|
||||||
|
"android.intent.action.MEDIA_BUTTON",
|
||||||
|
"android.intent.action.MEDIA_CHECKING",
|
||||||
|
"android.intent.action.MEDIA_EJECT",
|
||||||
|
"android.intent.action.MEDIA_MOUNTED",
|
||||||
|
"android.intent.action.MEDIA_NOFS",
|
||||||
|
"android.intent.action.MEDIA_REMOVED",
|
||||||
|
"android.intent.action.MEDIA_SCANNER_FINISHED",
|
||||||
|
"android.intent.action.MEDIA_SCANNER_SCAN_FILE",
|
||||||
|
"android.intent.action.MEDIA_SCANNER_STARTED",
|
||||||
|
"android.intent.action.MEDIA_SHARED",
|
||||||
|
"android.intent.action.MEDIA_UNMOUNTABLE",
|
||||||
|
"android.intent.action.MEDIA_UNMOUNTED",
|
||||||
|
"android.intent.action.MY_PACKAGE_REPLACED",
|
||||||
|
"android.intent.action.MY_PACKAGE_SUSPENDED",
|
||||||
|
"android.intent.action.MY_PACKAGE_UNSUSPENDED",
|
||||||
|
"android.intent.action.NEW_OUTGOING_CALL",
|
||||||
|
"android.intent.action.NEW_VOICEMAIL",
|
||||||
|
"android.intent.action.PACKAGES_SUSPENDED",
|
||||||
|
"android.intent.action.PACKAGES_UNSUSPENDED",
|
||||||
|
"android.intent.action.PACKAGE_ADDED",
|
||||||
|
"android.intent.action.PACKAGE_CHANGED",
|
||||||
|
"android.intent.action.PACKAGE_DATA_CLEARED",
|
||||||
|
"android.intent.action.PACKAGE_ENABLE_ROLLBACK",
|
||||||
|
"android.intent.action.PACKAGE_FIRST_LAUNCH",
|
||||||
|
"android.intent.action.PACKAGE_FULLY_REMOVED",
|
||||||
|
"android.intent.action.PACKAGE_INSTALL",
|
||||||
|
"android.intent.action.PACKAGE_NEEDS_INTEGRITY_VERIFICATION",
|
||||||
|
"android.intent.action.PACKAGE_NEEDS_VERIFICATION",
|
||||||
|
"android.intent.action.PACKAGE_REMOVED",
|
||||||
|
"android.intent.action.PACKAGE_REPLACED",
|
||||||
|
"android.intent.action.PACKAGE_RESTARTED",
|
||||||
|
"android.intent.action.PACKAGE_UNSUSPENDED_MANUALLY",
|
||||||
|
"android.intent.action.PACKAGE_VERIFIED",
|
||||||
|
"android.intent.action.PHONE_STATE",
|
||||||
|
"android.intent.action.PROVIDER_CHANGED",
|
||||||
|
"android.intent.action.PROXY_CHANGE",
|
||||||
|
"android.intent.action.QUERY_PACKAGE_RESTART",
|
||||||
|
"android.intent.action.REBOOT",
|
||||||
|
"android.intent.action.ROLLBACK_COMMITTED",
|
||||||
|
"android.intent.action.SCREEN_OFF",
|
||||||
|
"android.intent.action.SCREEN_ON",
|
||||||
|
"android.intent.action.SERVICE_STATE",
|
||||||
|
"android.intent.action.SIM_STATE_CHANGED",
|
||||||
|
"android.intent.action.SPLIT_CONFIGURATION_CHANGED",
|
||||||
|
"android.intent.action.SUB_DEFAULT_CHANGED",
|
||||||
|
"android.intent.action.TIMEZONE_CHANGED",
|
||||||
|
"android.intent.action.TIME_SET",
|
||||||
|
"android.intent.action.TIME_TICK",
|
||||||
|
"android.intent.action.UID_REMOVED",
|
||||||
|
"android.intent.action.UMS_CONNECTED",
|
||||||
|
"android.intent.action.UMS_DISCONNECTED",
|
||||||
|
"android.intent.action.USER_PRESENT",
|
||||||
|
"android.intent.action.USER_UNLOCKED",
|
||||||
|
"android.intent.action.WALLPAPER_CHANGED",
|
||||||
|
"android.media.ACTION_SCO_AUDIO_STATE_UPDATED",
|
||||||
|
"android.media.AUDIO_BECOMING_NOISY",
|
||||||
|
"android.media.INTERNAL_RINGER_MODE_CHANGED_ACTION",
|
||||||
|
"android.media.MASTER_MUTE_CHANGED_ACTION",
|
||||||
|
"android.media.RINGER_MODE_CHANGED",
|
||||||
|
"android.media.SCO_AUDIO_STATE_CHANGED",
|
||||||
|
"android.media.STREAM_DEVICES_CHANGED_ACTION",
|
||||||
|
"android.media.STREAM_MUTE_CHANGED_ACTION",
|
||||||
|
"android.media.VIBRATE_SETTING_CHANGED",
|
||||||
|
"android.media.VOLUME_CHANGED_ACTION",
|
||||||
|
"android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION",
|
||||||
|
"android.media.action.HDMI_AUDIO_PLUG",
|
||||||
|
"android.media.action.MICROPHONE_MUTE_CHANGED",
|
||||||
|
"android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION",
|
||||||
|
"android.media.action.SPEAKERPHONE_STATE_CHANGED",
|
||||||
|
"android.media.tv.action.CHANNEL_BROWSABLE_REQUESTED",
|
||||||
|
"android.media.tv.action.INITIALIZE_PROGRAMS",
|
||||||
|
"android.media.tv.action.PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT",
|
||||||
|
"android.media.tv.action.PREVIEW_PROGRAM_BROWSABLE_DISABLED",
|
||||||
|
"android.media.tv.action.WATCH_NEXT_PROGRAM_BROWSABLE_DISABLED",
|
||||||
|
"android.net.conn.BACKGROUND_DATA_SETTING_CHANGED",
|
||||||
|
"android.net.conn.CAPTIVE_PORTAL_TEST_COMPLETED",
|
||||||
|
"android.net.conn.CONNECTIVITY_CHANGE",
|
||||||
|
"android.net.conn.DATA_ACTIVITY_CHANGE",
|
||||||
|
"android.net.conn.INET_CONDITION_ACTION",
|
||||||
|
"android.net.conn.RESTRICT_BACKGROUND_CHANGED",
|
||||||
|
"android.net.conn.TETHER_STATE_CHANGED",
|
||||||
|
"android.net.nsd.STATE_CHANGED",
|
||||||
|
"android.net.scoring.SCORER_CHANGED",
|
||||||
|
"android.net.scoring.SCORE_NETWORKS",
|
||||||
|
"android.net.sip.action.SIP_CALL_OPTION_CHANGED",
|
||||||
|
"android.net.sip.action.SIP_INCOMING_CALL",
|
||||||
|
"android.net.sip.action.SIP_REMOVE_PROFILE",
|
||||||
|
"android.net.sip.action.SIP_SERVICE_UP",
|
||||||
|
"android.net.sip.action.START_SIP",
|
||||||
|
"android.net.wifi.BATCHED_RESULTS",
|
||||||
|
"android.net.wifi.NETWORK_IDS_CHANGED",
|
||||||
|
"android.net.wifi.RSSI_CHANGED",
|
||||||
|
"android.net.wifi.SCAN_RESULTS",
|
||||||
|
"android.net.wifi.STATE_CHANGE",
|
||||||
|
"android.net.wifi.WIFI_STATE_CHANGED",
|
||||||
|
"android.net.wifi.action.WIFI_NETWORK_SUGGESTION_POST_CONNECTION",
|
||||||
|
"android.net.wifi.action.WIFI_SCAN_AVAILABILITY_CHANGED",
|
||||||
|
"android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED",
|
||||||
|
"android.net.wifi.p2p.CONNECTION_STATE_CHANGE",
|
||||||
|
"android.net.wifi.p2p.DISCOVERY_STATE_CHANGE",
|
||||||
|
"android.net.wifi.p2p.PEERS_CHANGED",
|
||||||
|
"android.net.wifi.p2p.STATE_CHANGED",
|
||||||
|
"android.net.wifi.p2p.THIS_DEVICE_CHANGED",
|
||||||
|
"android.net.wifi.rtt.action.WIFI_RTT_STATE_CHANGED",
|
||||||
|
"android.net.wifi.supplicant.CONNECTION_CHANGE",
|
||||||
|
"android.net.wifi.supplicant.STATE_CHANGE",
|
||||||
|
"android.nfc.action.ADAPTER_STATE_CHANGED",
|
||||||
|
"android.nfc.action.PREFERRED_PAYMENT_CHANGED",
|
||||||
|
"android.nfc.action.TRANSACTION_DETECTED",
|
||||||
|
"android.os.action.ACTION_EFFECTS_SUPPRESSOR_CHANGED",
|
||||||
|
"android.os.action.DEVICE_IDLE_MODE_CHANGED",
|
||||||
|
"android.os.action.LIGHT_DEVICE_IDLE_MODE_CHANGED",
|
||||||
|
"android.os.action.POWER_SAVE_MODE_CHANGED",
|
||||||
|
"android.os.action.POWER_SAVE_MODE_CHANGED_INTERNAL",
|
||||||
|
"android.os.action.POWER_SAVE_MODE_CHANGING",
|
||||||
|
"android.os.action.POWER_SAVE_TEMP_WHITELIST_CHANGED",
|
||||||
|
"android.os.action.POWER_SAVE_WHITELIST_CHANGED",
|
||||||
|
"android.os.action.UPDATE_EMERGENCY_NUMBER_DB",
|
||||||
|
"android.provider.Telephony.MMS_DOWNLOADED",
|
||||||
|
"android.provider.Telephony.SECRET_CODE",
|
||||||
|
"android.provider.Telephony.SIM_FULL",
|
||||||
|
"android.provider.Telephony.SMS_CARRIER_PROVISION",
|
||||||
|
"android.provider.Telephony.SMS_CB_RECEIVED",
|
||||||
|
"android.provider.Telephony.SMS_DELIVER",
|
||||||
|
"android.provider.Telephony.SMS_RECEIVED",
|
||||||
|
"android.provider.Telephony.SMS_REJECTED",
|
||||||
|
"android.provider.Telephony.SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED",
|
||||||
|
"android.provider.Telephony.WAP_PUSH_DELIVER",
|
||||||
|
"android.provider.Telephony.WAP_PUSH_RECEIVED",
|
||||||
|
"android.provider.action.DEFAULT_SMS_PACKAGE_CHANGED",
|
||||||
|
"android.provider.action.EXTERNAL_PROVIDER_CHANGE",
|
||||||
|
"android.provider.action.SMS_EMERGENCY_CB_RECEIVED",
|
||||||
|
"android.provider.action.SMS_MMS_DB_CREATED",
|
||||||
|
"android.provider.action.SMS_MMS_DB_LOST",
|
||||||
|
"android.provider.action.SYNC_VOICEMAIL",
|
||||||
|
"android.security.STORAGE_CHANGED",
|
||||||
|
"android.security.action.KEYCHAIN_CHANGED",
|
||||||
|
"android.security.action.KEY_ACCESS_CHANGED",
|
||||||
|
"android.security.action.TRUST_STORE_CHANGED",
|
||||||
|
"android.service.controls.action.ADD_CONTROL",
|
||||||
|
"android.settings.ENABLE_MMS_DATA_REQUEST",
|
||||||
|
"android.speech.tts.TTS_QUEUE_PROCESSING_COMPLETED",
|
||||||
|
"android.speech.tts.engine.TTS_DATA_INSTALLED",
|
||||||
|
"android.telephony.action.AREA_INFO_UPDATED",
|
||||||
|
"android.telephony.action.DEFAULT_SMS_SUBSCRIPTION_CHANGED",
|
||||||
|
"android.telephony.action.DEFAULT_SUBSCRIPTION_CHANGED",
|
||||||
|
"android.telephony.action.PRIMARY_SUBSCRIPTION_LIST_CHANGED",
|
||||||
|
"android.telephony.action.REFRESH_SUBSCRIPTION_PLANS",
|
||||||
|
"android.telephony.action.SECRET_CODE",
|
||||||
|
"android.telephony.action.SERVICE_PROVIDERS_UPDATED",
|
||||||
|
"android.telephony.action.SIM_APPLICATION_STATE_CHANGED",
|
||||||
|
"android.telephony.action.SIM_CARD_STATE_CHANGED",
|
||||||
|
"android.telephony.action.SIM_SLOT_STATUS_CHANGED",
|
||||||
|
"android.telephony.action.SUBSCRIPTION_CARRIER_IDENTITY_CHANGED",
|
||||||
|
"android.telephony.action.SUBSCRIPTION_PLANS_CHANGED",
|
||||||
|
"android.telephony.action.SUBSCRIPTION_SPECIFIC_CARRIER_IDENTITY_CHANGED",
|
||||||
|
"android.telephony.euicc.action.NOTIFY_CARRIER_SETUP_INCOMPLETE",
|
||||||
|
"android.telephony.euicc.action.OTA_STATUS_CHANGED",
|
||||||
|
"android.telephony.ims.action.WFC_IMS_REGISTRATION_ERROR",
|
||||||
|
"com.android.intent.action.DISMISS_KEYBOARD_SHORTCUTS",
|
||||||
|
"com.android.intent.action.SHOW_KEYBOARD_SHORTCUTS",
|
||||||
|
"com.android.internal.intent.action.ACTION_FORBIDDEN_NO_SERVICE_AUTHORIZATION",
|
||||||
|
"com.android.internal.provider.action.VOICEMAIL_SMS_RECEIVED"
|
||||||
|
};
|
||||||
|
}
|
@ -272,6 +272,7 @@ public class ActivityManageTriggerNotification extends Activity
|
|||||||
directions = new String[] {
|
directions = new String[] {
|
||||||
getResources().getString(R.string.directionStringEquals),
|
getResources().getString(R.string.directionStringEquals),
|
||||||
getResources().getString(R.string.directionStringContains),
|
getResources().getString(R.string.directionStringContains),
|
||||||
|
getResources().getString(R.string.directionStringDoesNotContain),
|
||||||
getResources().getString(R.string.directionStringStartsWith),
|
getResources().getString(R.string.directionStringStartsWith),
|
||||||
getResources().getString(R.string.directionStringEndsWith),
|
getResources().getString(R.string.directionStringEndsWith),
|
||||||
getResources().getString(R.string.directionStringNotEquals)
|
getResources().getString(R.string.directionStringNotEquals)
|
||||||
@ -321,23 +322,14 @@ public class ActivityManageTriggerNotification extends Activity
|
|||||||
String textDir = Trigger.getMatchCode(spinnerTextDirection.getSelectedItem().toString());
|
String textDir = Trigger.getMatchCode(spinnerTextDirection.getSelectedItem().toString());
|
||||||
String text = etNotificationText.getText().toString();
|
String text = etNotificationText.getText().toString();
|
||||||
|
|
||||||
if(edit)
|
Intent data = new Intent();
|
||||||
{
|
data.putExtra(intentNameNotificationDirection, chkNotificationDirection.isChecked());
|
||||||
editedNotificationTrigger.setTriggerParameter(chkNotificationDirection.isChecked());
|
data.putExtra(intentNameNotificationApp, app);
|
||||||
editedNotificationTrigger.setTriggerParameter2(app + triggerParameter2Split + titleDir + triggerParameter2Split + title + triggerParameter2Split + textDir + triggerParameter2Split + text);
|
data.putExtra(intentNameNotificationTitleDir, titleDir);
|
||||||
ActivityManageTriggerNotification.this.setResult(RESULT_OK);
|
data.putExtra(intentNameNotificationTitle, title);
|
||||||
}
|
data.putExtra(intentNameNotificationTextDir, textDir);
|
||||||
else
|
data.putExtra(intentNameNotificationText, text);
|
||||||
{
|
ActivityManageTriggerNotification.this.setResult(RESULT_OK, data);
|
||||||
Intent data = new Intent();
|
|
||||||
data.putExtra(intentNameNotificationDirection, chkNotificationDirection.isChecked());
|
|
||||||
data.putExtra(intentNameNotificationApp, app);
|
|
||||||
data.putExtra(intentNameNotificationTitleDir, titleDir);
|
|
||||||
data.putExtra(intentNameNotificationTitle, title);
|
|
||||||
data.putExtra(intentNameNotificationTextDir, textDir);
|
|
||||||
data.putExtra(intentNameNotificationText, text);
|
|
||||||
ActivityManageTriggerNotification.this.setResult(RESULT_OK, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
@ -86,8 +86,8 @@ public class ActivityManageTriggerPhoneCall extends Activity
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Intent data = new Intent();
|
Intent data = new Intent();
|
||||||
data.putExtra("triggerParameter", false);
|
data.putExtra(ActivityManageRule.intentNameTriggerParameter1, false);
|
||||||
data.putExtra("triggerParameter2", tp2Result);
|
data.putExtra(ActivityManageRule.intentNameTriggerParameter2, tp2Result);
|
||||||
ActivityManageTriggerPhoneCall.this.setResult(RESULT_OK, data);
|
ActivityManageTriggerPhoneCall.this.setResult(RESULT_OK, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,13 +10,13 @@ import android.widget.CheckBox;
|
|||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.TextView;
|
||||||
import android.widget.TimePicker;
|
import android.widget.TimePicker;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.sql.Time;
|
import java.sql.Time;
|
||||||
import java.text.ParseException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
@ -27,6 +27,7 @@ public class ActivityManageTriggerTimeFrame extends Activity
|
|||||||
CheckBox checkMonday, checkTuesday, checkWednesday, checkThursday, checkFriday, checkSaturday, checkSunday, chkRepeat;
|
CheckBox checkMonday, checkTuesday, checkWednesday, checkThursday, checkFriday, checkSaturday, checkSunday, chkRepeat;
|
||||||
RadioButton radioTimeFrameEntering, radioTimeFrameLeaving;
|
RadioButton radioTimeFrameEntering, radioTimeFrameLeaving;
|
||||||
EditText etRepeatEvery;
|
EditText etRepeatEvery;
|
||||||
|
TextView tvDaysHint;
|
||||||
|
|
||||||
static Trigger editedTimeFrameTrigger = null;
|
static Trigger editedTimeFrameTrigger = null;
|
||||||
|
|
||||||
@ -53,17 +54,18 @@ public class ActivityManageTriggerTimeFrame extends Activity
|
|||||||
radioTimeFrameLeaving = (RadioButton)findViewById(R.id.radioTimeFrameLeaving);
|
radioTimeFrameLeaving = (RadioButton)findViewById(R.id.radioTimeFrameLeaving);
|
||||||
chkRepeat = (CheckBox)findViewById(R.id.chkRepeat);
|
chkRepeat = (CheckBox)findViewById(R.id.chkRepeat);
|
||||||
etRepeatEvery = (EditText)findViewById(R.id.etRepeatEvery);
|
etRepeatEvery = (EditText)findViewById(R.id.etRepeatEvery);
|
||||||
|
tvDaysHint = (TextView)findViewById(R.id.tvDaysHint);
|
||||||
|
|
||||||
bSaveTimeFrame.setOnClickListener(new OnClickListener()
|
bSaveTimeFrame.setOnClickListener(new OnClickListener()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v)
|
public void onClick(View v)
|
||||||
{
|
{
|
||||||
Time startTime = new Time(0);
|
TimeObject startTime = new TimeObject();
|
||||||
startTime.setHours(startPicker.getCurrentHour());
|
startTime.setHours(startPicker.getCurrentHour());
|
||||||
startTime.setMinutes(startPicker.getCurrentMinute());
|
startTime.setMinutes(startPicker.getCurrentMinute());
|
||||||
|
|
||||||
Time stopTime = new Time(0);
|
TimeObject stopTime = new TimeObject();
|
||||||
stopTime.setHours(stopPicker.getCurrentHour());
|
stopTime.setHours(stopPicker.getCurrentHour());
|
||||||
stopTime.setMinutes(stopPicker.getCurrentMinute());
|
stopTime.setMinutes(stopPicker.getCurrentMinute());
|
||||||
|
|
||||||
@ -181,6 +183,31 @@ public class ActivityManageTriggerTimeFrame extends Activity
|
|||||||
editedTimeFrameTrigger.setTimeFrame(new TimeFrame(editedTimeFrameTrigger.getTriggerParameter2()));
|
editedTimeFrameTrigger.setTimeFrame(new TimeFrame(editedTimeFrameTrigger.getTriggerParameter2()));
|
||||||
loadVariableIntoGui();
|
loadVariableIntoGui();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TimePicker.OnTimeChangedListener pickerListener = new TimePicker.OnTimeChangedListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onTimeChanged(TimePicker timePicker, int i, int i1)
|
||||||
|
{
|
||||||
|
if(
|
||||||
|
startPicker.getCurrentHour() > stopPicker.getCurrentHour()
|
||||||
|
||
|
||||||
|
(
|
||||||
|
startPicker.getCurrentHour() == stopPicker.getCurrentHour()
|
||||||
|
&&
|
||||||
|
startPicker.getCurrentMinute() >= stopPicker.getCurrentMinute()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
tvDaysHint.setText(getResources().getString(R.string.timeFrameDaysHint));
|
||||||
|
else
|
||||||
|
tvDaysHint.setText("");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
startPicker.setOnTimeChangedListener(pickerListener);
|
||||||
|
stopPicker.setOnTimeChangedListener(pickerListener);
|
||||||
|
|
||||||
|
// Perform check once
|
||||||
|
pickerListener.onTimeChanged(null, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadVariableIntoGui()
|
private void loadVariableIntoGui()
|
||||||
|
@ -224,7 +224,7 @@ public class ActivityPermissions extends Activity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void addToArrayListUnique(String value, ArrayList<String> list)
|
public static void addToArrayListUnique(String value, List<String> list)
|
||||||
{
|
{
|
||||||
if (!list.contains(value))
|
if (!list.contains(value))
|
||||||
list.add(value);
|
list.add(value);
|
||||||
|
@ -33,6 +33,7 @@ import com.jens.automation2.receivers.PackageReplacedReceiver;
|
|||||||
import com.jens.automation2.receivers.PhoneStatusListener;
|
import com.jens.automation2.receivers.PhoneStatusListener;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public class AutomationService extends Service implements OnInitListener
|
public class AutomationService extends Service implements OnInitListener
|
||||||
@ -193,6 +194,9 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
{
|
{
|
||||||
Bundle b = intent.getExtras();
|
Bundle b = intent.getExtras();
|
||||||
startAtBoot = b.getBoolean("startAtBoot", false);
|
startAtBoot = b.getBoolean("startAtBoot", false);
|
||||||
|
|
||||||
|
if(startAtBoot)
|
||||||
|
Settings.deviceStartDone = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkStartupRequirements(this, startAtBoot))
|
if (checkStartupRequirements(this, startAtBoot))
|
||||||
@ -212,12 +216,9 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
ActivityMainScreen.updateMainScreen();
|
ActivityMainScreen.updateMainScreen();
|
||||||
|
|
||||||
this.isRunning = true;
|
this.isRunning = true;
|
||||||
|
|
||||||
Miscellaneous.logEvent("i", "Service", this.getResources().getString(R.string.serviceStarted) + " VERSION_CODE: " + BuildConfig.VERSION_CODE + ", VERSION_NAME: " + BuildConfig.VERSION_NAME + ", flavor: " + BuildConfig.FLAVOR, 1);
|
Miscellaneous.logEvent("i", "Service", this.getResources().getString(R.string.serviceStarted) + " VERSION_CODE: " + BuildConfig.VERSION_CODE + ", VERSION_NAME: " + BuildConfig.VERSION_NAME + ", flavor: " + BuildConfig.FLAVOR, 1);
|
||||||
Toast.makeText(this, this.getResources().getString(R.string.serviceStarted), Toast.LENGTH_LONG).show();
|
Toast.makeText(this, this.getResources().getString(R.string.serviceStarted), Toast.LENGTH_LONG).show();
|
||||||
// ********** Test area **********
|
|
||||||
// Miscellaneous.logEvent("i", "setNetworkType", "bin hier.", 3);
|
|
||||||
// Actions.setData(true);
|
|
||||||
// ********** Test area **********
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
On normal phones the app is supposed to automatically restart in case of any problems.
|
On normal phones the app is supposed to automatically restart in case of any problems.
|
||||||
@ -247,8 +248,6 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
reloadSettings, reloadPointsOfInterest, reloadRules, updateNotification
|
reloadSettings, reloadPointsOfInterest, reloadRules, updateNotification
|
||||||
}
|
}
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
public void serviceInterface(serviceCommands command)
|
public void serviceInterface(serviceCommands command)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "Bind", "Ahhhh, customers... How can I help you?", 5);
|
Miscellaneous.logEvent("i", "Bind", "Ahhhh, customers... How can I help you?", 5);
|
||||||
@ -318,6 +317,8 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
|
|
||||||
private void startUpRoutine()
|
private void startUpRoutine()
|
||||||
{
|
{
|
||||||
|
Settings.serviceStartDone = false;
|
||||||
|
|
||||||
checkForTtsEngine();
|
checkForTtsEngine();
|
||||||
checkForPermissions();
|
checkForPermissions();
|
||||||
checkForRestrictedFeatures();
|
checkForRestrictedFeatures();
|
||||||
@ -336,6 +337,9 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
if(r.getsGreenLight(AutomationService.this))
|
if(r.getsGreenLight(AutomationService.this))
|
||||||
r.activate(AutomationService.this, false);
|
r.activate(AutomationService.this, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Settings.serviceStartDone = true;
|
||||||
|
Settings.deviceStartDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void startLocationProvider()
|
protected void startLocationProvider()
|
||||||
@ -558,11 +562,11 @@ public class AutomationService extends Service implements OnInitListener
|
|||||||
if(activePoi == null)
|
if(activePoi == null)
|
||||||
{
|
{
|
||||||
PointOfInterest closestPoi = PointOfInterest.getClosestPOI(instance.getLocationProvider().getCurrentLocation());
|
PointOfInterest closestPoi = PointOfInterest.getClosestPOI(instance.getLocationProvider().getCurrentLocation());
|
||||||
bodyText = AutomationService.getInstance().getResources().getString(R.string.activePoi) + ": " + AutomationService.getInstance().getResources().getString(R.string.none) + "\n" + AutomationService.getInstance().getResources().getString(R.string.closestPoi) + ": " + closestPoi.getName() + lastRuleString;
|
bodyText = AutomationService.getInstance().getResources().getString(R.string.activePoi) + " " + AutomationService.getInstance().getResources().getString(R.string.none) + "\n" + AutomationService.getInstance().getResources().getString(R.string.closestPoi) + ": " + closestPoi.getName() + lastRuleString;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bodyText = AutomationService.getInstance().getResources().getString(R.string.activePoi) + ": " + activePoi.getName() + lastRuleString;
|
bodyText = AutomationService.getInstance().getResources().getString(R.string.activePoi) + " " + activePoi.getName() + lastRuleString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(NullPointerException e)
|
catch(NullPointerException e)
|
||||||
|
@ -481,6 +481,8 @@ public class Miscellaneous extends Service
|
|||||||
return !haystack.equalsIgnoreCase(needle);
|
return !haystack.equalsIgnoreCase(needle);
|
||||||
case Trigger.directionContains:
|
case Trigger.directionContains:
|
||||||
return haystack.toLowerCase().contains(needle.toLowerCase());
|
return haystack.toLowerCase().contains(needle.toLowerCase());
|
||||||
|
case Trigger.directionNotContains:
|
||||||
|
return !haystack.toLowerCase().contains(needle.toLowerCase());
|
||||||
case Trigger.directionStartsWith:
|
case Trigger.directionStartsWith:
|
||||||
return haystack.toLowerCase().startsWith(needle.toLowerCase());
|
return haystack.toLowerCase().startsWith(needle.toLowerCase());
|
||||||
case Trigger.directionEndsWith:
|
case Trigger.directionEndsWith:
|
||||||
@ -490,7 +492,7 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int compareTimes(Time time1, Time time2)
|
public static int compareTimes(TimeObject time1, TimeObject time2)
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "TimeCompare", "To compare: " + time1.toString() + " / " + time2.toString());
|
// Miscellaneous.logEvent("i", "TimeCompare", "To compare: " + time1.toString() + " / " + time2.toString());
|
||||||
|
|
||||||
@ -710,14 +712,6 @@ public class Miscellaneous extends Service
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// alertDialog.setNegativeButton(context.getResources().getString(R.string.cancel), new DialogInterface.OnClickListener()
|
|
||||||
// {
|
|
||||||
// public void onClick(DialogInterface dialog, int whichButton)
|
|
||||||
// {
|
|
||||||
// // Canceled.
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
return alertDialog.create();
|
return alertDialog.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.jens.automation2.location.CellLocationChangedReceiver;
|
import com.jens.automation2.location.CellLocationChangedReceiver;
|
||||||
import com.jens.automation2.location.WifiBroadcastReceiver;
|
import com.jens.automation2.location.WifiBroadcastReceiver;
|
||||||
|
import com.jens.automation2.receivers.BroadcastListener;
|
||||||
import com.jens.automation2.receivers.DateTimeListener;
|
import com.jens.automation2.receivers.DateTimeListener;
|
||||||
import com.jens.automation2.receivers.AutomationListenerInterface;
|
import com.jens.automation2.receivers.AutomationListenerInterface;
|
||||||
import com.jens.automation2.receivers.BatteryReceiver;
|
import com.jens.automation2.receivers.BatteryReceiver;
|
||||||
@ -67,6 +68,7 @@ public class ReceiverCoordinator
|
|||||||
DateTimeListener.class,
|
DateTimeListener.class,
|
||||||
BatteryReceiver.class,
|
BatteryReceiver.class,
|
||||||
BluetoothReceiver.class,
|
BluetoothReceiver.class,
|
||||||
|
BroadcastListener.class,
|
||||||
ConnectivityReceiver.class,
|
ConnectivityReceiver.class,
|
||||||
DeviceOrientationListener.class,
|
DeviceOrientationListener.class,
|
||||||
HeadphoneJackListener.class,
|
HeadphoneJackListener.class,
|
||||||
@ -163,6 +165,10 @@ 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());
|
||||||
|
|
||||||
|
// startBroadcastListener
|
||||||
|
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.broadcastReceived))
|
||||||
|
BroadcastListener.getInstance().startListener(AutomationService.getInstance());
|
||||||
|
|
||||||
// startProcessListener
|
// startProcessListener
|
||||||
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());
|
||||||
@ -206,6 +212,7 @@ public class ReceiverCoordinator
|
|||||||
TimeZoneListener.stopTimeZoneListener();
|
TimeZoneListener.stopTimeZoneListener();
|
||||||
DateTimeListener.stopAlarmListener(AutomationService.getInstance());
|
DateTimeListener.stopAlarmListener(AutomationService.getInstance());
|
||||||
NoiseListener.stopNoiseListener();
|
NoiseListener.stopNoiseListener();
|
||||||
|
BroadcastListener.getInstance().stopListener(AutomationService.getInstance());
|
||||||
ProcessListener.stopProcessListener(AutomationService.getInstance());
|
ProcessListener.stopProcessListener(AutomationService.getInstance());
|
||||||
MediaPlayerListener.getInstance().stopListener(AutomationService.getInstance());
|
MediaPlayerListener.getInstance().stopListener(AutomationService.getInstance());
|
||||||
DeviceOrientationListener.getInstance().stopListener(AutomationService.getInstance());
|
DeviceOrientationListener.getInstance().stopListener(AutomationService.getInstance());
|
||||||
@ -215,7 +222,7 @@ public class ReceiverCoordinator
|
|||||||
Class testClass = Class.forName(ActivityManageRule.activityDetectionClassPath);
|
Class testClass = Class.forName(ActivityManageRule.activityDetectionClassPath);
|
||||||
Miscellaneous.runMethodReflective("ActivityDetectionReceiver", "stopActivityDetectionReceiver", null);
|
Miscellaneous.runMethodReflective("ActivityDetectionReceiver", "stopActivityDetectionReceiver", null);
|
||||||
}
|
}
|
||||||
catch(ClassNotFoundException e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
// Nothing to do, just not stopping this one.
|
// Nothing to do, just not stopping this one.
|
||||||
}
|
}
|
||||||
@ -266,6 +273,17 @@ public class ReceiverCoordinator
|
|||||||
NoiseListener.stopNoiseListener();
|
NoiseListener.stopNoiseListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.broadcastReceived))
|
||||||
|
{
|
||||||
|
Miscellaneous.logEvent("i", "LocationProvider", "Starting BroadcastReceiver because used in a new/changed rule.", 4);
|
||||||
|
BroadcastListener.getInstance().startListener(AutomationService.getInstance());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Miscellaneous.logEvent("i", "LocationProvider", "Shutting down BroadcastReceiver because not used in any rule.", 4);
|
||||||
|
BroadcastListener.getInstance().stopListener(AutomationService.getInstance());
|
||||||
|
}
|
||||||
|
|
||||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.process_started_stopped))
|
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.process_started_stopped))
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "LocationProvider", "Starting ProcessListener because used in a new/changed rule.", 4);
|
Miscellaneous.logEvent("i", "LocationProvider", "Starting ProcessListener because used in a new/changed rule.", 4);
|
||||||
|
@ -12,7 +12,7 @@ import java.util.Set;
|
|||||||
public class Settings implements SharedPreferences
|
public class Settings implements SharedPreferences
|
||||||
{
|
{
|
||||||
public static final int rulesThatHaveBeenRanHistorySize = 10;
|
public static final int rulesThatHaveBeenRanHistorySize = 10;
|
||||||
public final static int lockSoundChangesInterval = 15;
|
public static final int lockSoundChangesInterval = 15;
|
||||||
public static final int newsPollEveryXDays = 3;
|
public static final int newsPollEveryXDays = 3;
|
||||||
public static final int newsDisplayForXDays = 3;
|
public static final int newsDisplayForXDays = 3;
|
||||||
public static final int updateCheckFrequencyDays = 7;
|
public static final int updateCheckFrequencyDays = 7;
|
||||||
@ -77,7 +77,13 @@ public class Settings implements SharedPreferences
|
|||||||
public static ArrayList<String> whatHasBeenDone;
|
public static ArrayList<String> whatHasBeenDone;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Generic settings valid for all installations and not changable
|
Not saved permanently.
|
||||||
|
*/
|
||||||
|
public static boolean deviceStartDone = true; // by default assume device has not just been started
|
||||||
|
public static boolean serviceStartDone = false;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Generic settings valid for all installations and not changeable
|
||||||
*/
|
*/
|
||||||
public static final String dateFormat = "E dd.MM.yyyy HH:mm:ss:ssss";
|
public static final String dateFormat = "E dd.MM.yyyy HH:mm:ss:ssss";
|
||||||
|
|
||||||
@ -600,5 +606,4 @@ public class Settings implements SharedPreferences
|
|||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -6,8 +6,8 @@ import java.util.ArrayList;
|
|||||||
public class TimeFrame
|
public class TimeFrame
|
||||||
{
|
{
|
||||||
// Defines a timeframe
|
// Defines a timeframe
|
||||||
protected Time triggerTimeStart;
|
protected TimeObject triggerTimeStart;
|
||||||
protected Time triggerTimeStop;
|
protected TimeObject triggerTimeStop;
|
||||||
protected long repetition;
|
protected long repetition;
|
||||||
|
|
||||||
protected final static String separator = "/";
|
protected final static String separator = "/";
|
||||||
@ -34,20 +34,20 @@ public class TimeFrame
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Time getTriggerTimeStart()
|
public TimeObject getTriggerTimeStart()
|
||||||
{
|
{
|
||||||
return triggerTimeStart;
|
return triggerTimeStart;
|
||||||
}
|
}
|
||||||
public void setTriggerTimeStart(Time triggerTimeStart)
|
public void setTriggerTimeStart(TimeObject triggerTimeStart)
|
||||||
{
|
{
|
||||||
this.triggerTimeStart = triggerTimeStart;
|
this.triggerTimeStart = triggerTimeStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Time getTriggerTimeStop()
|
public TimeObject getTriggerTimeStop()
|
||||||
{
|
{
|
||||||
return triggerTimeStop;
|
return triggerTimeStop;
|
||||||
}
|
}
|
||||||
public void setTriggerTimeStop(Time triggerTimeStop)
|
public void setTriggerTimeStop(TimeObject triggerTimeStop)
|
||||||
{
|
{
|
||||||
this.triggerTimeStop = triggerTimeStop;
|
this.triggerTimeStop = triggerTimeStop;
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ public class TimeFrame
|
|||||||
this.repetition = repetition;
|
this.repetition = repetition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TimeFrame (Time timeStart, Time timeEnd, ArrayList<Integer> dayList2, long repetition)
|
public TimeFrame (TimeObject timeStart, TimeObject timeEnd, ArrayList<Integer> dayList2, long repetition)
|
||||||
{
|
{
|
||||||
this.setTriggerTimeStart(timeStart);
|
this.setTriggerTimeStart(timeStart);
|
||||||
this.setTriggerTimeStop(timeEnd);
|
this.setTriggerTimeStop(timeEnd);
|
||||||
@ -73,8 +73,8 @@ public class TimeFrame
|
|||||||
public TimeFrame (String fileContent)
|
public TimeFrame (String fileContent)
|
||||||
{
|
{
|
||||||
String[] dateArray = fileContent.split(separator); // example: timestart/timestop/days[int]/repetition
|
String[] dateArray = fileContent.split(separator); // example: timestart/timestop/days[int]/repetition
|
||||||
this.setTriggerTimeStart(Time.valueOf(dateArray[0]));
|
this.setTriggerTimeStart(TimeObject.valueOf(dateArray[0]));
|
||||||
this.setTriggerTimeStop(Time.valueOf(dateArray[1]));
|
this.setTriggerTimeStop(TimeObject.valueOf(dateArray[1]));
|
||||||
this.setDayListFromString(dateArray[2]);
|
this.setDayListFromString(dateArray[2]);
|
||||||
if(dateArray.length > 3) // may not exist in old config files
|
if(dateArray.length > 3) // may not exist in old config files
|
||||||
this.setRepetition(Long.parseLong(dateArray[3]));
|
this.setRepetition(Long.parseLong(dateArray[3]));
|
||||||
|
68
app/src/main/java/com/jens/automation2/TimeObject.java
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
package com.jens.automation2;
|
||||||
|
|
||||||
|
import java.sql.Time;
|
||||||
|
|
||||||
|
public class TimeObject
|
||||||
|
{
|
||||||
|
int hours, minutes, seconds;
|
||||||
|
|
||||||
|
public TimeObject()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHours()
|
||||||
|
{
|
||||||
|
return hours;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHours(int hours)
|
||||||
|
{
|
||||||
|
this.hours = hours;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMinutes()
|
||||||
|
{
|
||||||
|
return minutes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinutes(int minutes)
|
||||||
|
{
|
||||||
|
this.minutes = minutes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSeconds()
|
||||||
|
{
|
||||||
|
return seconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSeconds(int seconds)
|
||||||
|
{
|
||||||
|
this.seconds = seconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TimeObject(int hours, int minutes, int seconds)
|
||||||
|
{
|
||||||
|
this.hours = hours;
|
||||||
|
this.minutes = minutes;
|
||||||
|
this.seconds = seconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TimeObject valueOf(String input)
|
||||||
|
{
|
||||||
|
TimeObject ro = null;
|
||||||
|
|
||||||
|
if(input.contains(":"))
|
||||||
|
{
|
||||||
|
String[] parts = input.split(":");
|
||||||
|
if(parts.length == 2)
|
||||||
|
ro = new TimeObject(Integer.parseInt(parts[0]), Integer.parseInt(parts[1]), 0);
|
||||||
|
else if(parts.length == 3)
|
||||||
|
ro = new TimeObject(Integer.parseInt(parts[0]), Integer.parseInt(parts[1]), Integer.parseInt(parts[2]));
|
||||||
|
else
|
||||||
|
Miscellaneous.logEvent("w", "TimeObject", "Invalid length for time. Input: " + input, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ro;
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,6 @@ package com.jens.automation2;
|
|||||||
import android.bluetooth.BluetoothDevice;
|
import android.bluetooth.BluetoothDevice;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.service.notification.StatusBarNotification;
|
import android.service.notification.StatusBarNotification;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -14,6 +13,7 @@ import com.jens.automation2.location.LocationProvider;
|
|||||||
import com.jens.automation2.location.WifiBroadcastReceiver;
|
import com.jens.automation2.location.WifiBroadcastReceiver;
|
||||||
import com.jens.automation2.receivers.BatteryReceiver;
|
import com.jens.automation2.receivers.BatteryReceiver;
|
||||||
import com.jens.automation2.receivers.BluetoothReceiver;
|
import com.jens.automation2.receivers.BluetoothReceiver;
|
||||||
|
import com.jens.automation2.receivers.BroadcastListener;
|
||||||
import com.jens.automation2.receivers.ConnectivityReceiver;
|
import com.jens.automation2.receivers.ConnectivityReceiver;
|
||||||
import com.jens.automation2.receivers.DeviceOrientationListener;
|
import com.jens.automation2.receivers.DeviceOrientationListener;
|
||||||
import com.jens.automation2.receivers.HeadphoneJackListener;
|
import com.jens.automation2.receivers.HeadphoneJackListener;
|
||||||
@ -25,10 +25,6 @@ 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.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_TITLE;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.sql.Time;
|
import java.sql.Time;
|
||||||
@ -38,8 +34,32 @@ import java.util.Date;
|
|||||||
|
|
||||||
public class Trigger
|
public class Trigger
|
||||||
{
|
{
|
||||||
public enum Trigger_Enum {
|
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, musicPlaying, phoneCall; //phoneCall always needs to be at the very end because of Google's shitty so called privacy
|
{
|
||||||
|
pointOfInterest,
|
||||||
|
timeFrame,
|
||||||
|
charging,
|
||||||
|
batteryLevel,
|
||||||
|
usb_host_connection,
|
||||||
|
speed,
|
||||||
|
noiseLevel,
|
||||||
|
wifiConnection,
|
||||||
|
process_started_stopped,
|
||||||
|
airplaneMode,
|
||||||
|
roaming,
|
||||||
|
nfcTag,
|
||||||
|
activityDetection,
|
||||||
|
bluetoothConnection,
|
||||||
|
headsetPlugged,
|
||||||
|
notification,
|
||||||
|
deviceOrientation,
|
||||||
|
profileActive,
|
||||||
|
screenState,
|
||||||
|
musicPlaying,
|
||||||
|
deviceStarts,
|
||||||
|
serviceStarts,
|
||||||
|
broadcastReceived,
|
||||||
|
phoneCall; //phoneCall always needs to be at the very end because of Google's shitty so called privacy
|
||||||
|
|
||||||
public String getFullName(Context context)
|
public String getFullName(Context context)
|
||||||
{
|
{
|
||||||
@ -87,6 +107,12 @@ public class Trigger
|
|||||||
return context.getResources().getString(R.string.musicPlaying);
|
return context.getResources().getString(R.string.musicPlaying);
|
||||||
case screenState:
|
case screenState:
|
||||||
return context.getResources().getString(R.string.screenState);
|
return context.getResources().getString(R.string.screenState);
|
||||||
|
case deviceStarts:
|
||||||
|
return context.getResources().getString(R.string.deviceStarts);
|
||||||
|
case serviceStarts:
|
||||||
|
return context.getResources().getString(R.string.serviceStarts);
|
||||||
|
case broadcastReceived:
|
||||||
|
return context.getResources().getString(R.string.broadcastReceivedTitle);
|
||||||
default:
|
default:
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
@ -190,6 +216,18 @@ public class Trigger
|
|||||||
if(!checkScreenState())
|
if(!checkScreenState())
|
||||||
result = false;
|
result = false;
|
||||||
break;
|
break;
|
||||||
|
case deviceStarts:
|
||||||
|
if(!checkDeviceStarts())
|
||||||
|
result = false;
|
||||||
|
break;
|
||||||
|
case serviceStarts:
|
||||||
|
if(!checkServiceStarts())
|
||||||
|
result = false;
|
||||||
|
break;
|
||||||
|
case broadcastReceived:
|
||||||
|
if(!checkBroadcastReceived())
|
||||||
|
result = false;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -206,7 +244,19 @@ public class Trigger
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean checkNotification()
|
boolean checkBroadcastReceived()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
We cannot reasonably check the current state for every broadcast event.
|
||||||
|
We can only hope that when starting the receiver we get an initial broadcast
|
||||||
|
for every current state. That collection of states will be saved and checked if
|
||||||
|
it contains the specific event of this trigger.
|
||||||
|
*/
|
||||||
|
|
||||||
|
return triggerParameter == BroadcastListener.getInstance().hasBroadcastOccurred(triggerParameter2);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean checkNotification()
|
||||||
{
|
{
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
|
||||||
{
|
{
|
||||||
@ -343,6 +393,16 @@ public class Trigger
|
|||||||
return triggerParameter == MediaPlayerListener.isAudioPlaying(Miscellaneous.getAnyContext());
|
return triggerParameter == MediaPlayerListener.isAudioPlaying(Miscellaneous.getAnyContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean checkDeviceStarts()
|
||||||
|
{
|
||||||
|
return checkServiceStarts() && !Settings.deviceStartDone;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean checkServiceStarts()
|
||||||
|
{
|
||||||
|
return !Settings.serviceStartDone;
|
||||||
|
}
|
||||||
|
|
||||||
boolean checkProfileActive()
|
boolean checkProfileActive()
|
||||||
{
|
{
|
||||||
String demandedProfileName = getTriggerParameter2().split(Trigger.triggerParameter2Split)[0];
|
String demandedProfileName = getTriggerParameter2().split(Trigger.triggerParameter2Split)[0];
|
||||||
@ -385,13 +445,15 @@ public class Trigger
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
int desiredState = Integer.parseInt(getTriggerParameter2());
|
int desiredState = Integer.parseInt(getTriggerParameter2());
|
||||||
int currentState = ScreenStateReceiver.getScreenState();
|
|
||||||
|
|
||||||
return desiredState == currentState;
|
if(desiredState == ScreenStateReceiver.SCREEN_STATE_OFF || desiredState == ScreenStateReceiver.SCREEN_STATE_ON)
|
||||||
|
return desiredState == ScreenStateReceiver.getScreenPowerState();
|
||||||
|
else
|
||||||
|
return desiredState == ScreenStateReceiver.getScreenLockState();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("w", "Trigger", "Error checking profile trigger.", 4);
|
Miscellaneous.logEvent("w", "Trigger", "Error checking screen state trigger.", 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -872,7 +934,7 @@ public class Trigger
|
|||||||
triggeringTime = new Date();
|
triggeringTime = new Date();
|
||||||
|
|
||||||
String timeString = String.valueOf(triggeringTime.getHours()) + ":" + String.valueOf(triggeringTime.getMinutes()) + ":" + String.valueOf(triggeringTime.getSeconds());
|
String timeString = String.valueOf(triggeringTime.getHours()) + ":" + String.valueOf(triggeringTime.getMinutes()) + ":" + String.valueOf(triggeringTime.getSeconds());
|
||||||
Time nowTime = Time.valueOf(timeString);
|
TimeObject nowTime = TimeObject.valueOf(timeString);
|
||||||
Calendar calNow = Calendar.getInstance();
|
Calendar calNow = Calendar.getInstance();
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -884,20 +946,24 @@ public class Trigger
|
|||||||
if(
|
if(
|
||||||
// Regular case, start time is lower than end time
|
// Regular case, start time is lower than end time
|
||||||
(
|
(
|
||||||
Miscellaneous.compareTimes(tf.getTriggerTimeStart(), nowTime) >= 0
|
Miscellaneous.compareTimes(tf.getTriggerTimeStart(), nowTime) >= 0
|
||||||
&&
|
&&
|
||||||
Miscellaneous.compareTimes(nowTime, tf.getTriggerTimeStop()) > 0
|
Miscellaneous.compareTimes(nowTime, tf.getTriggerTimeStop()) > 0
|
||||||
|
)
|
||||||
|
||
|
||||||
|
// Other case, start time higher than end time, timeframe goes over midnight
|
||||||
|
(
|
||||||
|
Miscellaneous.compareTimes(tf.getTriggerTimeStart(), tf.getTriggerTimeStop()) < 0
|
||||||
|
&&
|
||||||
|
(Miscellaneous.compareTimes(tf.getTriggerTimeStart(), nowTime) >= 0
|
||||||
|
||
|
||||||
|
Miscellaneous.compareTimes(nowTime, tf.getTriggerTimeStop()) > 0)
|
||||||
|
)
|
||||||
|
||
|
||||||
|
// further case: start and end times are identical, meaning a 24h window
|
||||||
|
(
|
||||||
|
Miscellaneous.compareTimes(tf.getTriggerTimeStart(), tf.getTriggerTimeStop()) == 0
|
||||||
)
|
)
|
||||||
|
|
|
||||||
// Other case, start time higher than end time, timeframe goes over midnight
|
|
||||||
(
|
|
||||||
Miscellaneous.compareTimes(tf.getTriggerTimeStart(), tf.getTriggerTimeStop()) < 0
|
|
||||||
&&
|
|
||||||
(Miscellaneous.compareTimes(tf.getTriggerTimeStart(), nowTime) >= 0
|
|
||||||
||
|
|
||||||
Miscellaneous.compareTimes(nowTime, tf.getTriggerTimeStop()) > 0)
|
|
||||||
)
|
|
||||||
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// We are in the timeframe
|
// We are in the timeframe
|
||||||
@ -1023,7 +1089,7 @@ public class Trigger
|
|||||||
public static Calendar getNextRepeatedExecutionAfter(Trigger trigger, Calendar now)
|
public static Calendar getNextRepeatedExecutionAfter(Trigger trigger, Calendar now)
|
||||||
{
|
{
|
||||||
Calendar calSet;
|
Calendar calSet;
|
||||||
Time setTime;
|
TimeObject setTime;
|
||||||
TimeFrame tf = new TimeFrame(trigger.getTriggerParameter2());
|
TimeFrame tf = new TimeFrame(trigger.getTriggerParameter2());
|
||||||
|
|
||||||
if(tf.getRepetition() > 0)
|
if(tf.getRepetition() > 0)
|
||||||
@ -1217,9 +1283,9 @@ public class Trigger
|
|||||||
return triggerType;
|
return triggerType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTriggerType(Trigger_Enum settriggerType)
|
public void setTriggerType(Trigger_Enum setTriggerType)
|
||||||
{
|
{
|
||||||
this.triggerType = settriggerType;
|
this.triggerType = setTriggerType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getTriggerParameter()
|
public boolean getTriggerParameter()
|
||||||
@ -1538,16 +1604,37 @@ public class Trigger
|
|||||||
state = Miscellaneous.getAnyContext().getString(R.string.off);
|
state = Miscellaneous.getAnyContext().getString(R.string.off);
|
||||||
break;
|
break;
|
||||||
case "1":
|
case "1":
|
||||||
state = Miscellaneous.getAnyContext().getString(R.string.on);
|
state = Miscellaneous.getAnyContext().getString(R.string.on);
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
state = Miscellaneous.getAnyContext().getString(R.string.unlocked);
|
state = Miscellaneous.getAnyContext().getString(R.string.unlocked);
|
||||||
break;
|
break;
|
||||||
|
case "3":
|
||||||
|
state = Miscellaneous.getAnyContext().getString(R.string.lockedWithoutSecurity);
|
||||||
|
break;
|
||||||
|
case "4":
|
||||||
|
state = Miscellaneous.getAnyContext().getString(R.string.lockedWithSecurity);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
state = Miscellaneous.getAnyContext().getString(R.string.unknown);
|
state = Miscellaneous.getAnyContext().getString(R.string.unknown);
|
||||||
}
|
}
|
||||||
|
returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.screenIs), state));
|
||||||
|
break;
|
||||||
|
case deviceStarts:
|
||||||
|
// This type doesn't have an activate/deactivate equivalent
|
||||||
|
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.deviceHasJustStarted));
|
||||||
|
break;
|
||||||
|
case serviceStarts:
|
||||||
|
// This type doesn't have an activate/deactivate equivalent
|
||||||
|
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.serviceHasJustStarted));
|
||||||
|
break;
|
||||||
|
case broadcastReceived:
|
||||||
|
if(triggerParameter)
|
||||||
|
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.broadcastReceived));
|
||||||
|
else
|
||||||
|
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.broadcastNotReceived));
|
||||||
|
|
||||||
returnString.append(String.format(Miscellaneous.getAnyContext().getString(R.string.screenIs), state));
|
returnString.append(": " + triggerParameter2);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
returnString.append("error");
|
returnString.append("error");
|
||||||
@ -1559,6 +1646,7 @@ public class Trigger
|
|||||||
|
|
||||||
public static final String directionEquals = "eq";
|
public static final String directionEquals = "eq";
|
||||||
public static final String directionContains = "ct";
|
public static final String directionContains = "ct";
|
||||||
|
public static final String directionNotContains = "nc";
|
||||||
public static final String directionStartsWith = "sw";
|
public static final String directionStartsWith = "sw";
|
||||||
public static final String directionEndsWith = "ew";
|
public static final String directionEndsWith = "ew";
|
||||||
public static final String directionNotEquals = "ne";
|
public static final String directionNotEquals = "ne";
|
||||||
@ -1571,6 +1659,8 @@ public class Trigger
|
|||||||
return Miscellaneous.getAnyContext().getString(R.string.directionStringEquals);
|
return Miscellaneous.getAnyContext().getString(R.string.directionStringEquals);
|
||||||
case directionContains:
|
case directionContains:
|
||||||
return Miscellaneous.getAnyContext().getString(R.string.directionStringContains);
|
return Miscellaneous.getAnyContext().getString(R.string.directionStringContains);
|
||||||
|
case directionNotContains:
|
||||||
|
return Miscellaneous.getAnyContext().getString(R.string.directionStringDoesNotContain);
|
||||||
case directionStartsWith:
|
case directionStartsWith:
|
||||||
return Miscellaneous.getAnyContext().getString(R.string.directionStringStartsWith);
|
return Miscellaneous.getAnyContext().getString(R.string.directionStringStartsWith);
|
||||||
case directionEndsWith:
|
case directionEndsWith:
|
||||||
@ -1588,6 +1678,8 @@ public class Trigger
|
|||||||
return directionEquals;
|
return directionEquals;
|
||||||
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringContains)))
|
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringContains)))
|
||||||
return directionContains;
|
return directionContains;
|
||||||
|
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringDoesNotContain)))
|
||||||
|
return directionNotContains;
|
||||||
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringStartsWith)))
|
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringStartsWith)))
|
||||||
return directionStartsWith;
|
return directionStartsWith;
|
||||||
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringEndsWith)))
|
else if(direction.equalsIgnoreCase(Miscellaneous.getAnyContext().getString(R.string.directionStringEndsWith)))
|
||||||
@ -1612,11 +1704,7 @@ public class Trigger
|
|||||||
public static String[] getTriggerTypesStringAsArray(Context context)
|
public static String[] getTriggerTypesStringAsArray(Context context)
|
||||||
{
|
{
|
||||||
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].getFullName(context));
|
|
||||||
}*/
|
|
||||||
for(Trigger_Enum triggerType : Trigger_Enum.values())
|
for(Trigger_Enum triggerType : Trigger_Enum.values())
|
||||||
triggerTypesList.add(triggerType.getFullName(context));
|
triggerTypesList.add(triggerType.getFullName(context));
|
||||||
|
|
||||||
|
@ -99,54 +99,48 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
|||||||
|
|
||||||
if(intent.getAction().equals(Intent.ACTION_BATTERY_LOW))
|
if(intent.getAction().equals(Intent.ACTION_BATTERY_LOW))
|
||||||
{
|
{
|
||||||
Log.i("Battery", "Low battery event");
|
Miscellaneous.logEvent("i", "Battery", "Low battery event", 5);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Miscellaneous.logEvent("i", "BatteryReceiver", "Received battery event.");
|
batteryLevel = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
|
||||||
// if(intent.getAction().equals(Intent.ACTION_BATTERY_CHANGED))
|
// int scale = -1;
|
||||||
// {
|
// int voltage = -1;
|
||||||
batteryLevel = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
|
// int temp = -1;
|
||||||
// int scale = -1;
|
// scale = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
|
||||||
// int voltage = -1;
|
// temp = intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, -1);
|
||||||
// int temp = -1;
|
// voltage = intent.getIntExtra(BatteryManager.EXTRA_VOLTAGE, -1);
|
||||||
// scale = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
|
Log.i("Battery", "Level: " + String.valueOf(batteryLevel));
|
||||||
// temp = intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, -1);
|
this.actionBatteryLevel(context);
|
||||||
// voltage = intent.getIntExtra(BatteryManager.EXTRA_VOLTAGE, -1);
|
|
||||||
Log.i("Battery", "Level: " + String.valueOf(batteryLevel));
|
int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
|
||||||
this.actionBatteryLevel(context);
|
int statusPlugged = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
|
||||||
|
Miscellaneous.logEvent("i", "BatteryReceiver", "Status: " + String.valueOf(statusPlugged), 5);
|
||||||
int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
|
|
||||||
int statusPlugged = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
|
switch(statusPlugged)
|
||||||
// Miscellaneous.logEvent("i", "BatteryReceiver", "Status: " + String.valueOf(statusPlugged));
|
{
|
||||||
|
case BatteryManager.BATTERY_PLUGGED_AC:
|
||||||
switch(statusPlugged)
|
// Toast.makeText(context, "Regular charging", Toast.LENGTH_LONG).show();
|
||||||
{
|
Miscellaneous.logEvent("i", "BatteryReceiver", "Regular charging.", 5);
|
||||||
case BatteryManager.BATTERY_PLUGGED_AC:
|
this.actionCharging(context);
|
||||||
// Toast.makeText(context, "Regular charging", Toast.LENGTH_LONG).show();
|
break;
|
||||||
// Miscellaneous.logEvent("i", "BatteryReceiver", "Regular charging.");
|
case BatteryManager.BATTERY_PLUGGED_USB:
|
||||||
this.actionCharging(context);
|
this.actionUsbConnected(context);
|
||||||
break;
|
break;
|
||||||
case BatteryManager.BATTERY_PLUGGED_USB:
|
}
|
||||||
this.actionUsbConnected(context);
|
|
||||||
break;
|
switch(status)
|
||||||
}
|
{
|
||||||
|
case BatteryManager.BATTERY_STATUS_FULL:
|
||||||
switch(status)
|
Miscellaneous.logEvent("i", "BatteryReceiver", "Device has been fully charged.", 5);
|
||||||
{
|
this.actionCharging(context);
|
||||||
// case BatteryManager.BATTERY_STATUS_CHARGING:
|
break;
|
||||||
// break;
|
case BatteryManager.BATTERY_STATUS_DISCHARGING:
|
||||||
case BatteryManager.BATTERY_STATUS_FULL:
|
this.actionDischarging(context);
|
||||||
// Toast.makeText(context, "Regular charging full", Toast.LENGTH_LONG).show();
|
break;
|
||||||
// Miscellaneous.logEvent("i", "BatteryReceiver", "Device has been fully charged.");
|
}
|
||||||
this.actionCharging(context);
|
|
||||||
break;
|
|
||||||
case BatteryManager.BATTERY_STATUS_DISCHARGING:
|
|
||||||
this.actionDischarging(context);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
@ -264,11 +258,13 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startListener(AutomationService automationService)
|
public void startListener(AutomationService automationService)
|
||||||
{
|
{
|
||||||
BatteryReceiver.startBatteryReceiver(automationService);
|
BatteryReceiver.startBatteryReceiver(automationService);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stopListener(AutomationService automationService)
|
public void stopListener(AutomationService automationService)
|
||||||
{
|
{
|
||||||
@ -292,4 +288,4 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
|
|||||||
// actually monitores several
|
// actually monitores several
|
||||||
return new Trigger_Enum[] { Trigger_Enum.batteryLevel, Trigger_Enum.charging, Trigger_Enum.usb_host_connection };
|
return new Trigger_Enum[] { Trigger_Enum.batteryLevel, Trigger_Enum.charging, Trigger_Enum.usb_host_connection };
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,168 @@
|
|||||||
|
package com.jens.automation2.receivers;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.IntentFilter;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class BroadcastListener extends android.content.BroadcastReceiver implements AutomationListenerInterface
|
||||||
|
{
|
||||||
|
ArrayList<EventOccurrence> broadcastsCollection = new ArrayList<>();
|
||||||
|
public static AutomationService automationServiceRef = null;
|
||||||
|
private static boolean broadcastReceiverActive = false;
|
||||||
|
private static BroadcastListener broadcastReceiverInstance = null;
|
||||||
|
private static IntentFilter broadcastIntentFilter = null;
|
||||||
|
private static Intent broadcastStatus = null;
|
||||||
|
|
||||||
|
public static BroadcastListener getInstance()
|
||||||
|
{
|
||||||
|
if(broadcastReceiverInstance == null)
|
||||||
|
broadcastReceiverInstance = new BroadcastListener();
|
||||||
|
|
||||||
|
return broadcastReceiverInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class EventOccurrence
|
||||||
|
{
|
||||||
|
Calendar time;
|
||||||
|
String event;
|
||||||
|
|
||||||
|
public EventOccurrence(Calendar time, String event)
|
||||||
|
{
|
||||||
|
this.time = time;
|
||||||
|
this.event = event;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReceive(Context context, Intent intent)
|
||||||
|
{
|
||||||
|
broadcastsCollection.add(new EventOccurrence(Calendar.getInstance(), intent.getAction()));
|
||||||
|
|
||||||
|
for(String key : intent.getExtras().keySet())
|
||||||
|
{
|
||||||
|
Miscellaneous.logEvent("i", "Broadcast extra", "Broadcast " + intent.getAction() + " has extra " + key + " and type " + intent.getExtras().get(key).getClass().getName(), 4);
|
||||||
|
// Object ob = intent.getExtras().get(key);
|
||||||
|
// Miscellaneous.logEvent("i", "Broadcast extra", "Broadcast " + intent.getAction() + " has extra " + key + " and type " + intent.getExtras().get(key).getClass().getName(), 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.broadcastReceived);
|
||||||
|
for(int i=0; i<ruleCandidates.size(); i++)
|
||||||
|
{
|
||||||
|
if(ruleCandidates.get(i).getsGreenLight(context))
|
||||||
|
ruleCandidates.get(i).activate(automationServiceRef, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<EventOccurrence> getBroadcastsCollection()
|
||||||
|
{
|
||||||
|
return broadcastsCollection;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasBroadcastOccurred(String event)
|
||||||
|
{
|
||||||
|
for(EventOccurrence eo : broadcastsCollection)
|
||||||
|
{
|
||||||
|
if(eo.event.equalsIgnoreCase(event))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasBroadcastOccurredSince(String event, Calendar timeLimit)
|
||||||
|
{
|
||||||
|
for(EventOccurrence eo : broadcastsCollection)
|
||||||
|
{
|
||||||
|
if(eo.event.equalsIgnoreCase(event) && (timeLimit == null || eo.time.getTimeInMillis() > timeLimit.getTimeInMillis()))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void startListener(AutomationService automationService)
|
||||||
|
{
|
||||||
|
if(!broadcastReceiverActive)
|
||||||
|
{
|
||||||
|
BroadcastListener.automationServiceRef = automationService;
|
||||||
|
|
||||||
|
if(broadcastReceiverInstance == null)
|
||||||
|
broadcastReceiverInstance = new BroadcastListener();
|
||||||
|
|
||||||
|
if(broadcastIntentFilter == null)
|
||||||
|
{
|
||||||
|
broadcastIntentFilter = new IntentFilter();
|
||||||
|
|
||||||
|
List<String> actionList = new ArrayList<>();
|
||||||
|
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.broadcastReceived);
|
||||||
|
for(int i=0; i<ruleCandidates.size(); i++)
|
||||||
|
{
|
||||||
|
for(Trigger t : ruleCandidates.get(i).getTriggerSet())
|
||||||
|
{
|
||||||
|
if(t.getTriggerType().equals(Trigger.Trigger_Enum.broadcastReceived))
|
||||||
|
{
|
||||||
|
ActivityPermissions.addToArrayListUnique(t.getTriggerParameter2(), actionList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(String s : actionList)
|
||||||
|
broadcastIntentFilter.addAction(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
broadcastStatus = automationServiceRef.registerReceiver(broadcastReceiverInstance, broadcastIntentFilter);
|
||||||
|
broadcastReceiverActive = true;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
We might be confronted with permission issues here.
|
||||||
|
*/
|
||||||
|
Miscellaneous.logEvent("e", "BroadcastListener", Log.getStackTraceString(e), 1);
|
||||||
|
broadcastReceiverActive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void stopListener(AutomationService automationService)
|
||||||
|
{
|
||||||
|
if(broadcastReceiverActive)
|
||||||
|
{
|
||||||
|
if(broadcastReceiverInstance != null)
|
||||||
|
{
|
||||||
|
automationServiceRef.unregisterReceiver(broadcastReceiverInstance);
|
||||||
|
broadcastReceiverInstance = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
broadcastReceiverActive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isListenerRunning()
|
||||||
|
{
|
||||||
|
return broadcastReceiverActive;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Trigger.Trigger_Enum[] getMonitoredTrigger()
|
||||||
|
{
|
||||||
|
return new Trigger.Trigger_Enum[] { Trigger.Trigger_Enum.broadcastReceived };
|
||||||
|
}
|
||||||
|
}
|
@ -14,6 +14,7 @@ import com.jens.automation2.AutomationService;
|
|||||||
import com.jens.automation2.Miscellaneous;
|
import com.jens.automation2.Miscellaneous;
|
||||||
import com.jens.automation2.Rule;
|
import com.jens.automation2.Rule;
|
||||||
import com.jens.automation2.TimeFrame;
|
import com.jens.automation2.TimeFrame;
|
||||||
|
import com.jens.automation2.TimeObject;
|
||||||
import com.jens.automation2.Trigger;
|
import com.jens.automation2.Trigger;
|
||||||
import com.jens.automation2.Trigger.Trigger_Enum;
|
import com.jens.automation2.Trigger.Trigger_Enum;
|
||||||
|
|
||||||
@ -96,7 +97,7 @@ public class DateTimeListener extends BroadcastReceiver implements AutomationLis
|
|||||||
TimeFrame tf = new TimeFrame(oneTrigger.getTriggerParameter2());
|
TimeFrame tf = new TimeFrame(oneTrigger.getTriggerParameter2());
|
||||||
|
|
||||||
Calendar calSet;
|
Calendar calSet;
|
||||||
Time setTime;
|
TimeObject setTime;
|
||||||
|
|
||||||
if(oneTrigger.getTriggerParameter())
|
if(oneTrigger.getTriggerParameter())
|
||||||
setTime = tf.getTriggerTimeStart();
|
setTime = tf.getTriggerTimeStart();
|
||||||
@ -365,7 +366,7 @@ public class DateTimeListener extends BroadcastReceiver implements AutomationLis
|
|||||||
public static Calendar getNextRepeatedExecutionAfter(Trigger trigger, Calendar now)
|
public static Calendar getNextRepeatedExecutionAfter(Trigger trigger, Calendar now)
|
||||||
{
|
{
|
||||||
Calendar calSet;
|
Calendar calSet;
|
||||||
Time setTime;
|
TimeObject setTime;
|
||||||
TimeFrame tf = new TimeFrame(trigger.getTriggerParameter2());
|
TimeFrame tf = new TimeFrame(trigger.getTriggerParameter2());
|
||||||
|
|
||||||
if(tf.getRepetition() > 0)
|
if(tf.getRepetition() > 0)
|
||||||
|
@ -34,17 +34,18 @@ public class DeviceOrientationListener implements SensorEventListener, Automatio
|
|||||||
static int sensorValueCounter = 0;
|
static int sensorValueCounter = 0;
|
||||||
|
|
||||||
// Gravity rotational data
|
// Gravity rotational data
|
||||||
private float gravity[];
|
float gravity[];
|
||||||
// Magnetic rotational data
|
// Magnetic rotational data
|
||||||
private float magnetic[]; //for magnetic rotational data
|
float magnetic[]; //for magnetic rotational data
|
||||||
private float accels[] = new float[3];
|
float accels[] = new float[3];
|
||||||
private float mags[] = new float[3];
|
float mags[] = new float[3];
|
||||||
private float[] values = new float[3];
|
float[] values = new float[3];
|
||||||
|
boolean hasMagneticSensor=false;
|
||||||
|
|
||||||
// azimuth, pitch and roll
|
// azimuth, pitch and roll
|
||||||
private float azimuth;
|
float azimuth;
|
||||||
private float pitch;
|
float pitch;
|
||||||
private float roll;
|
float roll;
|
||||||
|
|
||||||
boolean applies = false;
|
boolean applies = false;
|
||||||
boolean flipped = false;
|
boolean flipped = false;
|
||||||
@ -91,7 +92,7 @@ public class DeviceOrientationListener implements SensorEventListener, Automatio
|
|||||||
isRunning = true;
|
isRunning = true;
|
||||||
|
|
||||||
sManager.registerListener(this, sManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL);
|
sManager.registerListener(this, sManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL);
|
||||||
sManager.registerListener(this, sManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), SensorManager.SENSOR_DELAY_NORMAL);
|
hasMagneticSensor = sManager.registerListener(this, sManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), SensorManager.SENSOR_DELAY_NORMAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,6 +130,9 @@ public class DeviceOrientationListener implements SensorEventListener, Automatio
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!hasMagneticSensor)
|
||||||
|
mags=new float[]{1f,1f,1f};
|
||||||
|
|
||||||
if (mags != null && accels != null)
|
if (mags != null && accels != null)
|
||||||
{
|
{
|
||||||
gravity = new float[9];
|
gravity = new float[9];
|
||||||
|
@ -89,6 +89,11 @@ public class NotificationListener extends NotificationListenerService// implemen
|
|||||||
{
|
{
|
||||||
lastNotification = convertNotificationToSimpleNotification(created, sbn);
|
lastNotification = convertNotificationToSimpleNotification(created, sbn);
|
||||||
|
|
||||||
|
if(created)
|
||||||
|
Miscellaneous.logEvent("i", "New notification", lastNotification.toString(), 5);
|
||||||
|
else
|
||||||
|
Miscellaneous.logEvent("i", "Notification removed", lastNotification.toString(), 5);
|
||||||
|
|
||||||
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++)
|
||||||
{
|
{
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
package com.jens.automation2.receivers;
|
package com.jens.automation2.receivers;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
|
import android.app.KeyguardManager;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.os.BatteryManager;
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.provider.Settings;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
|
import com.jens.automation2.Actions;
|
||||||
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;
|
||||||
@ -16,10 +20,13 @@ import com.jens.automation2.Rule;
|
|||||||
import com.jens.automation2.Trigger.Trigger_Enum;
|
import com.jens.automation2.Trigger.Trigger_Enum;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Timer;
|
||||||
|
import java.util.TimerTask;
|
||||||
|
|
||||||
public class ScreenStateReceiver extends BroadcastReceiver implements AutomationListenerInterface
|
public class ScreenStateReceiver extends BroadcastReceiver implements AutomationListenerInterface
|
||||||
{
|
{
|
||||||
static int screenState = -1; // initialize with a better value than this
|
static int screenPowerState = -1; // initialize with a better value than this
|
||||||
|
static int screenLockState = -1; // initialize with a better value than this
|
||||||
public static AutomationService automationServiceRef = null;
|
public static AutomationService automationServiceRef = null;
|
||||||
|
|
||||||
private static boolean screenStateReceiverActive = false;
|
private static boolean screenStateReceiverActive = false;
|
||||||
@ -27,9 +34,18 @@ public class ScreenStateReceiver extends BroadcastReceiver implements Automation
|
|||||||
private static Intent screenStatusIntent = null;
|
private static Intent screenStatusIntent = null;
|
||||||
private static BroadcastReceiver screenStateReceiverInstance = null;
|
private static BroadcastReceiver screenStateReceiverInstance = null;
|
||||||
|
|
||||||
|
public final static String broadcastScreenLockedWithoutSecurity = "automation.system.screen_locked_without_security";
|
||||||
|
public final static String broadcastScreenLockedWithSecurity = "automation.system.screen_locked_with_security";
|
||||||
|
|
||||||
|
public final static int SCREEN_STATE_OFF = 0;
|
||||||
|
public final static int SCREEN_STATE_ON = 1;
|
||||||
|
public final static int SCREEN_STATE_UNLOCKED = 2;
|
||||||
|
public final static int SCREEN_STATE_LOCKED_WITHOUT_SECURITY = 3;
|
||||||
|
public final static int SCREEN_STATE_LOCKED_WITH_SECURITY = 4;
|
||||||
|
|
||||||
public static BroadcastReceiver getScreenStateReceiverInstance()
|
public static BroadcastReceiver getScreenStateReceiverInstance()
|
||||||
{
|
{
|
||||||
if(screenStateReceiverInstance == null)
|
if (screenStateReceiverInstance == null)
|
||||||
screenStateReceiverInstance = new ScreenStateReceiver();
|
screenStateReceiverInstance = new ScreenStateReceiver();
|
||||||
|
|
||||||
return screenStateReceiverInstance;
|
return screenStateReceiverInstance;
|
||||||
@ -37,58 +53,60 @@ public class ScreenStateReceiver extends BroadcastReceiver implements Automation
|
|||||||
|
|
||||||
public static void startScreenStateReceiver(final AutomationService automationServiceRef)
|
public static void startScreenStateReceiver(final AutomationService automationServiceRef)
|
||||||
{
|
{
|
||||||
if(!screenStateReceiverActive)
|
if (!screenStateReceiverActive)
|
||||||
{
|
{
|
||||||
ScreenStateReceiver.automationServiceRef = automationServiceRef;
|
ScreenStateReceiver.automationServiceRef = automationServiceRef;
|
||||||
|
|
||||||
if(screenStateReceiverInstance == null)
|
if (screenStateReceiverInstance == null)
|
||||||
screenStateReceiverInstance = new ScreenStateReceiver();
|
screenStateReceiverInstance = new ScreenStateReceiver();
|
||||||
|
|
||||||
if(screenStateIntentFilter == null)
|
if (screenStateIntentFilter == null)
|
||||||
{
|
{
|
||||||
screenStateIntentFilter = new IntentFilter();
|
screenStateIntentFilter = new IntentFilter();
|
||||||
screenStateIntentFilter.addAction(Intent.ACTION_SCREEN_OFF);
|
screenStateIntentFilter.addAction(Intent.ACTION_SCREEN_OFF);
|
||||||
screenStateIntentFilter.addAction(Intent.ACTION_SCREEN_ON);
|
screenStateIntentFilter.addAction(Intent.ACTION_SCREEN_ON);
|
||||||
screenStateIntentFilter.addAction(Intent.ACTION_USER_PRESENT);
|
screenStateIntentFilter.addAction(Intent.ACTION_USER_PRESENT); // also fired when device is unlocked
|
||||||
|
screenStateIntentFilter.addAction(broadcastScreenLockedWithoutSecurity);
|
||||||
|
screenStateIntentFilter.addAction(broadcastScreenLockedWithSecurity);
|
||||||
// Intent.ACTION_USER_UNLOCKED
|
// Intent.ACTION_USER_UNLOCKED
|
||||||
}
|
}
|
||||||
|
|
||||||
screenStatusIntent = automationServiceRef.registerReceiver(screenStateReceiverInstance, screenStateIntentFilter);
|
screenStatusIntent = automationServiceRef.registerReceiver(screenStateReceiverInstance, screenStateIntentFilter);
|
||||||
|
|
||||||
screenStateReceiverActive = true;
|
screenStateReceiverActive = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void stopScreenStateReceiver()
|
public static void stopScreenStateReceiver()
|
||||||
{
|
{
|
||||||
if(screenStateReceiverActive)
|
if (screenStateReceiverActive)
|
||||||
{
|
{
|
||||||
if(screenStateReceiverInstance != null)
|
if (screenStateReceiverInstance != null)
|
||||||
{
|
{
|
||||||
automationServiceRef.unregisterReceiver(screenStateReceiverInstance);
|
automationServiceRef.unregisterReceiver(screenStateReceiverInstance);
|
||||||
screenStateReceiverInstance = null;
|
screenStateReceiverInstance = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
screenStateReceiverActive = false;
|
screenStateReceiverActive = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isScreenStateReceiverActive()
|
public static boolean isScreenStateReceiverActive()
|
||||||
{
|
{
|
||||||
return screenStateReceiverActive;
|
return screenStateReceiverActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getScreenState()
|
public static int getScreenPowerState()
|
||||||
{
|
{
|
||||||
return screenState;
|
return screenPowerState;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int currentChargingState = 0; //0=unknown, 1=no, 2=yes
|
public static int getScreenLockState()
|
||||||
|
|
||||||
public static int getCurrentChargingState()
|
|
||||||
{
|
{
|
||||||
return currentChargingState;
|
return screenLockState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP_MR1)
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent)
|
public void onReceive(Context context, Intent intent)
|
||||||
{
|
{
|
||||||
@ -101,32 +119,65 @@ public class ScreenStateReceiver extends BroadcastReceiver implements Automation
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(intent.getAction().equals(Intent.ACTION_SCREEN_OFF))
|
if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF))
|
||||||
{
|
{
|
||||||
ScreenStateReceiver.screenState = 0;
|
ScreenStateReceiver.screenPowerState = SCREEN_STATE_OFF;
|
||||||
|
|
||||||
|
KeyguardManager keyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
|
||||||
|
|
||||||
|
// PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||||
|
// Miscellaneous.logEvent("i", "ScreenStateReceiver", "Method 2: " + String.valueOf(pm.isInteractive() && pm.isScreenOn() && keyguardManager.isKeyguardLocked() && keyguardManager.isDeviceLocked()), 4);
|
||||||
|
// if (pm.isInteractive() && pm.isScreenOn() && keyguardManager.isKeyguardLocked() && keyguardManager.isDeviceLocked())
|
||||||
|
// Miscellaneous.logEvent("i", "ScreenStateReceiver", "pm.isInteractive(): " + String.valueOf(pm.isInteractive()), 4);
|
||||||
|
// Miscellaneous.logEvent("i", "ScreenStateReceiver", "pm.isScreenOn(): " + String.valueOf(pm.isScreenOn()), 4);
|
||||||
|
Miscellaneous.logEvent("i", "ScreenStateReceiver", "keyguardManager.isKeyguardLocked(): " + String.valueOf(keyguardManager.isKeyguardLocked()), 4);
|
||||||
|
Miscellaneous.logEvent("i", "ScreenStateReceiver", "keyguardManager.isDeviceLocked(): " + String.valueOf(keyguardManager.isDeviceLocked()), 4);
|
||||||
|
|
||||||
|
if(keyguardManager.isKeyguardLocked() && !keyguardManager.isDeviceLocked())
|
||||||
|
{
|
||||||
|
Actions.sendBroadcast(Miscellaneous.getAnyContext(), broadcastScreenLockedWithoutSecurity);
|
||||||
|
}
|
||||||
|
else if(keyguardManager.isDeviceLocked())
|
||||||
|
{
|
||||||
|
Actions.sendBroadcast(Miscellaneous.getAnyContext(), broadcastScreenLockedWithSecurity);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Lock may be activated delayed, not at power button press
|
||||||
|
ScreenLockMonitor mon = new ScreenLockMonitor();
|
||||||
|
mon.startMonitor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(intent.getAction().equals(Intent.ACTION_SCREEN_ON))
|
else if (intent.getAction().equals(Intent.ACTION_SCREEN_ON))
|
||||||
{
|
{
|
||||||
ScreenStateReceiver.screenState = 1;
|
ScreenStateReceiver.screenPowerState = SCREEN_STATE_ON;
|
||||||
}
|
}
|
||||||
else if(intent.getAction().equals(Intent.ACTION_USER_PRESENT))
|
else if (intent.getAction().equals(Intent.ACTION_USER_PRESENT))
|
||||||
{
|
{
|
||||||
ScreenStateReceiver.screenState = 2;
|
ScreenStateReceiver.screenLockState = SCREEN_STATE_UNLOCKED;
|
||||||
|
}
|
||||||
|
else if (intent.getAction().equals(broadcastScreenLockedWithoutSecurity))
|
||||||
|
{
|
||||||
|
ScreenStateReceiver.screenLockState = SCREEN_STATE_LOCKED_WITHOUT_SECURITY;
|
||||||
|
}
|
||||||
|
else if (intent.getAction().equals(broadcastScreenLockedWithSecurity))
|
||||||
|
{
|
||||||
|
ScreenStateReceiver.screenLockState = SCREEN_STATE_LOCKED_WITH_SECURITY;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("e", "ScreenStateReceiver", "Unknown state received: " + intent.getAction(), 3);
|
Miscellaneous.logEvent("e", "ScreenStateReceiver", "Unknown state received: " + intent.getAction(), 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("e", "ScreenStateReceiver", "Error receiving screen state: " + e.getMessage(), 3);
|
Miscellaneous.logEvent("e", "ScreenStateReceiver", "Error receiving screen state: " + e.getMessage(), 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.screenState);
|
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.screenState);
|
||||||
for(int i=0; i<ruleCandidates.size(); i++)
|
for (int i = 0; i < ruleCandidates.size(); i++)
|
||||||
{
|
{
|
||||||
if(ruleCandidates.get(i).getsGreenLight(context))
|
if (ruleCandidates.get(i).getsGreenLight(context))
|
||||||
ruleCandidates.get(i).activate(automationServiceRef, false);
|
ruleCandidates.get(i).activate(automationServiceRef, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,6 +187,7 @@ public class ScreenStateReceiver extends BroadcastReceiver implements Automation
|
|||||||
{
|
{
|
||||||
ScreenStateReceiver.startScreenStateReceiver(automationService);
|
ScreenStateReceiver.startScreenStateReceiver(automationService);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stopListener(AutomationService automationService)
|
public void stopListener(AutomationService automationService)
|
||||||
{
|
{
|
||||||
@ -145,7 +197,7 @@ public class ScreenStateReceiver extends BroadcastReceiver implements Automation
|
|||||||
public static boolean haveAllPermission()
|
public static boolean haveAllPermission()
|
||||||
{
|
{
|
||||||
return ActivityPermissions.havePermission(Manifest.permission.READ_PHONE_STATE, Miscellaneous.getAnyContext()) &&
|
return ActivityPermissions.havePermission(Manifest.permission.READ_PHONE_STATE, Miscellaneous.getAnyContext()) &&
|
||||||
ActivityPermissions.havePermission(Manifest.permission.BATTERY_STATS, Miscellaneous.getAnyContext());
|
ActivityPermissions.havePermission(Manifest.permission.BATTERY_STATS, Miscellaneous.getAnyContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -157,6 +209,66 @@ public class ScreenStateReceiver extends BroadcastReceiver implements Automation
|
|||||||
@Override
|
@Override
|
||||||
public Trigger_Enum[] getMonitoredTrigger()
|
public Trigger_Enum[] getMonitoredTrigger()
|
||||||
{
|
{
|
||||||
return new Trigger_Enum[] { Trigger_Enum.screenState };
|
return new Trigger_Enum[]{Trigger_Enum.screenState};
|
||||||
|
}
|
||||||
|
|
||||||
|
class ScreenLockMonitor
|
||||||
|
{
|
||||||
|
long runs = 0;
|
||||||
|
final long maxRuns = 20;
|
||||||
|
final long interval = 1000;
|
||||||
|
|
||||||
|
Timer timer = new Timer();
|
||||||
|
|
||||||
|
TimerTask task = new TimerTask()
|
||||||
|
{
|
||||||
|
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP_MR1)
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
KeyguardManager keyguardManager = (KeyguardManager) Miscellaneous.getAnyContext().getSystemService(Context.KEYGUARD_SERVICE);
|
||||||
|
|
||||||
|
Miscellaneous.logEvent("i", "ScreenStateReceiver", "keyguardManager.isKeyguardLocked(): " + String.valueOf(keyguardManager.isKeyguardLocked()), 4);
|
||||||
|
Miscellaneous.logEvent("i", "ScreenStateReceiver", "keyguardManager.isDeviceLocked(): " + String.valueOf(keyguardManager.isDeviceLocked()), 4);
|
||||||
|
|
||||||
|
if(keyguardManager.isKeyguardLocked() && !keyguardManager.isDeviceLocked())
|
||||||
|
{
|
||||||
|
Actions.sendBroadcast(Miscellaneous.getAnyContext(), broadcastScreenLockedWithoutSecurity);
|
||||||
|
timer.purge();
|
||||||
|
timer.cancel();
|
||||||
|
}
|
||||||
|
else if(keyguardManager.isDeviceLocked())
|
||||||
|
{
|
||||||
|
Actions.sendBroadcast(Miscellaneous.getAnyContext(), broadcastScreenLockedWithSecurity);
|
||||||
|
timer.purge();
|
||||||
|
timer.cancel();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (runs++ > maxRuns)
|
||||||
|
{
|
||||||
|
Miscellaneous.logEvent("w", "ScreenStateReceiver->ScreenLockMonitor", "Lock never came.", 4);
|
||||||
|
timer.purge();
|
||||||
|
timer.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public void startMonitor()
|
||||||
|
{
|
||||||
|
ContentResolver mResolver = Miscellaneous.getAnyContext().getContentResolver();
|
||||||
|
long lockscreen_timeout = 0;
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.N_MR1)
|
||||||
|
lockscreen_timeout = Settings.System.getInt(mResolver, "lock_screen_lock_after_timeout", 0);
|
||||||
|
else
|
||||||
|
lockscreen_timeout = Settings.Secure.getInt(mResolver, "lock_screen_lock_after_timeout", 0);
|
||||||
|
|
||||||
|
if(lockscreen_timeout > 0)
|
||||||
|
timer.schedule(task, lockscreen_timeout);
|
||||||
|
else
|
||||||
|
timer.scheduleAtFixedRate(task, 0, interval);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -14,14 +14,13 @@ import com.jens.automation2.Trigger.Trigger_Enum;
|
|||||||
public class TimeZoneListener extends BroadcastReceiver implements AutomationListenerInterface
|
public class TimeZoneListener extends BroadcastReceiver implements AutomationListenerInterface
|
||||||
{
|
{
|
||||||
private static TimeZoneListener timeZoneListenerInstance = null;
|
private static TimeZoneListener timeZoneListenerInstance = null;
|
||||||
protected static boolean timeZoneListenerActive = false;
|
protected static boolean timezoneListenerActive = false;
|
||||||
protected static AutomationService automationServiceRef = null;
|
protected static AutomationService automationServiceRef = null;
|
||||||
protected static IntentFilter timeZoneListenerIntentFilter = null;
|
protected static IntentFilter timezoneListenerIntentFilter = null;
|
||||||
|
|
||||||
|
|
||||||
public static boolean isTimeZoneListenerActive()
|
public static boolean isTimezoneListenerActive()
|
||||||
{
|
{
|
||||||
return timeZoneListenerActive;
|
return timezoneListenerActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void startTimeZoneListener(AutomationService automationService)
|
public static void startTimeZoneListener(AutomationService automationService)
|
||||||
@ -33,19 +32,19 @@ public class TimeZoneListener extends BroadcastReceiver implements AutomationLis
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(!timeZoneListenerActive && Rule.isAnyRuleUsing(Trigger_Enum.timeFrame))
|
if(!timezoneListenerActive && Rule.isAnyRuleUsing(Trigger_Enum.timeFrame))
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "TimeZoneListener", "Starting TimeZoneListener", 4);
|
Miscellaneous.logEvent("i", "TimeZoneListener", "Starting TimeZoneListener", 4);
|
||||||
timeZoneListenerActive = true;
|
timezoneListenerActive = true;
|
||||||
|
|
||||||
if(timeZoneListenerIntentFilter == null)
|
if(timezoneListenerIntentFilter == null)
|
||||||
{
|
{
|
||||||
timeZoneListenerIntentFilter = new IntentFilter();
|
timezoneListenerIntentFilter = new IntentFilter();
|
||||||
timeZoneListenerIntentFilter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
|
timezoneListenerIntentFilter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
|
||||||
timeZoneListenerIntentFilter.addAction(Intent.ACTION_TIME_CHANGED);
|
timezoneListenerIntentFilter.addAction(Intent.ACTION_TIME_CHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
automationService.registerReceiver(timeZoneListenerInstance, timeZoneListenerIntentFilter);
|
automationService.registerReceiver(timeZoneListenerInstance, timezoneListenerIntentFilter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
@ -57,11 +56,11 @@ public class TimeZoneListener extends BroadcastReceiver implements AutomationLis
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(timeZoneListenerActive)
|
if(timezoneListenerActive)
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "TimeZoneListener", "Stopping TimeZoneListener", 4);
|
Miscellaneous.logEvent("i", "TimeZoneListener", "Stopping TimeZoneListener", 4);
|
||||||
automationServiceRef.unregisterReceiver(timeZoneListenerInstance);
|
automationServiceRef.unregisterReceiver(timeZoneListenerInstance);
|
||||||
timeZoneListenerActive = false;
|
timezoneListenerActive = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
@ -81,7 +80,7 @@ public class TimeZoneListener extends BroadcastReceiver implements AutomationLis
|
|||||||
}
|
}
|
||||||
else if(action.equals(Intent.ACTION_TIME_CHANGED))
|
else if(action.equals(Intent.ACTION_TIME_CHANGED))
|
||||||
{
|
{
|
||||||
Miscellaneous.logEvent("i", "TimeZoneListener", "Device time changed. Reloading alarms.", 4);
|
Miscellaneous.logEvent("i", "TimeZoneListener", "Device time changed. Reloading alarms.", 3);
|
||||||
DateTimeListener.reloadAlarms();
|
DateTimeListener.reloadAlarms();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -104,7 +103,7 @@ public class TimeZoneListener extends BroadcastReceiver implements AutomationLis
|
|||||||
@Override
|
@Override
|
||||||
public boolean isListenerRunning()
|
public boolean isListenerRunning()
|
||||||
{
|
{
|
||||||
return TimeZoneListener.isTimeZoneListenerActive();
|
return TimeZoneListener.isTimezoneListenerActive();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Trigger_Enum[] getMonitoredTrigger()
|
public Trigger_Enum[] getMonitoredTrigger()
|
||||||
|
BIN
app/src/main/res/drawable/satellite.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
@ -83,6 +83,12 @@
|
|||||||
android:layout_margin="@dimen/default_margin"
|
android:layout_margin="@dimen/default_margin"
|
||||||
android:background="#aa000000" />
|
android:background="#aa000000" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/default_margin"
|
||||||
|
android:text="@string/emailPretext" />
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/chkShareConfigAndLog"
|
android:id="@+id/chkShareConfigAndLog"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -96,6 +102,11 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/sendEmailToDev" />
|
android:text="@string/sendEmailToDev" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/logsExplanation" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_span="2"
|
android:layout_span="2"
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/default_margin" >
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_span="2"
|
||||||
|
android:textSize="25dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_marginBottom="@dimen/default_margin"
|
||||||
|
android:text="@string/sendBroadcast" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/broadcastExplanation" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etBroadcastToSend"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginVertical="@dimen/default_margin"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bBroadcastSendShowSuggestions"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginVertical="@dimen/default_margin"
|
||||||
|
android:text="@string/broadcastsShowSuggestions" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bSaveSendBroadcast"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/save" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
@ -0,0 +1,81 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_margin="@dimen/default_margin">
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical" >
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
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/broadcastReceivedTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/default_margin"
|
||||||
|
android:text="@string/explanationBroadcastTrigger" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvBroadcastUrl"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginVertical="@dimen/default_margin"
|
||||||
|
android:text="@string/broadcastListUrl" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" >
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rbBroadcastReceived"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="true"
|
||||||
|
android:text="@string/broadcastReceived" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rbBroadcastNotReceived"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/broadcastNotReceived" />
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etBroadcastTriggerAction"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bBroadcastShowSuggestions"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/broadcastsShowSuggestions" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bSaveTriggerBroadcast"
|
||||||
|
android:layout_marginTop="@dimen/default_margin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/save" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
@ -71,13 +71,20 @@
|
|||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:background="#aa000000" />
|
android:background="#aa000000" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvCurrentNfcIdValue"
|
android:id="@+id/tvCurrentNfcIdValue"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/timeFrameWhichDays"
|
android:text="@string/timeFrameWhichDays"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDaysHint"
|
||||||
|
android:layout_marginVertical="@dimen/default_margin"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/red" />
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/checkMonday"
|
android:id="@+id/checkMonday"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -413,7 +413,7 @@
|
|||||||
<string name="volumeTest">Lautstärkekalibrierung</string>
|
<string name="volumeTest">Lautstärkekalibrierung</string>
|
||||||
<string name="volumeCalibrationExplanation">Um einen dB Wert für die Lautstärkemessung zu berechnen müssen Sie einen sogenannten physikalischen Referenzwert angeben. Bitte lesen Sie bei Wikipedia nach, um mehr zu erfahren. Dieser Wert wird höchstwahrscheinlich für jedes Smartphone oder Tablet anders sein, deshalb diese Testanwendung. Verschieben Sie den Regler, um den gegenwärtig definierten Wert zu ändern. Je höher der Referenzwert desto niedriger wird der dB Wert. Es werden alle paar %1$s Sekunden neue Messungen vorgenommen und das Ergebnis unten angezeigt. Drücken Sie den zurück-Button, wenn Sie einen passenden Wert gefunden haben.</string>
|
<string name="volumeCalibrationExplanation">Um einen dB Wert für die Lautstärkemessung zu berechnen müssen Sie einen sogenannten physikalischen Referenzwert angeben. Bitte lesen Sie bei Wikipedia nach, um mehr zu erfahren. Dieser Wert wird höchstwahrscheinlich für jedes Smartphone oder Tablet anders sein, deshalb diese Testanwendung. Verschieben Sie den Regler, um den gegenwärtig definierten Wert zu ändern. Je höher der Referenzwert desto niedriger wird der dB Wert. Es werden alle paar %1$s Sekunden neue Messungen vorgenommen und das Ergebnis unten angezeigt. Drücken Sie den zurück-Button, wenn Sie einen passenden Wert gefunden haben.</string>
|
||||||
<string name="settingsWillTakeTime">Manche Einstellungen können nicht übernommen werden bevor der Dienst neu gestartet wird.</string>
|
<string name="settingsWillTakeTime">Manche Einstellungen können nicht übernommen werden bevor der Dienst neu gestartet wird.</string>
|
||||||
<string name="rootExplanation">Sie müssen Ihr Telefon rooten, damit diese Funktion funktionieren kann. Danach müssen Sie "Regel manuell ausführen", um den SuperUser Berechtigungsdialog zu zeigen. Wenn dieser erscheint, müssen Sie den Haken setzen, der es immer erlaubt. Ansonsten kann die Regel nicht funktionieren, wenn Sie das Telefon gerade nicht benutzen und demnach den nächsten Dialog nicht genehmigen können.</string>
|
<string name="rootExplanation">Sie müssen Ihr Telefon rooten, damit diese Funktion funktionieren kann. Danach müssen Sie die Regel manuell ausführen, um den SuperUser Berechtigungsdialog zu zeigen. Wenn dieser erscheint, müssen Sie den Haken "immer erlauben" setzen. Ansonsten wird die Regel nicht funktionieren, wenn Sie das Telefon gerade nicht benutzen.</string>
|
||||||
<string name="errorWritingConfig">Fehler beim Schreiben der Konfiguration. Gibt es einen beschreibbaren Speicher, und wurde alle Berechtigungen gegeben?</string>
|
<string name="errorWritingConfig">Fehler beim Schreiben der Konfiguration. Gibt es einen beschreibbaren Speicher, und wurde alle Berechtigungen gegeben?</string>
|
||||||
<string name="phoneNrReplacementError">Die letzte Telefonnummer konnte nicht in die Variable integriert werden. Sie liegt mir nicht vor.</string>
|
<string name="phoneNrReplacementError">Die letzte Telefonnummer konnte nicht in die Variable integriert werden. Sie liegt mir nicht vor.</string>
|
||||||
<string name="username">Benutzername</string>
|
<string name="username">Benutzername</string>
|
||||||
@ -557,7 +557,7 @@
|
|||||||
<string name="noFilesImported">Keine Dateien konnten importiert werden.</string>
|
<string name="noFilesImported">Keine Dateien konnten importiert werden.</string>
|
||||||
<string name="notAllFilesImported">Nicht alle passenden Dateien konnten importiert werden.</string>
|
<string name="notAllFilesImported">Nicht alle passenden Dateien konnten importiert werden.</string>
|
||||||
<string name="openExamplesPage">Webseite mit Beispielen öffnen</string>
|
<string name="openExamplesPage">Webseite mit Beispielen öffnen</string>
|
||||||
<string name="phoneNumberExplanation">Sie können eine bestimmte Nummer eingeben, aber müssen nicht. Wenn Sie eine angeben wollen, können Sie auch eine aus dem Adressbuch auswählen. Außerdem können Sie reguläre Audrücke verwenden. Zum Testen selbiger mag ich die Seite:</string>
|
<string name="phoneNumberExplanation">Sie können eine bestimmte Nummer eingeben (des Anrufpartners), aber müssen nicht. Wenn Sie eine angeben wollen, können Sie auch eine aus dem Adressbuch auswählen. Außerdem können Sie reguläre Audrücke verwenden. Zum Testen selbiger mag ich die Seite:</string>
|
||||||
<string name="prefsImportError">Fehler beim Importieren der Einstellungen.</string>
|
<string name="prefsImportError">Fehler beim Importieren der Einstellungen.</string>
|
||||||
<string name="rulesImportedSuccessfully">Regeln und Orte wurden erfolgreich importiert.</string>
|
<string name="rulesImportedSuccessfully">Regeln und Orte wurden erfolgreich importiert.</string>
|
||||||
<string name="rulesImportError">Fehler beim Importieren der Regeln.</string>
|
<string name="rulesImportError">Fehler beim Importieren der Regeln.</string>
|
||||||
@ -701,4 +701,26 @@
|
|||||||
<string name="profileXrequiresThis">Profil \"%1$s\" benötigt dies.</string>
|
<string name="profileXrequiresThis">Profil \"%1$s\" benötigt dies.</string>
|
||||||
<string name="lastProfile">Letztes Profil:</string>
|
<string name="lastProfile">Letztes Profil:</string>
|
||||||
<string name="queryAllPackages">Liste von installierten Anwendungen auslesen</string>
|
<string name="queryAllPackages">Liste von installierten Anwendungen auslesen</string>
|
||||||
|
<string name="timeFrameDaysHint">Wenn Sie ein Zeitfenster verwenden, das sich über Mitternacht erstreckt, müssen Sie auch den Folgetag auswählen, wenn der Auslöser auch nach Mitternacht noch auslösen soll.</string>
|
||||||
|
<string name="featureNotInGooglePlayVersion">Diese Funktion ist in der Google Play-Version nicht mehr verfügbar.\n\nHin und wieder schikaniert Google Entwickler. Wenn Sie bestimmte Funktionen weiterhin verwenden möchten, müssen Sie Unterlagen einreichen. Leider besteht eine 99% ige Chance, dass der Papierkram abgelehnt wird. Es ist so ziemlich wie im Asterix-Comic/Film.\n\nIch habe in der Vergangenheit Wochen damit verbracht, mit ihnen über solche Fälle zu streiten, aber ich bekam immer wieder Ablehnungen - entweder von Bots oder von Leuten, die ungefähr so intelligent sind wie Bots. Ich kann mich dann nur entscheiden, ob die App vollständig aus dem Play Store fliegen soll oder die Funktion aus der Play Store Version entfernen.\n\nBitte erwägen Sie, die APK-Version von meiner Website oder die von F-Droid zu verwenden, wenn Sie diese Funktionen benötigen.</string>
|
||||||
|
<string name="startActivityInsertManually">Diese Einschränkung betrifft nur die Auswahl einer App, nicht den eigentlichen Start. So können Sie den Namen einer Anwendung immer noch manuell eingeben, falls Sie ihn kennen.</string>
|
||||||
|
<string name="serviceStarts">Dienst startet</string>
|
||||||
|
<string name="deviceStarts">Gerät startet</string>
|
||||||
|
<string name="deviceHasJustStarted">Gerät ist gerade gestartet</string>
|
||||||
|
<string name="serviceHasJustStarted">Dienst ist gerade gestartet</string>
|
||||||
|
<string name="broadcastReceived">Broadcast empfangen</string>
|
||||||
|
<string name="broadcastNotReceived">Broadcast nicht empfangen</string>
|
||||||
|
<string name="broadcastReceivedTitle">Broadcast empfangen</string>
|
||||||
|
<string name="broadcastsShowSuggestions">Vorschläge anzeigen</string>
|
||||||
|
<string name="selectBroadcast">Broadcast auswählen</string>
|
||||||
|
<string name="lockedWithoutSecurity">gesperrt (nur wischen, keine PIN, etc.)</string>
|
||||||
|
<string name="lockedWithSecurity">gesperrt (mit PIN, etc.)</string>
|
||||||
|
<string name="lockedCommentScreenMustBeOff">Jeglicher Sperrzustand wird nur erkannt werden, wenn gleichzeitig der Bildschirm aus ist.</string>
|
||||||
|
<string name="emailPretext">Wenn Sie ein Problem, einen Vorschlag oder eine Frage haben, schreiben Sie bitte auch etwas in die Email. Senden Sie mir nicht einfach die Dateien mit dem Standard-Mailtext. Ich werde solche Nachrichten ignorieren, sollten wir nicht bereits in einer Konversation sein.</string>
|
||||||
|
<string name="sendBroadcast">Broadcast verschicken</string>
|
||||||
|
<string name="enterBroadcast">Geben Sie eine Aktion für den Broadcast ein.</string>
|
||||||
|
<string name="broadcastExplanation">Diese Aktion erlaubt es, einen Broadcast über das Nachrichtensystem von Android zu verschicken. Das ist für den Benutzer nicht sichtbar, aber Anwendungen, die sich für bestimmte Broadcasts registriert haben, können darauf reagieren.</string>
|
||||||
|
<string name="explanationBroadcastTrigger">La mayoría de los eventos en su teléfono se \"publicado\" transmitiéndolos a través del sistema operativo.\nPor ejemplo, activar / desactivar el modo avión activará dicha transmisión. Esas transmisiones no son automáticamente visibles / audibles, pero si una aplicación (como Automatización) está interesada, puede conectarse a ellas. Cuando ocurran, se le notificará y podrá reaccionar.\n\nPuede definir aquí un evento de difusión para el que la aplicación esperará. Puede ingresarlo manualmente, copiarlo y pegarlo desde algún lugar o elegir uno de la lista de sugerencias. Como este desencadenante está destinado a ser y seguir siendo muy flexible, no puedo proporcionarle explicaciones para los elementos.\n\nLa lista de sugerencias no pretende estar completa. Visite la siguiente URL para echar un vistazo a la documentación de Android.\nTambién cualquier aplicación puede enviar eventos personalizados que no aparecerán en la documentación de Android, por supuesto.\n\nMuchas transmisiones requieren permisos específicos para funcionar. Intento solicitar permisos donde sé que serán necesarios. Si cree que se requiere un permiso para la acción que ingresó, hágamelo saber.\n\nNo recibido significa que no ha habido tal transmisión desde que se inició el servicio. Responder a ciertos parámetros está en desarrollo.</string>
|
||||||
|
<string name="logsExplanation">Um eine unnötige Abnutzung Ihres Speichers zu vermeiden, werden Protokolle standardmäßig nicht gespeichert. Wenn Sie also ein Problem haben, aktivieren Sie bitte zuerst die Anmeldeeinstellungen und setzen Sie den Protokollpegel auf 5. Reproduzieren Sie dann das Problem. Erst dann können Protokolle angehängt werden.</string>
|
||||||
|
<string name="directionStringDoesNotContain">enthält nicht</string>
|
||||||
</resources>
|
</resources>
|
@ -127,10 +127,10 @@
|
|||||||
<string name="actionTurnWifiTetheringOff">desactivar enrutador wifi</string>
|
<string name="actionTurnWifiTetheringOff">desactivar enrutador wifi</string>
|
||||||
<string name="actionTurnAirplaneModeOn">encender modo de vuelo</string>
|
<string name="actionTurnAirplaneModeOn">encender modo de vuelo</string>
|
||||||
<string name="actionTurnAirplaneModeOff">desactivar modo de vuelo</string>
|
<string name="actionTurnAirplaneModeOff">desactivar modo de vuelo</string>
|
||||||
<string name="activePoi">sitio activo</string>
|
<string name="activePoi">Sitio activo:</string>
|
||||||
<string name="closestPoi">sitio mas cerca</string>
|
<string name="closestPoi">sitio mas cerca</string>
|
||||||
<string name="poi">Posición</string>
|
<string name="poi">Posición</string>
|
||||||
<string name="pois">posiciónes</string>
|
<string name="pois">Posiciones</string>
|
||||||
<string name="serviceNotRunning">Servicio no está activo</string>
|
<string name="serviceNotRunning">Servicio no está activo</string>
|
||||||
<string name="general">General</string>
|
<string name="general">General</string>
|
||||||
<string name="startServiceAfterAppUpdate">Encender servicio después de un update si estuvo activado.</string>
|
<string name="startServiceAfterAppUpdate">Encender servicio después de un update si estuvo activado.</string>
|
||||||
@ -294,7 +294,7 @@
|
|||||||
<string name="parameterValue">Valor del parámetro</string>
|
<string name="parameterValue">Valor del parámetro</string>
|
||||||
<string name="addIntentValue">Añadir pareja intento</string>
|
<string name="addIntentValue">Añadir pareja intento</string>
|
||||||
<string name="parameterType">Tipo del parámetro</string>
|
<string name="parameterType">Tipo del parámetro</string>
|
||||||
<string name="phoneNumberExplanation">Puedes introducir un número, pero es opciónal. Si quieres usar uno puedes elegir uno de su directorio o introducir uno manualmente. Adiciónalmente puedes usar expresiónes regulares. Para probar esos me gusta la pagina:</string>
|
<string name="phoneNumberExplanation">Puedes introducir un número remoto, pero es opciónal. Si quieres usar uno puedes elegir uno de su directorio o introducir uno manualmente. Adiciónalmente puedes usar expresiónes regulares. Para probar esos me gusta la pagina:</string>
|
||||||
<string name="screenRotationEnabled">Rotación del monitor activado.</string>
|
<string name="screenRotationEnabled">Rotación del monitor activado.</string>
|
||||||
<string name="screenRotationDisabled">Rotación del monitor desactivado.</string>
|
<string name="screenRotationDisabled">Rotación del monitor desactivado.</string>
|
||||||
<string name="noPoisDefinedShort">No hay sitios.</string>
|
<string name="noPoisDefinedShort">No hay sitios.</string>
|
||||||
@ -700,4 +700,26 @@
|
|||||||
<string name="profileXrequiresThis">El perfil \"%1$s\" requiere esto.</string>
|
<string name="profileXrequiresThis">El perfil \"%1$s\" requiere esto.</string>
|
||||||
<string name="lastProfile">Último perfil:</string>
|
<string name="lastProfile">Último perfil:</string>
|
||||||
<string name="queryAllPackages">Obtener una lista de las aplicaciones instaladas</string>
|
<string name="queryAllPackages">Obtener una lista de las aplicaciones instaladas</string>
|
||||||
|
<string name="timeFrameDaysHint">Si utiliza un marco de tiempo que se extiende más allá de la medianoche, también debe seleccionar el día siguiente si desea que la condición se aplique después de la medianoche.</string>
|
||||||
|
<string name="featureNotInGooglePlayVersion">Esta función ya no está disponible en la versión de Google Play.\n\nTodo de vez en cuando Google intimida a los desarrolladores. Si desea seguir utilizando ciertas funciones, debe presentar documentos. Desafortunadamente, hay un 99% de posibilidades de que el papeleo sea rechazado. Es más o menos como en el cómic/la película de Astérix.\n\nHe pasado semanas discutiendo con ellos sobre casos como ese en el pasado, pero seguí recibiendo rechazos, ya sea por bots o personas que son tan inteligentes como los bots. En el puedo decidir entre que la aplicación se elimine de Play Store por completo o eliminar la función.\n\nPor favor, considere usar la versión APK de mi sitio web o la de F-Droid si necesita esas características.</string>
|
||||||
|
<string name="startActivityInsertManually">Esta limitación se refiere solo a la selección de una aplicación, no al inicio real. Por lo tanto, aún puede ingresar el nombre de una aplicación manualmente si lo conoce.</string>
|
||||||
|
<string name="deviceStarts">Dispositivo esta enciendo</string>
|
||||||
|
<string name="serviceStarts">Servicio esta enciendo</string>
|
||||||
|
<string name="deviceHasJustStarted">el dispositivo justamente ha encendido</string>
|
||||||
|
<string name="serviceHasJustStarted">el servicio justamente ha encendido</string>
|
||||||
|
<string name="emailPretext">Si tiene un problema, sugerencia o pregunta, escriba algo en el correo electrónico. No solo envíeme los archivos con el cuerpo de correo predeterminado. Ignoraré todo eso a menos que ya estemos en una conversación.</string>
|
||||||
|
<string name="lockedCommentScreenMustBeOff">Cualquier estado de bloqueo solo se detectará si la pantalla está apagada.</string>
|
||||||
|
<string name="lockedWithSecurity">bloqueado (con PIN, etc.)</string>
|
||||||
|
<string name="lockedWithoutSecurity">bloqueado (solo deslizar, sin PIN)</string>
|
||||||
|
<string name="selectBroadcast">Seleccionar broadcast</string>
|
||||||
|
<string name="broadcastsShowSuggestions">Mostrar sugerencias</string>
|
||||||
|
<string name="broadcastReceivedTitle">Broadcast recibido</string>
|
||||||
|
<string name="broadcastReceived">broadcast recibido</string>
|
||||||
|
<string name="broadcastNotReceived">broadcast no recibido</string>
|
||||||
|
<string name="broadcastExplanation">Esta acción permite enviar una transmisión a través del sistema de mensajes de Android. Esto no es visible para el usuario, pero las aplicaciones que se han registrado para ciertas transmisiones pueden responder a ello.</string>
|
||||||
|
<string name="sendBroadcast">Enviar broadcast</string>
|
||||||
|
<string name="enterBroadcast">Introduzca una acción de broadcast.</string>
|
||||||
|
<string name="explanationBroadcastTrigger">La mayoría de los eventos en su teléfono se \"publicado\" transmitiéndolos a través del sistema operativo.\nPor ejemplo, activar / desactivar el modo avión activará dicha transmisión. Esas transmisiones no son automáticamente visibles / audibles, pero si una aplicación (como Automatización) está interesada, puede conectarse a ellas. Cuando ocurran, se le notificará y podrá reaccionar.\n\nPuede definir aquí un evento de difusión para el que la aplicación esperará. Puede ingresarlo manualmente, copiarlo y pegarlo desde algún lugar o elegir uno de la lista de sugerencias. Como este desencadenante está destinado a ser y seguir siendo muy flexible, no puedo proporcionarle explicaciones para los elementos.\n\nLa lista de sugerencias no pretende estar completa. Visite la siguiente URL para echar un vistazo a la documentación de Android.\nTambién cualquier aplicación puede enviar eventos personalizados que no aparecerán en la documentación de Android, por supuesto.\n\nMuchas transmisiones requieren permisos específicos para funcionar. Intento solicitar permisos donde sé que serán necesarios. Si cree que se requiere un permiso para la acción que ingresó, hágamelo saber.\n\nNo recibido significa que no ha habido tal transmisión desde que se inició el servicio. Responder a ciertos parámetros está en desarrollo.</string>
|
||||||
|
<string name="logsExplanation">Para evitar el uso innecesario del almacenamiento, los registros no se guardan de forma predeterminada. Entonces, si tiene un problema, active primero la configuración de inicio de sesión y establezca el nivel de registro en 5. A continuación, reproduzca el problema. Solo entonces se pueden adjuntar registros.</string>
|
||||||
|
<string name="directionStringDoesNotContain">no contiene</string>
|
||||||
</resources>
|
</resources>
|
@ -355,7 +355,7 @@
|
|||||||
<string name="phoneDirection">Seleziona se\nentrante o uscente</string>
|
<string name="phoneDirection">Seleziona se\nentrante o uscente</string>
|
||||||
<string name="phoneNrReplacementError">Non ho l\'ultimo numero di telefono e quindi non posso inserirlo nella variabile.</string>
|
<string name="phoneNrReplacementError">Non ho l\'ultimo numero di telefono e quindi non posso inserirlo nella variabile.</string>
|
||||||
<string name="phoneNumber">Numero di telefono</string>
|
<string name="phoneNumber">Numero di telefono</string>
|
||||||
<string name="phoneNumberExplanation">È possibile inserire un numero di telefono specifico, ma non è necessario. Se vuoi specificarne uno, puoi sceglierlo dalla tua rubrica o inserirlo manualmente. Inoltre puoi usare espressioni regolari. Per testare un\'espressione regolare mi piace questa pagina:</string>
|
<string name="phoneNumberExplanation">È possibile inserire un numero di telefono remoto specifico, ma non è necessario. Se vuoi specificarne uno, puoi sceglierlo dalla tua rubrica o inserirlo manualmente. Inoltre puoi usare espressioni regolari. Per testare un\'espressione regolare mi piace questa pagina:</string>
|
||||||
<string name="playSound">Esegui suono</string>
|
<string name="playSound">Esegui suono</string>
|
||||||
<string name="pleaseEnterValidLatitude">Inserisci una latitudine valida.</string>
|
<string name="pleaseEnterValidLatitude">Inserisci una latitudine valida.</string>
|
||||||
<string name="pleaseEnterValidLongitude">Inserisci una longitudine valida.</string>
|
<string name="pleaseEnterValidLongitude">Inserisci una longitudine valida.</string>
|
||||||
@ -701,4 +701,26 @@
|
|||||||
<string name="locationNotWorkingOn12">Ottenere la posizione non sembra funzionare su dispositivi Android 12 al momento. Se non funziona per te, mi dispiace. Cercherò di risolvere questo problema non appena conoscerò la causa. Quindi, se cerchio rotante non smette di girare, sai perché.</string>
|
<string name="locationNotWorkingOn12">Ottenere la posizione non sembra funzionare su dispositivi Android 12 al momento. Se non funziona per te, mi dispiace. Cercherò di risolvere questo problema non appena conoscerò la causa. Quindi, se cerchio rotante non smette di girare, sai perché.</string>
|
||||||
<string name="lastProfile">Ultimo profilo:</string>
|
<string name="lastProfile">Ultimo profilo:</string>
|
||||||
<string name="queryAllPackages">Ottenere un elenco delle applicazioni installate</string>
|
<string name="queryAllPackages">Ottenere un elenco delle applicazioni installate</string>
|
||||||
|
<string name="timeFrameDaysHint">Se si utilizza un intervallo di tempo che si estende oltre la mezzanotte, è necessario selezionare anche il giorno successivo se si desidera che il trigger venga applicato dopo la mezzanotte.</string>
|
||||||
|
<string name="featureNotInGooglePlayVersion">Questa funzione non è più disponibile nella versione di Google Play.\\n\\nOltre di tanto in tanto Google bullizza gli sviluppatori. Se si desidera continuare a utilizzare determinate funzionalità, è necessario archiviare i documenti. Sfortunatamente c\'è una probabilità del 99% che i documenti vengano rifiutati. È più o meno come nel fumetto / film di Asterix.\\n\\nHo passato settimane a discutere con loro su casi del genere in passato, ma ho continuato a ricevere rifiuti - sia da bot che da persone che sono intelligenti come i bot. Nella sezione Posso decidere se l\'app viene rimossa completamente dal Play Store o rimuovere la funzione.\\nConsigliare l\'utilizzo della versione APK dal mio sito Web o quella di F-Droid se sono necessarie tali funzionalità.</string>
|
||||||
|
<string name="startActivityInsertManually">Questa limitazione riguarda solo la selezione di un\'app, non l\'avvio effettivo. Quindi puoi comunque inserire manualmente il nome di un\'applicazione se lo conosci.</string>
|
||||||
|
<string name="deviceStarts">Device starts</string>
|
||||||
|
<string name="serviceStarts">Avvio del servizio</string>
|
||||||
|
<string name="deviceHasJustStarted">Il dispositivo è appena stato avviato</string>
|
||||||
|
<string name="serviceHasJustStarted">il servizio è appena iniziato</string>
|
||||||
|
<string name="broadcastReceived">broadcast non ricevuta</string>
|
||||||
|
<string name="broadcastNotReceived">broadcast ricevuta</string>
|
||||||
|
<string name="broadcastReceivedTitle">Broadcast ricevuta</string>
|
||||||
|
<string name="broadcastsShowSuggestions">Mostra suggerimenti</string>
|
||||||
|
<string name="selectBroadcast">Seleziona trasmissione</string>
|
||||||
|
<string name="lockedWithoutSecurity">bloccato (solo scorrimento rapido, nessun PIN)</string>
|
||||||
|
<string name="lockedWithSecurity">bloccato (con PIN, ecc.)</string>
|
||||||
|
<string name="lockedCommentScreenMustBeOff">Qualsiasi stato di blocco verrà rilevato solo se lo schermo è spento.</string>
|
||||||
|
<string name="emailPretext">Se hai un problema, suggerimenti o domande, scrivi qualcosa nell\'e-mail. Non inviarmi semplicemente i file con il corpo di posta predefinito. Ignorerò tutto ciò che li riguarda a meno che non siamo già in una conversazione.</string>
|
||||||
|
<string name="broadcastExplanation">Questa azione consente di inviare una trasmissione tramite il sistema di messaggi di Android. Questo non è visibile all\'utente, ma le applicazioni che si sono registrate per determinate trasmissioni possono rispondere ad esso.</string>
|
||||||
|
<string name="sendBroadcast">Invia broadcast</string>
|
||||||
|
<string name="enterBroadcast">Immettere un\'azione di broadcast.</string>
|
||||||
|
<string name="explanationBroadcastTrigger">La maggior parte degli eventi sul telefono verrà \"pubblicata\" trasmettendoli in tutto il sistema operativo.\nAd esempio, l\'attivazione/disattivazione della modalità aereo attiverà tale trasmissione. Queste trasmissioni non sono automaticamente visibili / udibili, ma se un\'applicazione (come l\'automazione) è interessata può collegarsi a loro. Quando si verificano, riceverà una notifica e può reagire.\n\nÈ possibile definire qui un evento di trasmissione per il quale l\'applicazione attenderà. Puoi inserirlo manualmente, copiarlo e incollarlo da qualche parte o sceglierne uno dall\'elenco dei suggerimenti. Poiché questo trigger è pensato per essere e rimanere molto flessibile, non posso fornirti spiegazioni per gli articoli.\n\nL\'elenco dei suggerimenti non pretende di essere completo. Si prega di visitare l\'URL sottostante per dare un\'occhiata alla documentazione Android.\nAnche qualsiasi app può inviare eventi personalizzati che ovviamente non appariranno nella documentazione Android.\n\nMolte trasmissioni richiedono autorizzazioni specifiche per funzionare. Provo a richiedere le autorizzazioni dove so che saranno richieste. Se ritieni che sia necessaria un\'autorizzazione per l\'azione che hai inserito, fammi sapere.\n\nNon ricevuto significa che non c\'è stata una trasmissione di questo tipo da quando il servizio è stato avviato. La risposta a determinati parametri è in fase di sviluppo.</string>
|
||||||
|
<string name="logsExplanation">Per evitare di utilizzare inutilmente lo spazio di archiviazione, i registri non vengono salvati per impostazione predefinita. Quindi, se hai un problema, attiva prima le impostazioni di accesso e imposta il livello di registro su 5. Quindi riprodurre il problema. Solo allora i registri possono essere allegati.</string>
|
||||||
|
<string name="directionStringDoesNotContain">non contiene</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -543,7 +543,7 @@
|
|||||||
<string name="enterValidAction">Voer een geldige actie in</string>
|
<string name="enterValidAction">Voer een geldige actie in</string>
|
||||||
<string name="enterPackageName">Voer een geldige pakketnaam in.</string>
|
<string name="enterPackageName">Voer een geldige pakketnaam in.</string>
|
||||||
<string name="state">Staat</string>
|
<string name="state">Staat</string>
|
||||||
<string name="phoneNumberExplanation">U kunt een specifiek telefoonnummer opgeven, maar dat hoeft niet. Als u er een wilt opgeven, kunt u er een uit uw adresboek kiezen of het handmatig invoeren. Daarnaast kun je reguliere expressies gebruiken. Om een reguliere expressie te testen is deze pagina behulpzaam:</string>
|
<string name="phoneNumberExplanation">U kunt een specifiek telefoonnummer opgeven (van de bellende partner), maar dat hoeft niet. Als u er een wilt opgeven, kunt u er een uit uw adresboek kiezen of het handmatig invoeren. Daarnaast kun je reguliere expressies gebruiken. Om een reguliere expressie te testen is deze pagina behulpzaam:</string>
|
||||||
<string name="importConfiguration">Import configuration</string>
|
<string name="importConfiguration">Import configuration</string>
|
||||||
<string name="exportConfiguration">Export configuration</string>
|
<string name="exportConfiguration">Export configuration</string>
|
||||||
<string name="moreSettings">Meer instellingen</string>
|
<string name="moreSettings">Meer instellingen</string>
|
||||||
@ -699,4 +699,26 @@
|
|||||||
<string name="profileXrequiresThis">Profiel \"%1$s\" vereist dit.</string>
|
<string name="profileXrequiresThis">Profiel \"%1$s\" vereist dit.</string>
|
||||||
<string name="lastProfile">Laatste profiel:</string>
|
<string name="lastProfile">Laatste profiel:</string>
|
||||||
<string name="queryAllPackages">Een lijst met geïnstalleerde toepassingen ophalen</string>
|
<string name="queryAllPackages">Een lijst met geïnstalleerde toepassingen ophalen</string>
|
||||||
|
<string name="timeFrameDaysHint">Als u een tijdsbestek gebruikt dat zich uitstrekt over middernacht, moet u ook de volgende dag selecteren als u wilt dat de trigger na middernacht van toepassing is.</string>
|
||||||
|
<string name="featureNotInGooglePlayVersion">Deze functie is niet meer beschikbaar in de Google Play-versie.\\n\\nAlles af en toe pest Google ontwikkelaars. Als u bepaalde functies wilt blijven gebruiken, moet u papierwerk indienen. Helaas is er een kans van 99% dat het papierwerk wordt afgewezen. Het is vrijwel net als in de Asterix-strip / film.\\n\\nIk heb in het verleden wekenlang met hen gediscussieerd over dergelijke gevallen, maar ik bleef afwijzingen krijgen - hetzij door bots of mensen die ongeveer net zo intelligent zijn als bots. In de ik kan kiezen tussen de app die volledig uit de Play Store wordt verwijderd of de functie verwijdert.\\n Overweeg de APK-versie van mijn website of die van F-Droid te gebruiken als je die functies nodig hebt.</string>
|
||||||
|
<string name="startActivityInsertManually">Deze beperking heeft alleen betrekking op de selectie van een app, niet op de daadwerkelijke start. U kunt dus nog steeds handmatig de naam van een toepassing invoeren als u deze kent.</string>
|
||||||
|
<string name="deviceHasJustStarted">apparaat is net gestart</string>
|
||||||
|
<string name="serviceHasJustStarted">service is net begonnen</string>
|
||||||
|
<string name="serviceStarts">Service start</string>
|
||||||
|
<string name="deviceStarts">Apparaat start</string>
|
||||||
|
<string name="emailPretext">Als je een probleem, suggesties of vraag hebt, schrijf dan iets in de e-mail. Stuur me niet alleen de bestanden met de standaard e-mailtekst. Ik zal alles negeren, tenzij we al in gesprek zijn.</string>
|
||||||
|
<string name="lockedCommentScreenMustBeOff">Elke vergrendelde status wordt alleen gedetecteerd als het scherm is uitgeschakeld.</string>
|
||||||
|
<string name="lockedWithSecurity">vergrendeld (met PINCODE, enz.)</string>
|
||||||
|
<string name="lockedWithoutSecurity">vergrendeld (alleen vegen, geen pincode)</string>
|
||||||
|
<string name="selectBroadcast">Selecteer broadcast</string>
|
||||||
|
<string name="broadcastsShowSuggestions">Toon suggesties</string>
|
||||||
|
<string name="broadcastReceivedTitle">Broadcast ontvangen</string>
|
||||||
|
<string name="broadcastNotReceived">broadcast niet ontvangen</string>
|
||||||
|
<string name="broadcastReceived">broadcast ontvangen</string>
|
||||||
|
<string name="broadcastExplanation">Deze actie maakt het mogelijk om een uitzending te versturen via het berichtensysteem van Android. Dit is niet zichtbaar voor de gebruiker, maar applicaties die zich voor bepaalde uitzendingen hebben geregistreerd, kunnen hierop reageren.</string>
|
||||||
|
<string name="sendBroadcast">Broadcast verzenden</string>
|
||||||
|
<string name="enterBroadcast">Voer een uitzendactie in.</string>
|
||||||
|
<string name="explanationBroadcastTrigger">De meeste gebeurtenissen op uw telefoon worden \"gepubliceerd\" door ze uit te zenden in het hele besturingssysteem.\nHet in- en uitschakelen van de vliegtuigmodus zal bijvoorbeeld een dergelijke uitzending activeren. Die uitzendingen zijn niet automatisch zichtbaar/hoorbaar, maar als een applicatie (zoals Automation) geïnteresseerd is, kan deze erop aansluiten. Wanneer ze zich voordoen, wordt het een melding gegeven en kan het reageren.\n\nU kunt hier een uitzendgebeurtenis definiëren waarop de toepassing zal wachten. U kunt het handmatig invoeren, ergens vandaan kopiëren en plakken of er een kiezen uit de lijst met suggesties. Omdat deze trigger bedoeld is en zeer flexibel is, kan ik u geen uitleg geven voor de items.\n\nDe lijst met suggesties beweert niet volledig te zijn. Ga naar de onderstaande URL om de Android-documentatie te bekijken.\nOok kan elke app aangepaste gebeurtenissen verzenden die natuurlijk niet in de Android-documentatie worden weergegeven.\n\nVeel uitzendingen vereisen specifieke machtigingen om te kunnen werken. Ik probeer toestemmingen te vragen waarvan ik weet dat ze nodig zijn. Als u denkt dat er een toestemming vereist is voor de actie die u hebt ingevoerd, laat het me dan weten.\n\nNiet ontvangen betekent dat er sinds de service is gestart niet meer zo\'n uitzending is geweest. Inspelen op bepaalde parameters is in ontwikkeling.</string>
|
||||||
|
<string name="logsExplanation">Om onnodige slijtage van uw opslag te voorkomen, worden logboeken niet standaard opgeslagen. Dus als u een probleem hebt, activeer dan eerst de inloginstellingen en stel het logniveau in op 5. Reproduceer vervolgens het probleem. Alleen dan kunnen logs worden bijgevoegd.</string>
|
||||||
|
<string name="directionStringDoesNotContain">bevat geen</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -645,7 +645,7 @@
|
|||||||
<string name="enterValidAction">Enter a valid action</string>
|
<string name="enterValidAction">Enter a valid action</string>
|
||||||
<string name="enterPackageName">Enter a valid package name.</string>
|
<string name="enterPackageName">Enter a valid package name.</string>
|
||||||
<string name="state">State</string>
|
<string name="state">State</string>
|
||||||
<string name="phoneNumberExplanation">You can enter a specific phone number, but you don\'t have to. If you want to specify one you can either pick one from your address book or enter it manually. In addition you may use regular expressions. To test a regular expression I like this page:</string>
|
<string name="phoneNumberExplanation">You can enter a specific remote phone number, but you don\'t have to. If you want to specify one you can either pick one from your address book or enter it manually. In addition you may use regular expressions. To test a regular expression I like this page:</string>
|
||||||
<string name="importConfiguration">Import configuration</string>
|
<string name="importConfiguration">Import configuration</string>
|
||||||
<string name="exportConfiguration">Export configuration</string>
|
<string name="exportConfiguration">Export configuration</string>
|
||||||
<string name="moreSettings">More settings</string>
|
<string name="moreSettings">More settings</string>
|
||||||
@ -797,4 +797,27 @@
|
|||||||
<string name="locationNotWorkingOn12">Getting the location does not seem to be working on Android 12 devices currently. If it isn\'t working for you, I\'m sorry. I\'ll try to fix this as soon as I know the cause. So if the donut doesn\'t stop spinning, you know why.</string>
|
<string name="locationNotWorkingOn12">Getting the location does not seem to be working on Android 12 devices currently. If it isn\'t working for you, I\'m sorry. I\'ll try to fix this as soon as I know the cause. So if the donut doesn\'t stop spinning, you know why.</string>
|
||||||
<string name="lastProfile">Last profile:</string>
|
<string name="lastProfile">Last profile:</string>
|
||||||
<string name="queryAllPackages">Get a list of installed applications</string>
|
<string name="queryAllPackages">Get a list of installed applications</string>
|
||||||
|
<string name="timeFrameDaysHint">If you use a timeframe that stretches over midnight you need to select the following day as well if you want the trigger to apply after midnight.</string>
|
||||||
|
<string name="featureNotInGooglePlayVersion">This feature is not available in the Google Play version anymore.\n\nEvery now and then Google bullies developers. If you want to keep using certain features you have to file paperwork. Unfortunately there\'s a 99% chance that the paperwork gets rejected. It\'s pretty much like in the Asterix comic/movie.\n\nI\'ve spent weeks arguing with them about cases like that in the past, but I kept getting rejections - either by bots or people who are about as intelligent as bots. In the I can decide between the app being removed from the Play Store entirely or remove the feature.\nPlease consider using the APK version from my website or the one from F-Droid if you need those features.</string>
|
||||||
|
<string name="startActivityInsertManually">This limitation concerns only the selection of an app, not the actual start. So you can still enter the name of an application manually if you know it.</string>
|
||||||
|
<string name="deviceStarts">Device starts</string>
|
||||||
|
<string name="serviceStarts">Service starts</string>
|
||||||
|
<string name="deviceHasJustStarted">device has just started</string>
|
||||||
|
<string name="serviceHasJustStarted">service has just started</string>
|
||||||
|
<string name="broadcastReceived">broadcast received</string>
|
||||||
|
<string name="broadcastNotReceived">broadcast not received</string>
|
||||||
|
<string name="explanationBroadcastTrigger">Most events on your phone will be \"published\" by broadcasting them throughout the operating system.\nFor example turning on/off airplane mode will trigger such a broadcast. Those broadcasts are not automatically visible/audible, but if an application (like Automation) is interested it can hook up to them. When they occur it will get notified and can react.\n\nYou can define a broadcast event here for which the application will wait. You may enter it manually, copy & paste it from somewhere or pick one from the list of suggestions. As this trigger is meant to be and remain very flexible I cannot provide you with explanations for the items.\n\nThe list of suggestions does not claim to be complete. Please visit the below URL to have a look at the Android documentation.\nAlso any app can send custom events which will not appear in the Android documentation of course.\n\nMany broadcasts require specific permissions in order to work. I try to request permissions where I know they will be required. If you think a permission is required for the action you entered, please let me know.\n\nNot received means there has not been such a broadcast ever since the service has been started. Responding to certain parameters is in development.</string>
|
||||||
|
<string name="broadcastListUrl" translatable="false">https://developer.android.com/reference/android/content/Intent.html</string>
|
||||||
|
<string name="broadcastReceivedTitle">Broadcast received</string>
|
||||||
|
<string name="logsExplanation">To avoid unnecessary wearing of your storage, logs are not saved by default. So if you have a problem please activate logging in settings first and set log level to 5. Then reproduce the problem. Only then logs can be attached.</string>
|
||||||
|
<string name="broadcastsShowSuggestions">Show suggestions</string>
|
||||||
|
<string name="selectBroadcast">Select broadcast</string>
|
||||||
|
<string name="lockedWithoutSecurity">locked (swipe only, no PIN)</string>
|
||||||
|
<string name="lockedWithSecurity">locked (with PIN, etc.)</string>
|
||||||
|
<string name="lockedCommentScreenMustBeOff">Any state of locked will only be detected if the screen is off.</string>
|
||||||
|
<string name="emailPretext">If you have a problem, suggestions or question, please write something in the email. Do not just send me the files with the default mail body. I will ignore everything those unless we\'re already in a conversation.</string>
|
||||||
|
<string name="sendBroadcast">Send broadcast</string>
|
||||||
|
<string name="enterBroadcast">Enter a broadcast action.</string>
|
||||||
|
<string name="broadcastExplanation">This action allows to send a broadcast across the Android OS messaging system. This is not user-visible, but apps who listen for that specific broadcast can respond to it being sent.</string>
|
||||||
|
<string name="directionStringDoesNotContain">does not contain</string>
|
||||||
</resources>
|
</resources>
|
@ -5,7 +5,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.1.3'
|
classpath 'com.android.tools.build:gradle:7.2.0'
|
||||||
|
|
||||||
// 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
|
||||||
|
@ -21,6 +21,7 @@ Mögliche Auslöser:
|
|||||||
* Benachrichtigungen anderer Anwendungen
|
* Benachrichtigungen anderer Anwendungen
|
||||||
* Geräteausrichtung (Gyroskop)
|
* Geräteausrichtung (Gyroskop)
|
||||||
* Profile aktiv oder nicht
|
* Profile aktiv oder nicht
|
||||||
|
* Broadcasts anderer Anwendungen
|
||||||
|
|
||||||
Mögliche Aktionen:
|
Mögliche Aktionen:
|
||||||
* WLAN ein-/ausschalten
|
* WLAN ein-/ausschalten
|
||||||
@ -54,4 +55,4 @@ Spenden sind sicher eine gute, aber nicht die einzige Möglichkeit mich zu motiv
|
|||||||
* Wer mir etwas Gutes tun will, kann die Anwendung auch im Play Store bewerten (https://play.google.com/store/apps/details?id=com.jens.automation2).
|
* Wer mir etwas Gutes tun will, kann die Anwendung auch im Play Store bewerten (https://play.google.com/store/apps/details?id=com.jens.automation2).
|
||||||
* Außerdem ist Hilfe bei der Übersetzung willkommen. Englisch, Spanisch und Deutsch kann ich selbst. Aber sonst ist alles gern gesehen.
|
* Außerdem ist Hilfe bei der Übersetzung willkommen. Englisch, Spanisch und Deutsch kann ich selbst. Aber sonst ist alles gern gesehen.
|
||||||
|
|
||||||
Erklärungen zu den vielen Berechtigungen können hier abgerufen werden: https://server47.de/automation/permissions_de.html
|
Erklärungen zu den vielen Berechtigungen können hier abgerufen werden: https://server47.de/automation/permissions.php
|
BIN
fastlane/metadata/android/de-DE/images/phoneScreenshots/5.png
Normal file
After Width: | Height: | Size: 220 KiB |
BIN
fastlane/metadata/android/de-DE/images/phoneScreenshots/6.png
Normal file
After Width: | Height: | Size: 191 KiB |
7
fastlane/metadata/android/en-US/changelogs/120.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
* New trigger: device has just started
|
||||||
|
* New trigger: service has just started
|
||||||
|
* New trigger: Respond to customizable broadcasts
|
||||||
|
* New parameter for trigger Screen state: New state "locked"
|
||||||
|
* New action: Send broadcasts
|
||||||
|
* Fixed: Crash when editing notification trigger
|
||||||
|
* Fixed: TimeFrame trigger - time may have changed when crossing timezones or daylight saving changes
|
@ -21,6 +21,7 @@ Supported triggers:
|
|||||||
* Notifications of other apps
|
* Notifications of other apps
|
||||||
* Device orientation (gyroscope)
|
* Device orientation (gyroscope)
|
||||||
* Profile active or not
|
* Profile active or not
|
||||||
|
* Broadcasts of other apps
|
||||||
|
|
||||||
Supported actions:
|
Supported actions:
|
||||||
* Change wifi state
|
* Change wifi state
|
||||||
@ -54,4 +55,4 @@ Donations are certainly a good, but not the only way to motivate me :-)
|
|||||||
* If you'd like to support me, you can also leave a positive review for the app on Google Play (https://play.google.com/store/apps/details?id=com.jens.automation2).
|
* If you'd like to support me, you can also leave a positive review for the app on Google Play (https://play.google.com/store/apps/details?id=com.jens.automation2).
|
||||||
* Furthermore I can always use help in translating the app. English, German and some Spanish are among my own skills. But everything else is more than welcome.
|
* Furthermore I can always use help in translating the app. English, German and some Spanish are among my own skills. But everything else is more than welcome.
|
||||||
|
|
||||||
Explanation of the many permissions can be found here: https://server47.de/automation/permissions_en.html
|
Explanation of the many permissions can be found here: https://server47.de/automation/permissions.php
|
BIN
fastlane/metadata/android/en-US/images/phoneScreenshots/5.png
Normal file
After Width: | Height: | Size: 213 KiB |
BIN
fastlane/metadata/android/en-US/images/phoneScreenshots/6.png
Normal file
After Width: | Height: | Size: 186 KiB |
@ -21,6 +21,7 @@ Disparadores:
|
|||||||
* Notificaciónes de otras apps
|
* Notificaciónes de otras apps
|
||||||
* Orientación del dispositivo (giroscopio)
|
* Orientación del dispositivo (giroscopio)
|
||||||
* Perfil activado o no
|
* Perfil activado o no
|
||||||
|
* Broadcasts de otras apps
|
||||||
|
|
||||||
Aciónes:
|
Aciónes:
|
||||||
* Pasar de wifi
|
* Pasar de wifi
|
||||||
@ -54,4 +55,4 @@ Donaciónes seguramente son una buena, pero no la unica posibilidad de apoyarme
|
|||||||
* Si quiere apoyarme puedes escribir un buena revisión en Google Play (https://play.google.com/store/apps/details?id=com.jens.automation2).
|
* Si quiere apoyarme puedes escribir un buena revisión en Google Play (https://play.google.com/store/apps/details?id=com.jens.automation2).
|
||||||
* Además siempre necesito ayuda en traduciendo la app. Ingles, Aleman y Español estan en mis habilidades. Per todo lo demás es bienvenido.
|
* Además siempre necesito ayuda en traduciendo la app. Ingles, Aleman y Español estan en mis habilidades. Per todo lo demás es bienvenido.
|
||||||
|
|
||||||
Puedes leer una explicación de los permisos aqui: https://server47.de/automation/permissions_en.html
|
Puedes leer una explicación de los permisos aqui: https://server47.de/automation/permissions.php
|
BIN
fastlane/metadata/android/es-ES/images/1.png
Normal file
After Width: | Height: | Size: 191 KiB |
BIN
fastlane/metadata/android/es-ES/images/2.png
Normal file
After Width: | Height: | Size: 118 KiB |
BIN
fastlane/metadata/android/es-ES/images/3.png
Normal file
After Width: | Height: | Size: 148 KiB |
BIN
fastlane/metadata/android/es-ES/images/4.png
Normal file
After Width: | Height: | Size: 119 KiB |
BIN
fastlane/metadata/android/es-ES/images/5.png
Normal file
After Width: | Height: | Size: 207 KiB |
BIN
fastlane/metadata/android/es-ES/images/6.png
Normal file
After Width: | Height: | Size: 187 KiB |
BIN
fastlane/metadata/android/es-ES/images/7.png
Normal file
After Width: | Height: | Size: 118 KiB |
@ -21,6 +21,7 @@ Eventi supportati:
|
|||||||
* Notificazione di un altra applicazione
|
* Notificazione di un altra applicazione
|
||||||
* Orientamento del dispositivo (giroscopio)
|
* Orientamento del dispositivo (giroscopio)
|
||||||
* Profilo attivo o meno
|
* Profilo attivo o meno
|
||||||
|
* Broadcasts di altre app
|
||||||
|
|
||||||
Azioni supportate:
|
Azioni supportate:
|
||||||
* Cambia lo stato del wifi
|
* Cambia lo stato del wifi
|
||||||
@ -56,8 +57,7 @@ Donativi sono sicuramente una buona forma di motivarmi, ma non l'unica :-)
|
|||||||
Inglese, Tedesco e un po' di Spagnolo son parte delle mie abilità. Ma per tutte le altre, apprezzo molto ogni aiuto.
|
Inglese, Tedesco e un po' di Spagnolo son parte delle mie abilità. Ma per tutte le altre, apprezzo molto ogni aiuto.
|
||||||
|
|
||||||
Una spiegazione di tutti i permessi si trova qui:
|
Una spiegazione di tutti i permessi si trova qui:
|
||||||
https://server47.de/automation/permissions_en.html
|
https://server47.de/automation/permissions.php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BIN
fastlane/metadata/android/it-IT/images/phoneScreenshots/5.png
Normal file
After Width: | Height: | Size: 216 KiB |
BIN
fastlane/metadata/android/it-IT/images/phoneScreenshots/6.png
Normal file
After Width: | Height: | Size: 188 KiB |
@ -23,6 +23,7 @@ Ondersteunde triggers:
|
|||||||
* Meldingen van andere apps
|
* Meldingen van andere apps
|
||||||
* Apparaat oriëntatie (gyroscoop)
|
* Apparaat oriëntatie (gyroscoop)
|
||||||
* Profiel actief of niet
|
* Profiel actief of niet
|
||||||
|
* Broadcasts van andere apps
|
||||||
|
|
||||||
Ondersteunde acties:
|
Ondersteunde acties:
|
||||||
* Wijzig wifi status
|
* Wijzig wifi status
|
||||||
@ -57,4 +58,4 @@ Donaties zijn zeker een goede, maar niet de enige manier om mij te motiveren :-)
|
|||||||
* Als je me wilt steunen, kun je ook een positieve review voor de app achterlaten op Google Play ( https://play.google.com/store/apps/details?id=com.jens.automation2 ).
|
* Als je me wilt steunen, kun je ook een positieve review voor de app achterlaten op Google Play ( https://play.google.com/store/apps/details?id=com.jens.automation2 ).
|
||||||
* Verder kan ik altijd hulp gebruiken bij het vertalen van de app. Engels, Duits en wat Spaans behoren tot mijn eigen vaardigheden. Maar al het andere is meer dan welkom.
|
* Verder kan ik altijd hulp gebruiken bij het vertalen van de app. Engels, Duits en wat Spaans behoren tot mijn eigen vaardigheden. Maar al het andere is meer dan welkom.
|
||||||
|
|
||||||
Uitleg van de vele permissies vind je hier (Engels) : https://server47.de/automation/permissions_en.html
|
Uitleg van de vele permissies vind je hier (Engels) : https://server47.de/automation/permissions.php
|
BIN
fastlane/metadata/android/nl-NL/images/phoneScreenshots/5.png
Normal file
After Width: | Height: | Size: 219 KiB |
BIN
fastlane/metadata/android/nl-NL/images/phoneScreenshots/6.png
Normal file
After Width: | Height: | Size: 188 KiB |
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.3.3-bin.zip
|
||||||
|