Compare commits
19 Commits
5ca7295c30
...
developmen
Author | SHA1 | Date | |
---|---|---|---|
17edf90086 | |||
879e1c6ef3 | |||
d7d806fb5c | |||
910af92989 | |||
9f36411511 | |||
eb893a7f21 | |||
8788a89e48 | |||
bb10620883 | |||
3e29054f82 | |||
9d5f0a3cef | |||
695b1f2481 | |||
d7357b0b0f | |||
e272338cc6 | |||
3dd84220a3 | |||
4bc2781ee7 | |||
62bfbbb064 | |||
31d167a93f | |||
500610fb98 | |||
6e73c74b60 |
@ -11,8 +11,8 @@ android {
|
||||
compileSdkVersion 33
|
||||
buildToolsVersion '29.0.2'
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
versionCode 138
|
||||
versionName "1.8"
|
||||
versionCode 143
|
||||
versionName "1.8.2"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@ -36,7 +36,7 @@ android {
|
||||
{
|
||||
dimension "version"
|
||||
versionNameSuffix "-googlePlay"
|
||||
targetSdkVersion 33
|
||||
targetSdkVersion 34
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -78,7 +78,7 @@
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
|
||||
<!--android:maxSdkVersion="32" />
|
||||
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />-->
|
||||
|
||||
<uses-permission android:name="com.termux.permission.RUN_COMMAND" />
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
|
@ -76,6 +76,7 @@
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
|
||||
<!--android:maxSdkVersion="32" />
|
||||
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />-->
|
||||
<uses-permission android:name="com.termux.permission.RUN_COMMAND" />
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
|
@ -66,7 +66,6 @@
|
||||
<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.SYSTEM_ALERT_WINDOW" />
|
||||
<uses-permission android:name="android.permission.READ_CALENDAR" />
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_SECURE_SETTINGS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
@ -74,6 +73,7 @@
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<!--android:maxSdkVersion="32" />
|
||||
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />-->
|
||||
<uses-permission android:name="com.termux.permission.RUN_COMMAND" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@ -258,18 +258,6 @@
|
||||
android:exported="true"
|
||||
/>
|
||||
|
||||
<service android:name=".MyAccessibilityService"
|
||||
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.accessibilityservice.AccessibilityService" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.accessibilityservice"
|
||||
android:resource="@xml/config_accessibility_service" />
|
||||
</service>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -33,13 +33,9 @@ public class Action
|
||||
setWifiTethering,
|
||||
setBluetoothTethering,
|
||||
setDisplayRotation,
|
||||
turnWifiOn,turnWifiOff,
|
||||
turnBluetoothOn,turnBluetoothOff,
|
||||
triggerUrl,
|
||||
changeSoundProfile,
|
||||
turnUsbTetheringOn,turnUsbTetheringOff,
|
||||
turnWifiTetheringOn,turnWifiTetheringOff,
|
||||
enableScreenRotation,disableScreenRotation,
|
||||
startOtherActivity,
|
||||
waitBeforeNextAction,
|
||||
turnScreenOnOrOff,
|
||||
@ -60,9 +56,9 @@ public class Action
|
||||
startPhoneCall,
|
||||
stopPhoneCall,
|
||||
copyToClipboard,
|
||||
takeScreenshot,
|
||||
setLocationService,
|
||||
sendTextMessage;
|
||||
sendTextMessage,
|
||||
takeScreenshot;
|
||||
|
||||
public String getFullName(Context context)
|
||||
{
|
||||
@ -80,14 +76,6 @@ public class Action
|
||||
return context.getResources().getString(R.string.actionSetUsbTethering);
|
||||
case setDisplayRotation:
|
||||
return context.getResources().getString(R.string.actionSetDisplayRotation);
|
||||
case turnWifiOn:
|
||||
return context.getResources().getString(R.string.actionTurnWifiOn);
|
||||
case turnWifiOff:
|
||||
return context.getResources().getString(R.string.actionTurnWifiOff);
|
||||
case turnBluetoothOn:
|
||||
return context.getResources().getString(R.string.actionTurnBluetoothOn);
|
||||
case turnBluetoothOff:
|
||||
return context.getResources().getString(R.string.actionTurnBluetoothOff);
|
||||
case triggerUrl:
|
||||
return context.getResources().getString(R.string.actionTriggerUrl);
|
||||
case changeSoundProfile:
|
||||
@ -96,14 +84,6 @@ public class Action
|
||||
return context.getResources().getString(R.string.actionTurnUsbTetheringOn);
|
||||
case turnUsbTetheringOff:
|
||||
return context.getResources().getString(R.string.actionTurnUsbTetheringOff);
|
||||
case turnWifiTetheringOn:
|
||||
return context.getResources().getString(R.string.actionTurnWifiTetheringOn);
|
||||
case turnWifiTetheringOff:
|
||||
return context.getResources().getString(R.string.actionTurnWifiTetheringOff);
|
||||
case enableScreenRotation:
|
||||
return context.getResources().getString(R.string.actionEnableScreenRotation);
|
||||
case disableScreenRotation:
|
||||
return context.getResources().getString(R.string.actionDisableScreenRotation);
|
||||
case startOtherActivity:
|
||||
return context.getResources().getString(R.string.startOtherActivity);
|
||||
case waitBeforeNextAction:
|
||||
@ -493,25 +473,9 @@ public class Action
|
||||
for(Action_Enum action : Action_Enum.values())
|
||||
{
|
||||
if( // exclusion for deprecated types
|
||||
!action.toString().equals("turnWifiOn")
|
||||
&&
|
||||
!action.toString().equals("turnWifiOff")
|
||||
&&
|
||||
!action.toString().equals("turnBluetoothOn")
|
||||
&&
|
||||
!action.toString().equals("turnBluetoothOff")
|
||||
&&
|
||||
!action.toString().equals("turnUsbTetheringOn")
|
||||
&&
|
||||
!action.toString().equals("turnUsbTetheringOff")
|
||||
&&
|
||||
!action.toString().equals("turnWifiTetheringOn")
|
||||
&&
|
||||
!action.toString().equals("turnWifiTetheringOff")
|
||||
&&
|
||||
!action.toString().equals("enableScreenRotation")
|
||||
&&
|
||||
!action.toString().equals("disableScreenRotation")
|
||||
) // exclusion for deprecated types
|
||||
actionTypesList.add(action.toString());
|
||||
}
|
||||
@ -525,25 +489,9 @@ public class Action
|
||||
for(Action_Enum action : Action_Enum.values())
|
||||
{
|
||||
if( // exclusion for deprecated types
|
||||
!action.toString().equals("turnWifiOn")
|
||||
&&
|
||||
!action.toString().equals("turnWifiOff")
|
||||
&&
|
||||
!action.toString().equals("turnBluetoothOn")
|
||||
&&
|
||||
!action.toString().equals("turnBluetoothOff")
|
||||
&&
|
||||
!action.toString().equals("turnUsbTetheringOn")
|
||||
&&
|
||||
!action.toString().equals("turnUsbTetheringOff")
|
||||
&&
|
||||
!action.toString().equals("turnWifiTetheringOn")
|
||||
&&
|
||||
!action.toString().equals("turnWifiTetheringOff")
|
||||
&&
|
||||
!action.toString().equals("enableScreenRotation")
|
||||
&&
|
||||
!action.toString().equals("disableScreenRotation")
|
||||
) // exclusion for deprecated types
|
||||
actionTypesList.add(action.getFullName(context));
|
||||
}
|
||||
|
@ -208,8 +208,8 @@ public class Actions
|
||||
String[] parts = action.split(Action.actionParameter2Split);
|
||||
broadcastIntent.setAction(parts[0]);
|
||||
|
||||
String[] intentparts = parts[1].split(";");
|
||||
broadcastIntent = packParametersIntoIntent(broadcastIntent, intentparts, 0);
|
||||
String[] intentParts = parts[1].split(";");
|
||||
broadcastIntent = packParametersIntoIntent(broadcastIntent, intentParts, 0);
|
||||
}
|
||||
else
|
||||
broadcastIntent.setAction(action);
|
||||
@ -1056,64 +1056,76 @@ public class Actions
|
||||
String params[];
|
||||
|
||||
if(param.contains(Action.actionParameter2Split))
|
||||
params = param.split(Action.actionParameter2Split);
|
||||
params = param.split(Action.actionParameter2Split, -1);
|
||||
else
|
||||
params = param.split(";");
|
||||
params = param.split(";", -1);
|
||||
|
||||
try
|
||||
{
|
||||
Intent externalApplicationIntent;
|
||||
|
||||
String packageName, className, activityOrAction, startupType;
|
||||
|
||||
packageName = params[0];
|
||||
className = params[1];
|
||||
activityOrAction = params[2];
|
||||
startupType = params[3];
|
||||
|
||||
if (!startByAction)
|
||||
{
|
||||
// selected by activity
|
||||
|
||||
String packageName, className;
|
||||
|
||||
packageName = params[0];
|
||||
className = params[1];
|
||||
|
||||
// start by activity
|
||||
Miscellaneous.logEvent("i", "StartOtherApp", "Starting app by activity: " + packageName + " " + className, 3);
|
||||
|
||||
externalApplicationIntent = new Intent(Intent.ACTION_MAIN);
|
||||
externalApplicationIntent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||
|
||||
if(packageName.equals("dummyPkg"))
|
||||
if(packageName.equals("dummyPkg") || packageName.length() == 0)
|
||||
externalApplicationIntent.setAction(className);
|
||||
|
||||
externalApplicationIntent.setClassName(packageName, className);
|
||||
externalApplicationIntent.setPackage(packageName);
|
||||
externalApplicationIntent.setClassName(packageName, activityOrAction);
|
||||
|
||||
if (!Miscellaneous.doesActivityExist(externalApplicationIntent, Miscellaneous.getAnyContext()))
|
||||
Miscellaneous.logEvent("w", "StartOtherApp", "Activity not found: " + className, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
// selected by action
|
||||
// start by action
|
||||
Miscellaneous.logEvent("i", "StartOtherApp", "Starting app by action: " + param, 3);
|
||||
|
||||
externalApplicationIntent = new Intent();
|
||||
|
||||
if (!params[0].equals(dummyPackageString))
|
||||
externalApplicationIntent.setPackage(params[0]);
|
||||
|
||||
externalApplicationIntent.setAction(params[1]);
|
||||
|
||||
if (params[2].equals(ActivityManageActionStartActivity.startByServiceString) || params[2].equals(ActivityManageActionStartActivity.startByForegroundServiceString))
|
||||
if (!packageName.equals(dummyPackageString))
|
||||
{
|
||||
externalApplicationIntent.setComponent(new ComponentName(params[0], params[2]));
|
||||
externalApplicationIntent.setPackage(packageName);
|
||||
if(!StringUtils.isEmpty(className))
|
||||
externalApplicationIntent.setClassName(packageName, className);
|
||||
}
|
||||
|
||||
externalApplicationIntent.setAction(activityOrAction);
|
||||
|
||||
if (startupType.equals(ActivityManageActionStartActivity.startByServiceString) || startupType.equals(ActivityManageActionStartActivity.startByForegroundServiceString))
|
||||
{
|
||||
externalApplicationIntent.setComponent(new ComponentName(packageName, className));
|
||||
}
|
||||
}
|
||||
|
||||
externalApplicationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
// Pack intents
|
||||
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 3);
|
||||
if(params.length >= 4)
|
||||
{
|
||||
if(Miscellaneous.isNumeric(startupType))
|
||||
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 4);
|
||||
else
|
||||
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 3);
|
||||
}
|
||||
|
||||
if (params[2].equals(ActivityManageActionStartActivity.startByActivityString))
|
||||
if (startupType.equals(ActivityManageActionStartActivity.startByActivityString))
|
||||
automationServerRef.startActivity(externalApplicationIntent);
|
||||
else if (params[2].equals(ActivityManageActionStartActivity.startByServiceString))
|
||||
else if (startupType.equals(ActivityManageActionStartActivity.startByServiceString))
|
||||
automationServerRef.startService(externalApplicationIntent);
|
||||
else if (params[2].equals(ActivityManageActionStartActivity.startByForegroundServiceString) && Build.VERSION.SDK_INT >= 26)
|
||||
else if (startupType.equals(ActivityManageActionStartActivity.startByForegroundServiceString) && Build.VERSION.SDK_INT >= 26)
|
||||
automationServerRef.startForegroundService(externalApplicationIntent);
|
||||
else
|
||||
automationServerRef.sendBroadcast(externalApplicationIntent);
|
||||
@ -1752,7 +1764,7 @@ public class Actions
|
||||
{
|
||||
try
|
||||
{
|
||||
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.O_MR1)
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
|
||||
{
|
||||
if(MobileDataStuff.setMobileNetworkFromAndroid9(desiredState, automationServerRef))
|
||||
{
|
||||
@ -1765,9 +1777,9 @@ public class Actions
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP)
|
||||
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
||||
{
|
||||
if (MobileDataStuff.setMobileNetworkTillAndroid5(desiredState, automationServerRef))
|
||||
if (MobileDataStuff.setMobileNetworkAndroid6Till8(desiredState, automationServerRef))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
||||
return true;
|
||||
@ -1780,7 +1792,7 @@ public class Actions
|
||||
}
|
||||
else
|
||||
{
|
||||
if (MobileDataStuff.setMobileNetworkAndroid6Till8(desiredState, automationServerRef))
|
||||
if (MobileDataStuff.setMobileNetworkTillAndroid5(desiredState, automationServerRef))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "setDataConnectionWithRoot()", Miscellaneous.getAnyContext().getResources().getString(R.string.dataConWithRootSuccess), 2);
|
||||
return true;
|
||||
@ -1801,8 +1813,9 @@ public class Actions
|
||||
rootString = Miscellaneous.getAnyContext().getResources().getString(R.string.phoneIsNotRooted);
|
||||
|
||||
Miscellaneous.logEvent("e", "setDataWithRoot()", "Error setting data setting with root. " + rootString + ": " + Log.getStackTraceString(e), 3);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@ -2353,7 +2366,8 @@ public class Actions
|
||||
{
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
|
||||
{
|
||||
MyAccessibilityService.getInstance().performGlobalAction(AccessibilityService.GLOBAL_ACTION_TAKE_SCREENSHOT);
|
||||
if(!BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay))
|
||||
MyAccessibilityService.getInstance().performGlobalAction(AccessibilityService.GLOBAL_ACTION_TAKE_SCREENSHOT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
@ -98,8 +99,17 @@ public class ActivityControlCenter extends Activity
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
|
||||
startActivityForResult(intent, requestCodeImport);
|
||||
AlertDialog dialog = Miscellaneous.messageBox(getResources().getString(R.string.info), getResources().getString(R.string.importChooseFolderNotice), ActivityControlCenter.this);
|
||||
dialog.setOnDismissListener(new DialogInterface.OnDismissListener()
|
||||
{
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialogInterface)
|
||||
{
|
||||
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
|
||||
startActivityForResult(intent, requestCodeImport);
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -590,7 +590,7 @@ public class ActivityMainScreen extends ActivityGeneric
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.app_name), getResources().getString(R.string.android9RecordAudioNotice) + " " + getResources().getString(R.string.messageNotShownAgain), ActivityMainScreen.this).show();
|
||||
}
|
||||
|
||||
if(Build.VERSION.SDK_INT >= 29 && !Settings.noticeAndroid10WifiShown && Rule.isAnyRuleUsing(Action.Action_Enum.setWifi))
|
||||
if(Miscellaneous.getTargetSDK(ActivityMainScreen.this) >= 29 && !Settings.noticeAndroid10WifiShown && Rule.isAnyRuleUsing(Action.Action_Enum.setWifi))
|
||||
{
|
||||
Settings.noticeAndroid10WifiShown = true;
|
||||
Settings.writeSettings(ActivityMainScreen.this);
|
||||
|
@ -32,7 +32,7 @@ public class ActivityManageActionSpeakText extends Activity
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
if(etSpeakText.getText().toString().length()>0)
|
||||
if(!etSpeakText.getText().toString().isEmpty())
|
||||
{
|
||||
if(resultingAction == null)
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
Button bSelectApp, bAddIntentPair, bSaveActionStartOtherActivity, showStartProgramExamples;
|
||||
Spinner spinnerParameterType;
|
||||
RadioGroup rgAppStartupType;
|
||||
boolean edit = false;
|
||||
// boolean edit = false;
|
||||
ProgressDialog progressDialog = null;
|
||||
RadioButton rbStartAppSelectByActivity, rbStartAppSelectByAction, rbStartAppByActivity, rbStartAppByBroadcast, rbStartAppByService, rbStartAppByForegroundService;
|
||||
|
||||
@ -95,7 +95,7 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
spinnerParameterType.setAdapter(intentTypeSpinnerAdapter);
|
||||
intentTypeSpinnerAdapter.notifyDataSetChanged();
|
||||
|
||||
etClassName.setEnabled(false);
|
||||
// etClassName.setEnabled(false);
|
||||
|
||||
intentPairAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, intentPairList);
|
||||
bSelectApp.setOnClickListener(new OnClickListener()
|
||||
@ -233,26 +233,29 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
|
||||
String parameter2 = "";
|
||||
|
||||
if (rbStartAppSelectByActivity.isChecked())
|
||||
parameter2 += etPackageName.getText().toString() + Action.actionParameter2Split + etActivityOrActionPath.getText().toString();
|
||||
else
|
||||
{
|
||||
if (etPackageName.getText().toString() != null && etPackageName.getText().toString().length() > 0)
|
||||
parameter2 += etPackageName.getText().toString() + Action.actionParameter2Split + etActivityOrActionPath.getText().toString();
|
||||
else
|
||||
parameter2 += Actions.dummyPackageString + Action.actionParameter2Split + etActivityOrActionPath.getText().toString();
|
||||
/*
|
||||
0 = packageName
|
||||
1 = className
|
||||
2 = activityName/actionName
|
||||
3 = startType
|
||||
4 = parameters
|
||||
*/
|
||||
|
||||
parameter2 += Action.actionParameter2Split + etClassName.getText().toString();
|
||||
}
|
||||
parameter2 += etPackageName.getText().toString()
|
||||
+ Action.actionParameter2Split
|
||||
+ etClassName.getText().toString()
|
||||
+ Action.actionParameter2Split
|
||||
+ etActivityOrActionPath.getText().toString()
|
||||
+ Action.actionParameter2Split;
|
||||
|
||||
if (rbStartAppByActivity.isChecked())
|
||||
parameter2 += Action.actionParameter2Split + startByActivityString;
|
||||
parameter2 += startByActivityString;
|
||||
else if(rbStartAppByService.isChecked())
|
||||
parameter2 += Action.actionParameter2Split + startByServiceString;
|
||||
parameter2 += startByServiceString;
|
||||
else if(rbStartAppByForegroundService.isChecked())
|
||||
parameter2 += Action.actionParameter2Split + startByForegroundServiceString;
|
||||
parameter2 += startByForegroundServiceString;
|
||||
else
|
||||
parameter2 += Action.actionParameter2Split + startByBroadcastString;
|
||||
parameter2 += startByBroadcastString;
|
||||
|
||||
for (String s : intentPairList)
|
||||
parameter2 += Action.actionParameter2Split + s;
|
||||
@ -316,23 +319,6 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
}
|
||||
});
|
||||
|
||||
rgAppStartupType.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()
|
||||
{
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup radioGroup, int i)
|
||||
{
|
||||
if(rbStartAppByActivity.isChecked())
|
||||
etClassName.setEnabled(false);
|
||||
else if (rbStartAppByBroadcast.isChecked())
|
||||
etClassName.setEnabled(false);
|
||||
else if(rbStartAppByService.isChecked())
|
||||
etClassName.setEnabled(true);
|
||||
else if(rbStartAppByForegroundService.isChecked())
|
||||
etClassName.setEnabled(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Intent i = getIntent();
|
||||
if(i.hasExtra(ActivityManageRule.intentNameActionParameter1))
|
||||
loadValuesIntoGui(i);
|
||||
@ -625,52 +611,36 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
rbStartAppSelectByActivity.setChecked(!selectionByAction);
|
||||
rbStartAppSelectByAction.setChecked(selectionByAction);
|
||||
|
||||
String[] params;
|
||||
String partsString = input.getStringExtra(ActivityManageRule.intentNameActionParameter2);
|
||||
/*
|
||||
0 = packageName
|
||||
1 = className
|
||||
2 = activityName/actionName
|
||||
3 = startType
|
||||
4 = parameters
|
||||
*/
|
||||
|
||||
if(partsString.contains(Action.actionParameter2Split))
|
||||
params = partsString.split(Action.actionParameter2Split);
|
||||
else
|
||||
params = partsString.split(";");
|
||||
try
|
||||
{
|
||||
String[] params;
|
||||
String partsString = input.getStringExtra(ActivityManageRule.intentNameActionParameter2);
|
||||
|
||||
if(partsString.contains(Action.actionParameter2Split))
|
||||
params = partsString.split(Action.actionParameter2Split, -1);
|
||||
else
|
||||
params = partsString.split(";", -1);
|
||||
|
||||
etPackageName.setText(params[0]);
|
||||
etClassName.setText(params[1]);
|
||||
etActivityOrActionPath.setText(params[2]);
|
||||
|
||||
if(Miscellaneous.isNumeric(params[2])) // old configuration file
|
||||
{
|
||||
rbStartAppByActivity.setChecked(params[2].equals(startByActivityString));
|
||||
rbStartAppByBroadcast.setChecked(params[2].equals(startByBroadcastString));
|
||||
rbStartAppByService.setChecked(params[2].equals(startByServiceString));
|
||||
}
|
||||
else
|
||||
{
|
||||
rbStartAppByActivity.setChecked(params[3].equals(startByActivityString));
|
||||
rbStartAppByBroadcast.setChecked(params[3].equals(startByBroadcastString));
|
||||
rbStartAppByService.setChecked(params[3].equals(startByServiceString));
|
||||
rbStartAppByForegroundService.setChecked(params[3].equals(startByForegroundServiceString));
|
||||
}
|
||||
|
||||
int startIndex = -1;
|
||||
|
||||
if(!selectionByAction)
|
||||
{
|
||||
etPackageName.setText(params[0]);
|
||||
etActivityOrActionPath.setText(params[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!params[0].contains(Actions.dummyPackageString))
|
||||
etPackageName.setText(params[0]);
|
||||
|
||||
etActivityOrActionPath.setText(params[1]);
|
||||
etClassName.setText(params[2]);
|
||||
}
|
||||
|
||||
if (params.length >= 4)
|
||||
startIndex = 4;
|
||||
|
||||
if(startIndex > -1 && params.length > startIndex)
|
||||
{
|
||||
intentPairList.clear();
|
||||
|
||||
for(int i=startIndex; i<params.length; i++)
|
||||
for(int i=4; i<params.length; i++)
|
||||
{
|
||||
if(lvIntentPairs.getVisibility() != View.VISIBLE)
|
||||
lvIntentPairs.setVisibility(View.VISIBLE);
|
||||
@ -680,6 +650,10 @@ public class ActivityManageActionStartActivity extends Activity
|
||||
|
||||
updateIntentPairList();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Toast.makeText(ActivityManageActionStartActivity.this, getResources().getString(R.string.errorLoadingValues), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateIntentPairList()
|
||||
|
@ -622,7 +622,7 @@ public class ActivityManageRule extends Activity
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.megaphone));
|
||||
else if(types[i].toString().equals(Trigger_Enum.phoneCall.toString()))
|
||||
{
|
||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, "android.permission.SEND_SMS"))
|
||||
if(ActivityPermissions.isPermissionDeclaredInManifest(ActivityManageRule.this, Manifest.permission.SEND_SMS))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.phone));
|
||||
}
|
||||
else if(types[i].toString().equals(Trigger_Enum.nfcTag.toString()))
|
||||
@ -654,7 +654,10 @@ public class ActivityManageRule extends Activity
|
||||
else if(types[i].toString().equals(Trigger_Enum.checkVariable.toString()))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.variable));
|
||||
else if(types[i].toString().equals(Trigger_Enum.calendarEvent.toString()))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.calendar));
|
||||
{
|
||||
if(ActivityPermissions.isPermissionDeclaredInManifest(ActivityManageRule.this, Manifest.permission.READ_CALENDAR))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.calendar));
|
||||
}
|
||||
else
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.placeholder));
|
||||
}
|
||||
@ -2235,27 +2238,30 @@ public class ActivityManageRule extends Activity
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.script));
|
||||
else if(types[i].toString().equals(Action_Enum.startPhoneCall.toString()))
|
||||
{
|
||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, Manifest.permission.CALL_PHONE))
|
||||
if(ActivityPermissions.isPermissionDeclaredInManifest(ActivityManageRule.this, Manifest.permission.CALL_PHONE))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.phone));
|
||||
}
|
||||
else if(types[i].toString().equals(Action_Enum.stopPhoneCall.toString()))
|
||||
{
|
||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, Manifest.permission.ANSWER_PHONE_CALLS))
|
||||
if(ActivityPermissions.isPermissionDeclaredInManifest(ActivityManageRule.this, Manifest.permission.ANSWER_PHONE_CALLS))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.phone));
|
||||
}
|
||||
else if(types[i].toString().equals(Action_Enum.sendTextMessage.toString()))
|
||||
{
|
||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, Manifest.permission.SEND_SMS))
|
||||
if(ActivityPermissions.isPermissionDeclaredInManifest(ActivityManageRule.this, Manifest.permission.SEND_SMS))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.message));
|
||||
}
|
||||
else if(types[i].toString().equals(Action_Enum.copyToClipboard.toString()))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.clipboard));
|
||||
else if(types[i].toString().equals(Action_Enum.takeScreenshot.toString()))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.copier));
|
||||
else if(types[i].toString().equals(Action_Enum.setVariable.toString()))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.variable));
|
||||
else if(types[i].toString().equals(Action_Enum.setLocationService.toString()))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.compass_small));
|
||||
else if(types[i].toString().equals(Action_Enum.takeScreenshot.toString()))
|
||||
{
|
||||
if(ActivityPermissions.isServiceAvailable(Miscellaneous.getAnyContext(), "MyAccessibilityService"))
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.copier));
|
||||
}
|
||||
else
|
||||
items.add(new Item(typesLong[i].toString(), R.drawable.placeholder));
|
||||
}
|
||||
@ -2288,28 +2294,28 @@ public class ActivityManageRule extends Activity
|
||||
{
|
||||
newAction = new Action();
|
||||
|
||||
if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.triggerUrl.toString()))
|
||||
CharSequence[] actionTypes = Action.getActionTypesAsArray();
|
||||
if(actionTypes[which].toString().equals(Action_Enum.triggerUrl.toString()))
|
||||
{
|
||||
//launch other activity to enter a url and parameters;
|
||||
newAction.setAction(Action_Enum.triggerUrl);
|
||||
// ActivityManageActionTriggerUrl.resultingAction = null;
|
||||
Intent editTriggerIntent = new Intent(context, ActivityManageActionTriggerUrl.class);
|
||||
startActivityForResult(editTriggerIntent, requestCodeActionTriggerUrlAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setWifi.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.setWifi.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setWifi);
|
||||
Intent editSetWifiIntent = new Intent(context, ActivityManageActionWifi.class);
|
||||
startActivityForResult(editSetWifiIntent, requestCodeActionSetWifiAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setBluetooth.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.setBluetooth.toString()))
|
||||
{
|
||||
if(!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH))
|
||||
Miscellaneous.messageBox("Bluetooth", getResources().getString(R.string.deviceDoesNotHaveBluetooth), ActivityManageRule.this).show();;
|
||||
newAction.setAction(Action_Enum.setBluetooth);
|
||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setUsbTethering.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.setUsbTethering.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setUsbTethering);
|
||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||
@ -2317,12 +2323,12 @@ public class ActivityManageRule extends Activity
|
||||
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.GINGERBREAD_MR1)
|
||||
Miscellaneous.messageBox(context.getResources().getString(R.string.warning), context.getResources().getString(R.string.usbTetheringFailForAboveGingerbread), context).show();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setWifiTethering.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.setWifiTethering.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setWifiTethering);
|
||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setBluetoothTethering.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.setBluetoothTethering.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setBluetoothTethering);
|
||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||
@ -2333,12 +2339,12 @@ public class ActivityManageRule extends Activity
|
||||
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.O)
|
||||
Miscellaneous.messageBox(context.getResources().getString(R.string.notice), context.getResources().getString(R.string.btTetheringNotice), context).show();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setDisplayRotation.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.setDisplayRotation.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setDisplayRotation);
|
||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.changeSoundProfile.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.changeSoundProfile.toString()))
|
||||
{
|
||||
if(Profile.getProfileCollection().size() > 0)
|
||||
{
|
||||
@ -2348,23 +2354,23 @@ public class ActivityManageRule extends Activity
|
||||
else
|
||||
Toast.makeText(context, getResources().getString(R.string.noProfilesCreateOneFirst), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.startOtherActivity.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.startOtherActivity.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.startOtherActivity);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionStartActivity.class);
|
||||
startActivityForResult(intent, requestCodeActionStartActivityAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.waitBeforeNextAction.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.waitBeforeNextAction.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.waitBeforeNextAction);
|
||||
getActionWaitBeforeNextActionDialog(ActivityManageRule.this).show();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.turnScreenOnOrOff.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.turnScreenOnOrOff.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.turnScreenOnOrOff);
|
||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setAirplaneMode.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.setAirplaneMode.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setAirplaneMode);
|
||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||
@ -2373,13 +2379,13 @@ public class ActivityManageRule extends Activity
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.airplaneMode), getResources().getString(R.string.rootExplanation), ActivityManageRule.this).show();
|
||||
}
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setDataConnection.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.setDataConnection.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setDataConnection);
|
||||
getActionParameter1Dialog(ActivityManageRule.this).show();
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.actionDataConnection), getResources().getString(R.string.rootExplanation), ActivityManageRule.this).show();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.speakText.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.speakText.toString()))
|
||||
{
|
||||
//launch other activity to enter a url and parameters;
|
||||
newAction.setAction(Action_Enum.speakText);
|
||||
@ -2387,9 +2393,9 @@ public class ActivityManageRule extends Activity
|
||||
Intent editTriggerIntent = new Intent(context, ActivityManageActionSpeakText.class);
|
||||
startActivityForResult(editTriggerIntent, requestCodeActionSpeakTextAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.sendTextMessage.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.sendTextMessage.toString()))
|
||||
{
|
||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, Manifest.permission.SEND_SMS))
|
||||
if(ActivityPermissions.isPermissionDeclaredInManifest(ActivityManageRule.this, Manifest.permission.SEND_SMS))
|
||||
{
|
||||
//launch other activity to enter parameters;
|
||||
newAction.setAction(Action_Enum.sendTextMessage);
|
||||
@ -2398,97 +2404,97 @@ public class ActivityManageRule extends Activity
|
||||
startActivityForResult(editTriggerIntent, requestCodeActionSendTextMessageAdd);
|
||||
}
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.playMusic.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.playMusic.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.playMusic);
|
||||
ruleToEdit.getActionSet().add(newAction);
|
||||
refreshActionList();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.vibrate.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.vibrate.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.vibrate);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionVibrate.class);
|
||||
startActivityForResult(intent, requestCodeActionVibrateAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.sendBroadcast.toString()))
|
||||
else if(actionTypes[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.runExecutable.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.runExecutable.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.runExecutable);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionRunExecutable.class);
|
||||
startActivityForResult(intent, requestCodeActionRunExecutableAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.startPhoneCall.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.startPhoneCall.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.startPhoneCall);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionMakePhoneCall.class);
|
||||
startActivityForResult(intent, requestCodeActionMakePhoneCallAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setVariable.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.setVariable.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setVariable);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionSetVariable.class);
|
||||
startActivityForResult(intent, requestCodeActionSetVariableAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.stopPhoneCall.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.stopPhoneCall.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.stopPhoneCall);
|
||||
ruleToEdit.getActionSet().add(newAction);
|
||||
refreshActionList();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.wakelock.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.wakelock.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.wakelock);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionWakeLock.class);
|
||||
startActivityForResult(intent, requestCodeActionWakeLockAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.controlMediaPlayback.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.controlMediaPlayback.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.controlMediaPlayback);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionControlMedia.class);
|
||||
startActivityForResult(intent, requestCodeActionControlMediaAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.createNotification.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.createNotification.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.createNotification);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionCreateNotification.class);
|
||||
startActivityForResult(intent, requestCodeActionCreateNotificationAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.closeNotification.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.closeNotification.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.closeNotification);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionCloseNotification.class);
|
||||
startActivityForResult(intent, requestCodeActionCloseNotificationAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setScreenBrightness.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.setScreenBrightness.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setScreenBrightness);
|
||||
Intent actionScreenBrightnessIntent = new Intent(context, ActivityManageActionBrightnessSetting.class);
|
||||
startActivityForResult(actionScreenBrightnessIntent, requestCodeActionScreenBrightnessAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.playSound.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.playSound.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.playSound);
|
||||
Intent actionPlaySoundIntent = new Intent(context, ActivityManageActionPlaySound.class);
|
||||
startActivityForResult(actionPlaySoundIntent, requestCodeActionPlaySoundAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.copyToClipboard.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.copyToClipboard.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.copyToClipboard);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionCopyToClipboard.class);
|
||||
startActivityForResult(intent, requestCodeActionCopyTextToClipboardAdd);
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.takeScreenshot.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.takeScreenshot.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.takeScreenshot);
|
||||
ruleToEdit.getActionSet().add(newAction);
|
||||
refreshActionList();
|
||||
}
|
||||
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.setLocationService.toString()))
|
||||
else if(actionTypes[which].toString().equals(Action_Enum.setLocationService.toString()))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setLocationService);
|
||||
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionLocationService.class);
|
||||
|
@ -41,7 +41,7 @@ public class ActivityManageTriggerTimeFrame extends Activity
|
||||
startPicker = (TimePicker)findViewById(R.id.tpTimeFrameStart);
|
||||
stopPicker = (TimePicker)findViewById(R.id.tpTimeFrameStop);
|
||||
startPicker.setIs24HourView(true);
|
||||
stopPicker.setIs24HourView(true);
|
||||
stopPicker.setIs24HourView(true);
|
||||
|
||||
bSaveTimeFrame = (Button)findViewById(R.id.bSaveTimeFrame);
|
||||
checkMonday = (CheckBox)findViewById(R.id.checkMonday);
|
||||
|
@ -15,7 +15,6 @@ import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
@ -74,7 +73,7 @@ public class ActivityManageTriggerWifi extends Activity
|
||||
if(
|
||||
Miscellaneous.getTargetSDK(Miscellaneous.getAnyContext()) >= 29
|
||||
&&
|
||||
!ActivityPermissions.isPermissionDeclaratedInManifest(Miscellaneous.getAnyContext(), Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
!ActivityPermissions.isPermissionDeclaredInManifest(Miscellaneous.getAnyContext(), Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
)
|
||||
tvWifiTriggerNameLocationNotice.setVisibility(View.VISIBLE);
|
||||
|
||||
|
@ -11,6 +11,8 @@ import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PermissionInfo;
|
||||
import android.content.pm.ServiceInfo;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
@ -27,8 +29,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.jens.automation2.receivers.NotificationListener;
|
||||
|
||||
import org.w3c.dom.DOMImplementationSource;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
@ -579,7 +579,7 @@ public class ActivityPermissions extends Activity
|
||||
(
|
||||
Miscellaneous.getTargetSDK(Miscellaneous.getAnyContext()) >= 29
|
||||
&&
|
||||
isPermissionDeclaratedInManifest(Miscellaneous.getAnyContext(), Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
isPermissionDeclaredInManifest(Miscellaneous.getAnyContext(), Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
||||
)
|
||||
||
|
||||
Build.VERSION.SDK_INT >= 33
|
||||
@ -611,12 +611,6 @@ public class ActivityPermissions extends Activity
|
||||
if(targetProfile.changeIncomingCallsRingtone || targetProfile.changeNotificationRingtone)
|
||||
addToArrayListUnique(Manifest.permission.READ_EXTERNAL_STORAGE, requiredPermissions);
|
||||
break;
|
||||
case disableScreenRotation:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
break;
|
||||
case enableScreenRotation:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
break;
|
||||
case playMusic:
|
||||
break;
|
||||
case controlMediaPlayback:
|
||||
@ -719,40 +713,12 @@ public class ActivityPermissions extends Activity
|
||||
addToArrayListUnique(Manifest.permission.INTERNET, requiredPermissions);
|
||||
getPermissionsForVariablesInUse(action.getParameter2(), requiredPermissions);
|
||||
break;
|
||||
case turnBluetoothOff:
|
||||
addToArrayListUnique(Manifest.permission.BLUETOOTH_ADMIN, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.BLUETOOTH, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case turnBluetoothOn:
|
||||
addToArrayListUnique(Manifest.permission.BLUETOOTH_ADMIN, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.BLUETOOTH, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case turnUsbTetheringOff:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
break;
|
||||
case turnUsbTetheringOn:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
break;
|
||||
case turnWifiOff:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case turnWifiOn:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case turnWifiTetheringOff:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case turnWifiTetheringOn:
|
||||
addToArrayListUnique(Manifest.permission.WRITE_SETTINGS, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
break;
|
||||
case waitBeforeNextAction:
|
||||
break;
|
||||
case playSound:
|
||||
@ -898,18 +864,6 @@ public class ActivityPermissions extends Activity
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.setWifiTethering))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnBluetoothOff))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnBluetoothOn))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnWifiOff))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnWifiOn))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnWifiTetheringOff))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnWifiTetheringOn))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
break;
|
||||
case Manifest.permission.ACCESS_WIFI_STATE:
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.pointOfInterest))
|
||||
@ -922,20 +876,12 @@ public class ActivityPermissions extends Activity
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.setBluetooth))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnBluetoothOff))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnBluetoothOn))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
break;
|
||||
case Manifest.permission.BLUETOOTH:
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.bluetoothConnection))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.setBluetooth))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnBluetoothOff))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
for(String ruleName : getRulesUsing(Action.Action_Enum.turnBluetoothOn))
|
||||
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
|
||||
break;
|
||||
case Manifest.permission.GET_TASKS:
|
||||
for(String ruleName : getRulesUsing(Trigger.Trigger_Enum.process_started_stopped))
|
||||
@ -1129,14 +1075,14 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
if(permissionNames.equals(Manifest.permission.PROCESS_OUTGOING_CALLS))
|
||||
{
|
||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(Miscellaneous.getAnyContext(), Manifest.permission.PROCESS_OUTGOING_CALLS) && !Miscellaneous.isGooglePlayInstalled(Miscellaneous.getAnyContext()))
|
||||
if(ActivityPermissions.isPermissionDeclaredInManifest(Miscellaneous.getAnyContext(), Manifest.permission.PROCESS_OUTGOING_CALLS) && !Miscellaneous.isGooglePlayInstalled(Miscellaneous.getAnyContext()))
|
||||
{
|
||||
permissionList.add(permission);
|
||||
}
|
||||
}
|
||||
else if(permissionNames.equals(Manifest.permission.SEND_SMS))
|
||||
{
|
||||
if(ActivityPermissions.isPermissionDeclaratedInManifest(Miscellaneous.getAnyContext(), Manifest.permission.SEND_SMS) && !Miscellaneous.isGooglePlayInstalled(Miscellaneous.getAnyContext()))
|
||||
if(ActivityPermissions.isPermissionDeclaredInManifest(Miscellaneous.getAnyContext(), Manifest.permission.SEND_SMS) && !Miscellaneous.isGooglePlayInstalled(Miscellaneous.getAnyContext()))
|
||||
{
|
||||
permissionList.add(permission);
|
||||
}
|
||||
@ -1305,7 +1251,7 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
if(requiredPermissions.contains(Manifest.permission.PROCESS_OUTGOING_CALLS))
|
||||
{
|
||||
if(!ActivityPermissions.isPermissionDeclaratedInManifest(Miscellaneous.getAnyContext(), Manifest.permission.SEND_SMS)
|
||||
if(!ActivityPermissions.isPermissionDeclaredInManifest(Miscellaneous.getAnyContext(), Manifest.permission.SEND_SMS)
|
||||
&&
|
||||
Miscellaneous.isGooglePlayInstalled(Miscellaneous.getAnyContext())
|
||||
)
|
||||
@ -1316,7 +1262,7 @@ public class ActivityPermissions extends Activity
|
||||
}
|
||||
if(requiredPermissions.contains(Manifest.permission.SEND_SMS))
|
||||
{
|
||||
if(!ActivityPermissions.isPermissionDeclaratedInManifest(Miscellaneous.getAnyContext(), Manifest.permission.SEND_SMS)
|
||||
if(!ActivityPermissions.isPermissionDeclaredInManifest(Miscellaneous.getAnyContext(), Manifest.permission.SEND_SMS)
|
||||
)
|
||||
{
|
||||
requiredPermissions.remove(Manifest.permission.SEND_SMS);
|
||||
@ -1686,12 +1632,53 @@ public class ActivityPermissions extends Activity
|
||||
mapActionPermissions.put("wakeupDevice", Manifest.permission.WAKE_LOCK);
|
||||
}
|
||||
|
||||
public static boolean isPermissionDeclaratedInManifest(Context context, String permission)
|
||||
public static boolean isServiceAvailable(Context context, String serviceName)
|
||||
{
|
||||
/*int flags = PackageManager.GET_ACTIVITIES
|
||||
| PackageManager.GET_CONFIGURATIONS
|
||||
| PackageManager.GET_DISABLED_COMPONENTS
|
||||
| PackageManager.GET_GIDS | PackageManager.GET_INSTRUMENTATION
|
||||
| PackageManager.GET_INTENT_FILTERS
|
||||
| PackageManager.GET_PERMISSIONS | PackageManager.GET_PROVIDERS
|
||||
| PackageManager.GET_RECEIVERS | PackageManager.GET_SERVICES
|
||||
| PackageManager.GET_SIGNATURES;
|
||||
PackageManager packageManager = getPackageManager();
|
||||
List<PackageInfo> installedPackages = packageManager.getInstalledPackages(flags);
|
||||
for (PackageInfo packageInfo : installedPackages)
|
||||
{
|
||||
ServiceInfo[] services = packageInfo.services;
|
||||
PermissionInfo[] permissions = packageInfo.permissions;
|
||||
}*/
|
||||
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
try
|
||||
{
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
PackageInfo packageInfo = packageManager.getPackageInfo("com.jens.automation2", PackageManager.GET_SERVICES);
|
||||
ServiceInfo[] services = packageInfo.services;
|
||||
for (ServiceInfo serviceInfo : services)
|
||||
{
|
||||
if(serviceInfo.name.endsWith(serviceName))
|
||||
return true;
|
||||
}
|
||||
PermissionInfo[] permissions = packageInfo.permissions;
|
||||
}
|
||||
catch (PackageManager.NameNotFoundException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isPermissionDeclaredInManifest(Context context, String permission)
|
||||
{
|
||||
PackageManager pm = context.getPackageManager();
|
||||
try
|
||||
{
|
||||
PackageInfo packageInfo = pm.getPackageInfo(context.getPackageName(), PackageManager.GET_PERMISSIONS);
|
||||
|
||||
String[] requestedPermissions = null;
|
||||
if (packageInfo != null)
|
||||
{
|
||||
|
@ -320,8 +320,10 @@ public class AutomationService extends Service implements OnInitListener
|
||||
|
||||
ReceiverCoordinator.applySettingsAndRules();
|
||||
|
||||
DateTimeListener.reloadAlarms();
|
||||
CalendarReceiver.armOrRearmTimer();
|
||||
DateTimeListener.setOrResetAlarms();
|
||||
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.calendarEvent) && ActivityPermissions.isPermissionDeclaredInManifest(AutomationService.getInstance(), Manifest.permission.READ_CALENDAR) && ActivityPermissions.havePermission(Manifest.permission.READ_CALENDAR, AutomationService.getInstance()))
|
||||
CalendarReceiver.armOrRearmTimer();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -390,6 +392,20 @@ public class AutomationService extends Service implements OnInitListener
|
||||
r.activate(AutomationService.this, false);
|
||||
}
|
||||
|
||||
if(!Settings.hasBeenDone(Settings.constVersion143StartOtherProgramConfigEditHint))
|
||||
{
|
||||
if(Rule.isAnyRuleUsing(Action.Action_Enum.startOtherActivity))
|
||||
{
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
|
||||
Miscellaneous.createDismissibleNotificationWithDelay(1010, null, getResources().getString(R.string.version143StartOtherActivityHint), 9123, AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE, null);
|
||||
else
|
||||
Miscellaneous.createDismissibleNotification(null, getResources().getString(R.string.version143StartOtherActivityHint), 9123, false, AutomationService.NOTIFICATION_CHANNEL_ID_SERVICE, null);
|
||||
}
|
||||
|
||||
Settings.considerDone(Settings.constVersion143StartOtherProgramConfigEditHint);
|
||||
Settings.writeSettings(Miscellaneous.getAnyContext());
|
||||
}
|
||||
|
||||
Settings.serviceStartDone = true;
|
||||
Settings.deviceStartDone = true;
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
@ -585,7 +586,45 @@ public class Miscellaneous extends Service
|
||||
|
||||
Miscellaneous.logEvent("i", "TimeCompare", "Default return code. Shouldn't be here.", 5);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
public static int compareTimes(Calendar calOne, Calendar calTwo)
|
||||
{
|
||||
if(calOne.get(Calendar.HOUR_OF_DAY) == calTwo.get(Calendar.HOUR_OF_DAY) && calOne.get(Calendar.MINUTE) == calTwo.get((Calendar.MINUTE)))
|
||||
{
|
||||
// Miscellaneous.logEvent("i", "TimeCompare", "Times are equal.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(calOne.get(Calendar.HOUR_OF_DAY) > calTwo.get(Calendar.HOUR_OF_DAY))
|
||||
{
|
||||
// Miscellaneous.logEvent("i", "TimeCompare", "Time1 is bigger/later by hours.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(calOne.get(Calendar.HOUR_OF_DAY) < calTwo.get(Calendar.HOUR_OF_DAY))
|
||||
{
|
||||
// Miscellaneous.logEvent("i", "TimeCompare", "Time2 is bigger/later by hours.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(calOne.get(Calendar.HOUR_OF_DAY) == calTwo.get(Calendar.HOUR_OF_DAY))
|
||||
{
|
||||
if(calOne.get(Calendar.MINUTE) < calTwo.get(Calendar.MINUTE))
|
||||
{
|
||||
// Miscellaneous.logEvent("i", "TimeCompare", "Hours are equal. Time2 is bigger/later by minutes.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(calOne.get(Calendar.MINUTE) > calTwo.get(Calendar.MINUTE))
|
||||
{
|
||||
// Miscellaneous.logEvent("i", "TimeCompare", "Hours are equal. Time1 is bigger/later by minutes.");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Miscellaneous.logEvent("i", "TimeCompare", "Default return code. Shouldn't be here.", 5);
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static String convertStreamToString(InputStream is)
|
||||
@ -679,7 +718,9 @@ public class Miscellaneous extends Service
|
||||
source.contains("[H]") ||
|
||||
source.contains("[i]") ||
|
||||
source.contains("[s]") ||
|
||||
source.contains("[ms]")
|
||||
source.contains("[ms]") ||
|
||||
source.contains("[w]") ||
|
||||
source.contains("[F]")
|
||||
)
|
||||
{
|
||||
Calendar cal = Calendar.getInstance();
|
||||
@ -747,6 +788,24 @@ public class Miscellaneous extends Service
|
||||
{
|
||||
source = source.replace("[ms]", String.valueOf(cal.get(Calendar.MILLISECOND)));
|
||||
}
|
||||
|
||||
if(source.contains("[w]"))
|
||||
{
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("EEEE");
|
||||
Date d = new Date();
|
||||
String dayOfTheWeek = sdf.format(d);
|
||||
// source = source.replace("[w]", LocalDate.now().getDayOfWeek().name());
|
||||
source = source.replace("[w]", dayOfTheWeek);
|
||||
}
|
||||
|
||||
if(source.contains("[F]"))
|
||||
{
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MMMM");
|
||||
Date d = new Date();
|
||||
String month = sdf.format(d);
|
||||
// source = source.replace("[F]", LocalDate.now().getMonth().name());
|
||||
source = source.replace("[F]", month);
|
||||
}
|
||||
}
|
||||
|
||||
if(source.contains("[notificationTitle]"))
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.jens.automation2;
|
||||
|
||||
import android.Manifest;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
@ -212,7 +213,7 @@ public class ReceiverCoordinator
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.screenState))
|
||||
ScreenStateReceiver.startScreenStateReceiver(AutomationService.getInstance());
|
||||
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.calendarEvent))
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.calendarEvent) && ActivityPermissions.isPermissionDeclaredInManifest(AutomationService.getInstance(), Manifest.permission.READ_CALENDAR) && ActivityPermissions.havePermission(Manifest.permission.READ_CALENDAR, AutomationService.getInstance()))
|
||||
CalendarReceiver.startCalendarReceiver(AutomationService.getInstance());
|
||||
}
|
||||
|
||||
@ -469,7 +470,7 @@ public class ReceiverCoordinator
|
||||
}
|
||||
}
|
||||
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.calendarEvent))
|
||||
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.calendarEvent) && ActivityPermissions.isPermissionDeclaredInManifest(AutomationService.getInstance(), Manifest.permission.READ_CALENDAR) && ActivityPermissions.havePermission(Manifest.permission.READ_CALENDAR, AutomationService.getInstance()))
|
||||
{
|
||||
if(!CalendarReceiver.getInstance().isListenerRunning())
|
||||
CalendarReceiver.getInstance().startListener(AutomationService.getInstance());
|
||||
|
@ -19,8 +19,9 @@ public class Settings implements SharedPreferences
|
||||
public static final String folderName = "Automation";
|
||||
public static final String zipFileName = "automation.zip";
|
||||
|
||||
public static final String constNewsOptInDone ="newsOptInDone";
|
||||
public static final String constNotificationChannelCleanupApk118 ="notificationChannelCleanupApk118";
|
||||
public static final String constNewsOptInDone = "newsOptInDone";
|
||||
public static final String constNotificationChannelCleanupApk118 = "notificationChannelCleanupApk118";
|
||||
public static final String constVersion143StartOtherProgramConfigEditHint = "constVersion143StartOtherProgramConfigEditHint";
|
||||
|
||||
public static long minimumDistanceChangeForGpsUpdate;
|
||||
public static long minimumDistanceChangeForNetworkUpdate;
|
||||
|
@ -2,6 +2,7 @@ package com.jens.automation2;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
public class TimeFrame
|
||||
{
|
||||
@ -20,18 +21,19 @@ public class TimeFrame
|
||||
public void setDayList(ArrayList<Integer> dayList)
|
||||
{
|
||||
this.dayList = dayList;
|
||||
Collections.sort(dayList);
|
||||
}
|
||||
public void setDayListFromString(String dayListString)
|
||||
{
|
||||
// Log.i("Parsing", "Full string: " + dayListString);
|
||||
char[] dayListCharArray = dayListString.toCharArray();
|
||||
|
||||
dayList = new ArrayList<Integer>();
|
||||
for(char item : dayListCharArray)
|
||||
{
|
||||
// Log.i("Parsing", String.valueOf(item));
|
||||
dayList.add(Integer.parseInt(String.valueOf(item)));
|
||||
}
|
||||
|
||||
Collections.sort(dayList);
|
||||
}
|
||||
|
||||
public TimeObject getTriggerTimeStart()
|
||||
|
@ -17,6 +17,7 @@ import com.jens.automation2.receivers.BluetoothReceiver;
|
||||
import com.jens.automation2.receivers.BroadcastListener;
|
||||
import com.jens.automation2.receivers.CalendarReceiver;
|
||||
import com.jens.automation2.receivers.ConnectivityReceiver;
|
||||
import com.jens.automation2.receivers.DateTimeListener;
|
||||
import com.jens.automation2.receivers.DeviceOrientationListener;
|
||||
import com.jens.automation2.receivers.HeadphoneJackListener;
|
||||
import com.jens.automation2.receivers.MediaPlayerListener;
|
||||
@ -135,6 +136,35 @@ public class Trigger
|
||||
}
|
||||
};
|
||||
|
||||
boolean triggerParameter; //if true->started event, if false->stopped
|
||||
String triggerParameter2;
|
||||
|
||||
public static final String triggerParameter2Split = "tp2split";
|
||||
|
||||
Trigger_Enum triggerType = null;
|
||||
PointOfInterest pointOfInterest = null;
|
||||
TimeFrame timeFrame;
|
||||
|
||||
public static String triggerPhoneCallStateRinging = "ringing";
|
||||
public static String triggerPhoneCallStateStarted = "started";
|
||||
public static String triggerPhoneCallStateStopped = "stopped";
|
||||
public static String triggerPhoneCallDirectionIncoming = "incoming";
|
||||
public static String triggerPhoneCallDirectionOutgoing = "outgoing";
|
||||
public static String triggerPhoneCallDirectionAny = "any";
|
||||
public static String triggerPhoneCallNumberAny = "any";
|
||||
|
||||
double speed; //km/h
|
||||
long noiseLevelDb;
|
||||
String processName = null;
|
||||
int batteryLevel;
|
||||
int phoneDirection = 0; // 0=any, 1=incoming, 2=outgoing
|
||||
String phoneNumber = null;
|
||||
String nfcTagId = null;
|
||||
String bluetoothEvent = null;
|
||||
String bluetoothDeviceAddress = null;
|
||||
int activityDetectionType = -1;
|
||||
int headphoneType = -1;
|
||||
|
||||
public static enum subSystemStates { wifi, bluetooth };
|
||||
|
||||
Rule parentRule = null;
|
||||
@ -1124,8 +1154,6 @@ public class Trigger
|
||||
// We are not at any POI. But if this trigger requires us NOT to be there, that may be fine.
|
||||
if(this.getPointOfInterest() != null)
|
||||
{
|
||||
// if(activePoi.equals(oneTrigger.getPointOfInterest()))
|
||||
// {
|
||||
if(!this.getTriggerParameter())
|
||||
{
|
||||
Miscellaneous.logEvent("i", String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.ruleCheckOf), this.getParentRule().getName()), "We are not at POI \"" + this.getPointOfInterest().getName() + "\". But since that's required by this rule that's fine.", 4);
|
||||
@ -1135,7 +1163,6 @@ public class Trigger
|
||||
Miscellaneous.logEvent("i", String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.ruleCheckOf), this.getParentRule().getName()), String.format("Rule \"%1$s\" doesn't apply. We're not at POI \"" + this.getPointOfInterest().getName() + "\".", getParentRule().getName()), 3);
|
||||
return false;
|
||||
}
|
||||
// }
|
||||
}
|
||||
else if(this.getPointOfInterest() == null)
|
||||
{
|
||||
@ -1224,7 +1251,7 @@ public class Trigger
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean checkDateTime(Object triggeringObject, boolean checkifStateChangedSinceLastRuleExecution)
|
||||
public boolean checkDateTime(Object triggeringObject, boolean checkIfStateChangedSinceLastRuleExecution)
|
||||
{
|
||||
/*
|
||||
* Use format known from Automation
|
||||
@ -1246,142 +1273,52 @@ public class Trigger
|
||||
{
|
||||
TimeFrame tf = new TimeFrame(getTriggerParameter2());
|
||||
|
||||
if(tf.getDayList().contains(calNow.get(Calendar.DAY_OF_WEEK)))
|
||||
if (DateTimeListener.areWeInTimeFrame(this, triggeringObject) != this.getTriggerParameter())
|
||||
{
|
||||
if(
|
||||
// Regular case, start time is lower than end time
|
||||
(
|
||||
Miscellaneous.compareTimes(tf.getTriggerTimeStart(), nowTime) >= 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
|
||||
)
|
||||
)
|
||||
if (triggerParameter)
|
||||
Miscellaneous.logEvent("i", "Trigger", "TimeFrame: We're currently (" + calNow.getTime().toString() + ", Day: " + String.valueOf(calNow.get(Calendar.DAY_OF_WEEK)) + ") outside of the specified TimeFrame (" + tf.toString() + "), but demanded is inside.", 5);
|
||||
else
|
||||
Miscellaneous.logEvent("i", "Trigger", "TimeFrame: We're currently (" + calNow.getTime().toString() + ") in the specified TimeFrame (" + tf.toString() + "), but demanded is outside.", 4);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// We are inside or outside of the timeframe as demanded by the trigger
|
||||
|
||||
if (tf.getRepetition() > 0)
|
||||
{
|
||||
if (!isSupposedToRepeatSinceLastExecution(Calendar.getInstance()))
|
||||
{
|
||||
// We are in the timeframe
|
||||
Miscellaneous.logEvent("i", "Trigger", "TimeFrame: We're currently (" + calNow.getTime().toString() + ") in the specified TimeFrame (" + tf.toString() + ").", 4);
|
||||
if(getTriggerParameter())
|
||||
{
|
||||
if(checkifStateChangedSinceLastRuleExecution)
|
||||
{
|
||||
/*
|
||||
* Was there a target repetition time between last execution and now?
|
||||
* If not -> return false.
|
||||
*/
|
||||
Calendar compareCal = Calendar.getInstance();
|
||||
compareCal.setTimeInMillis(triggeringTime.getTime());
|
||||
if(tf.getRepetition() > 0)
|
||||
{
|
||||
if(!isSupposedToRepeatSinceLastExecution(compareCal))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "TimeFrame", "TimeFrame: Trigger of rule " + this.getParentRule().getName() + " applies, but repeated execution is not due, yet.", 4);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* This is not a repeating rule. Have we left
|
||||
* the relevant timeframe since the last run?
|
||||
* Determine if it has ran today already. If yes
|
||||
* return false because every rule that is not
|
||||
* repeating can only be executed once per day.
|
||||
*/
|
||||
|
||||
if(
|
||||
getParentRule().getLastExecution().get(Calendar.YEAR) == calNow.get(Calendar.YEAR)
|
||||
&&
|
||||
getParentRule().getLastExecution().get(Calendar.MONTH) == calNow.get(Calendar.MONTH)
|
||||
&&
|
||||
getParentRule().getLastExecution().get(Calendar.DAY_OF_MONTH) == calNow.get(Calendar.DAY_OF_MONTH)
|
||||
)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "TimeFrame", "TimeFrame: Trigger of rule " + this.getParentRule().getName() + " applies, but it was already executed today.", 4);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Miscellaneous.logEvent("i", "Trigger", "TimeFrame: That's what's specified. Trigger of rule " + this.getParentRule().getName() + " applies.", 4);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Trigger", "TimeFrame: That's not what's specified. Trigger of rule " + this.getParentRule().getName() + " doesn't apply.", 4);
|
||||
return false;
|
||||
}
|
||||
Miscellaneous.logEvent("i", "TimeFrame", "TimeFrame: Trigger of rule " + this.getParentRule().getName() + " applies, but repetition is not due, yet.", 4);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Trigger", "TimeFrame: We're currently (" + calNow.getTime().toString() + ", Day: " + String.valueOf(calNow.get(Calendar.DAY_OF_WEEK)) + ") not in the specified TimeFrame (" + tf.toString() + ") because of the time.", 5);
|
||||
if(!getTriggerParameter())
|
||||
{
|
||||
if(checkifStateChangedSinceLastRuleExecution)
|
||||
{
|
||||
/*
|
||||
* Was there a target repetition time between last execution and now?
|
||||
* If not -> return false.
|
||||
*/
|
||||
Calendar compareCal = Calendar.getInstance();
|
||||
compareCal.setTimeInMillis(triggeringTime.getTime());
|
||||
if(tf.getRepetition() > 0)
|
||||
{
|
||||
if(!isSupposedToRepeatSinceLastExecution(compareCal))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Trigger", "TimeFrame: Trigger of rule " + this.getParentRule().getName() + " applies, but repeated execution is not due, yet.", 4);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* This is not a repeating rule. Have we left
|
||||
* the relevant timeframe since the last run?
|
||||
* Determine if it has ran today already. If yes
|
||||
* return false because every rule that is not
|
||||
* repeating can only be executed once per day.
|
||||
*/
|
||||
|
||||
if(
|
||||
getParentRule().getLastExecution().get(Calendar.YEAR) == calNow.get(Calendar.YEAR)
|
||||
&&
|
||||
getParentRule().getLastExecution().get(Calendar.MONTH) == calNow.get(Calendar.MONTH)
|
||||
&&
|
||||
getParentRule().getLastExecution().get(Calendar.DAY_OF_MONTH) == calNow.get(Calendar.DAY_OF_MONTH)
|
||||
)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Trigger", "TimeFrame: Trigger of rule " + this.getParentRule().getName() + " applies, but it was already executed today.", 4);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Miscellaneous.logEvent("i", "Trigger", "TimeFrame: That's what's specified. Trigger of rule " + this.getParentRule().getName() + " applies.", 5);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Trigger", "TimeFrame: That's not what's specified. Trigger of rule " + this.getParentRule().getName() + " doesn't apply.", 5);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Miscellaneous.logEvent("i", "TimeFrame", "TimeFrame: Trigger of rule " + this.getParentRule().getName() + " would apply because repetition is due.", 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Trigger", "TimeFrame: We're currently (" + calNow.getTime().toString() + ", Day: " + String.valueOf(calNow.get(Calendar.DAY_OF_WEEK)) + ") not in the specified TimeFrame (" + tf.toString() + ") because of the day.", 5);
|
||||
return false;
|
||||
if (checkIfStateChangedSinceLastRuleExecution)
|
||||
{
|
||||
/*
|
||||
* This is not a repeating rule. Have we left
|
||||
* the relevant timeframe since the last run?
|
||||
* Determine if it has ran today already. If yes
|
||||
* return false because every rule that is not
|
||||
* repeating can only be executed once per day.
|
||||
*/
|
||||
|
||||
if (
|
||||
getParentRule().getLastExecution().get(Calendar.YEAR) == calNow.get(Calendar.YEAR)
|
||||
&&
|
||||
getParentRule().getLastExecution().get(Calendar.MONTH) == calNow.get(Calendar.MONTH)
|
||||
&&
|
||||
getParentRule().getLastExecution().get(Calendar.DAY_OF_MONTH) == calNow.get(Calendar.DAY_OF_MONTH)
|
||||
)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "TimeFrame", "TimeFrame: Trigger of rule " + this.getParentRule().getName() + " applies, but it was already executed today.", 4);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
@ -1389,43 +1326,8 @@ public class Trigger
|
||||
Miscellaneous.logEvent("e", "Trigger", "There was an error while checking if the time based trigger applies: " + Log.getStackTraceString(e), 1);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static Calendar getNextRepeatedExecutionAfter(Trigger trigger, Calendar now)
|
||||
{
|
||||
Calendar calSet;
|
||||
TimeObject setTime;
|
||||
TimeFrame tf = new TimeFrame(trigger.getTriggerParameter2());
|
||||
|
||||
if(tf.getRepetition() > 0)
|
||||
{
|
||||
if(trigger.getTriggerParameter())
|
||||
setTime = tf.getTriggerTimeStart();
|
||||
else
|
||||
setTime = tf.getTriggerTimeStop();
|
||||
|
||||
calSet = (Calendar) now.clone();
|
||||
calSet.set(Calendar.HOUR_OF_DAY, setTime.getHours());
|
||||
calSet.set(Calendar.MINUTE, setTime.getMinutes());
|
||||
calSet.set(Calendar.SECOND, 0);
|
||||
calSet.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
// If the starting time is a day ahead remove 1 day.
|
||||
if(calSet.getTimeInMillis() > now.getTimeInMillis())
|
||||
calSet.add(Calendar.DAY_OF_MONTH, -1);
|
||||
|
||||
long differenceInSeconds = Math.abs(now.getTimeInMillis() - calSet.getTimeInMillis()) / 1000;
|
||||
long nextExecutionMultiplier = Math.floorDiv(differenceInSeconds, tf.getRepetition()) + 1;
|
||||
long nextScheduleTimestamp = (calSet.getTimeInMillis() / 1000) + (nextExecutionMultiplier * tf.getRepetition());
|
||||
Calendar calSchedule = Calendar.getInstance();
|
||||
calSchedule.setTimeInMillis(nextScheduleTimestamp * 1000);
|
||||
|
||||
return calSchedule;
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "Trigger", "Trigger " + trigger.toString() + " is not executed repeatedly.", 5);
|
||||
|
||||
return null;
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean isSupposedToRepeatSinceLastExecution(Calendar now)
|
||||
@ -1435,7 +1337,7 @@ public class Trigger
|
||||
|
||||
// the simple stuff:
|
||||
|
||||
if(lastExec == null) // rule never run, go any way
|
||||
if(lastExec == null) // rule never ran, go in any case
|
||||
return true;
|
||||
else if(tf.getRepetition() <= 0) // is not set to repeat at all
|
||||
return false;
|
||||
@ -1446,41 +1348,17 @@ public class Trigger
|
||||
* we're inside the specified timeframe.
|
||||
*/
|
||||
|
||||
Calendar timeSupposedToRunNext = getNextRepeatedExecutionAfter(this, lastExec);
|
||||
if(now.getTimeInMillis() > timeSupposedToRunNext.getTimeInMillis())
|
||||
Calendar lastRepetitionNotExecutedYet = DateTimeListener.getNextRepeatedExecution(this);
|
||||
lastRepetitionNotExecutedYet.add(Calendar.SECOND, (int) -(tf.getRepetition()));
|
||||
|
||||
Miscellaneous.logEvent("i", "isSupposedToRepeatSinceLastExecution()", "Last execution: " + Miscellaneous.formatDate(lastExec.getTime()), 5);
|
||||
Miscellaneous.logEvent("i", "isSupposedToRepeatSinceLastExecution()", "lastRepetitionNotExecutedYet: " + Miscellaneous.formatDate(lastRepetitionNotExecutedYet.getTime()), 5);
|
||||
|
||||
if(now.getTimeInMillis() > lastRepetitionNotExecutedYet.getTimeInMillis())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean triggerParameter; //if true->started event, if false->stopped
|
||||
String triggerParameter2;
|
||||
|
||||
public static final String triggerParameter2Split = "tp2split";
|
||||
|
||||
Trigger_Enum triggerType = null;
|
||||
PointOfInterest pointOfInterest = null;
|
||||
TimeFrame timeFrame;
|
||||
|
||||
public static String triggerPhoneCallStateRinging = "ringing";
|
||||
public static String triggerPhoneCallStateStarted = "started";
|
||||
public static String triggerPhoneCallStateStopped = "stopped";
|
||||
public static String triggerPhoneCallDirectionIncoming = "incoming";
|
||||
public static String triggerPhoneCallDirectionOutgoing = "outgoing";
|
||||
public static String triggerPhoneCallDirectionAny = "any";
|
||||
public static String triggerPhoneCallNumberAny = "any";
|
||||
|
||||
double speed; //km/h
|
||||
long noiseLevelDb;
|
||||
String processName = null;
|
||||
int batteryLevel;
|
||||
int phoneDirection = 0; // 0=any, 1=incoming, 2=outgoing
|
||||
String phoneNumber = null;
|
||||
String nfcTagId = null;
|
||||
String bluetoothEvent = null;
|
||||
String bluetoothDeviceAddress = null;
|
||||
int activityDetectionType = -1;
|
||||
int headphoneType = -1;
|
||||
|
||||
public int getHeadphoneType()
|
||||
{
|
||||
@ -1787,7 +1665,7 @@ public class Trigger
|
||||
try
|
||||
{
|
||||
Class testClass = Class.forName(ActivityManageRule.activityDetectionClassPath);
|
||||
if (ActivityPermissions.isPermissionDeclaratedInManifest(Miscellaneous.getAnyContext(), "com.google.android.gms.permission.ACTIVITY_RECOGNITION"))
|
||||
if (ActivityPermissions.isPermissionDeclaredInManifest(Miscellaneous.getAnyContext(), "com.google.android.gms.permission.ACTIVITY_RECOGNITION"))
|
||||
{
|
||||
// This type doesn't have an activate/deactivate equivalent, at least not yet.
|
||||
returnString.append(Miscellaneous.runMethodReflective(ActivityManageRule.activityDetectionClassPath, "getDescription", new Object[]{getActivityDetectionType()}));
|
||||
|
@ -1135,28 +1135,10 @@ public class XmlFileInterface
|
||||
|
||||
// *** deprecated
|
||||
//else
|
||||
if(actionNameString.equals("turnWifiOn"))
|
||||
newAction.setAction(Action_Enum.turnWifiOn);
|
||||
else if(actionNameString.equals("turnWifiOff"))
|
||||
newAction.setAction(Action_Enum.turnWifiOff);
|
||||
else if(actionNameString.equals("turnBluetoothOn"))
|
||||
newAction.setAction(Action_Enum.turnBluetoothOn);
|
||||
else if(actionNameString.equals("turnBluetoothOff"))
|
||||
newAction.setAction(Action_Enum.turnBluetoothOff);
|
||||
else if(actionNameString.equals("turnUsbTetheringOn"))
|
||||
if(actionNameString.equals("turnUsbTetheringOn"))
|
||||
newAction.setAction(Action_Enum.turnUsbTetheringOn);
|
||||
else if(actionNameString.equals("turnUsbTetheringOff"))
|
||||
newAction.setAction(Action_Enum.turnUsbTetheringOff);
|
||||
else if(actionNameString.equals("turnWifiTetheringOn"))
|
||||
newAction.setAction(Action_Enum.turnWifiTetheringOn);
|
||||
else if(actionNameString.equals("turnWifiTetheringOff"))
|
||||
newAction.setAction(Action_Enum.turnWifiTetheringOff);
|
||||
else if(actionNameString.equals("enableScreenRotation"))
|
||||
newAction.setAction(Action_Enum.enableScreenRotation);
|
||||
else if(actionNameString.equals("disableScreenRotation"))
|
||||
newAction.setAction(Action_Enum.disableScreenRotation);
|
||||
else if(actionNameString.equals("disableScreenRotation"))
|
||||
newAction.setAction(Action_Enum.disableScreenRotation);
|
||||
else if(actionNameString.equals("playMusic"))
|
||||
{
|
||||
newAction.setAction(Action_Enum.controlMediaPlayback);
|
||||
@ -1175,31 +1157,7 @@ public class XmlFileInterface
|
||||
else if (name.equals("ActionParameter1"))
|
||||
{
|
||||
// exclusion for deprecated types
|
||||
if(newAction.getAction().equals(Action_Enum.turnWifiOn))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setWifi);
|
||||
newAction.setParameter1(true);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.turnWifiOff))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setWifi);
|
||||
newAction.setParameter1(false);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.turnBluetoothOn))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setBluetooth);
|
||||
newAction.setParameter1(true);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.turnBluetoothOff))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setBluetooth);
|
||||
newAction.setParameter1(false);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.turnUsbTetheringOn))
|
||||
if(newAction.getAction().equals(Action_Enum.turnUsbTetheringOn))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setUsbTethering);
|
||||
newAction.setParameter1(true);
|
||||
@ -1211,36 +1169,6 @@ public class XmlFileInterface
|
||||
newAction.setParameter1(false);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.turnWifiTetheringOn))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setWifiTethering);
|
||||
newAction.setParameter1(true);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.turnWifiTetheringOff))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setWifiTethering);
|
||||
newAction.setParameter1(false);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.enableScreenRotation))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setDisplayRotation);
|
||||
newAction.setParameter1(true);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.disableScreenRotation))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setDisplayRotation);
|
||||
newAction.setParameter1(false);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.disableScreenRotation))
|
||||
{
|
||||
newAction.setAction(Action_Enum.setDisplayRotation);
|
||||
newAction.setParameter1(false);
|
||||
readTag(parser, "ActionParameter1"); //read the tag for the parser to head on
|
||||
}
|
||||
else if(newAction.getAction().equals(Action_Enum.turnScreenOnOrOff) && newAction.getParameter1())
|
||||
{
|
||||
/*
|
||||
|
@ -78,7 +78,7 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
||||
{
|
||||
for(Action action : Rule.getLastActivatedRule().getActionSet())
|
||||
{
|
||||
if(action.getAction() == Action.Action_Enum.turnWifiOn)
|
||||
if(action.getAction() == Action.Action_Enum.setWifi && action.getParameter1())
|
||||
{
|
||||
// we will be using wifiReceiver, deactivate AccelerometerTimer if applicable
|
||||
SensorActivity.stopAccelerometerTimer();
|
||||
@ -88,7 +88,7 @@ public class CellLocationChangedReceiver extends PhoneStateListener
|
||||
catch(NullPointerException ne)
|
||||
{
|
||||
// Nothing to do, there is no last activated rule. Wifi hasn't been activated so we don't
|
||||
// deactive accelerometer receiver.
|
||||
// deactivate accelerometer receiver.
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -8,10 +8,10 @@ import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.jens.automation2.AutomationService;
|
||||
import com.jens.automation2.BuildConfig;
|
||||
import com.jens.automation2.Miscellaneous;
|
||||
import com.jens.automation2.Rule;
|
||||
import com.jens.automation2.TimeFrame;
|
||||
@ -19,7 +19,6 @@ import com.jens.automation2.TimeObject;
|
||||
import com.jens.automation2.Trigger;
|
||||
import com.jens.automation2.Trigger.Trigger_Enum;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
@ -30,13 +29,13 @@ public class DateTimeListener extends BroadcastReceiver implements AutomationLis
|
||||
{
|
||||
private static AutomationService automationServiceRef;
|
||||
private static AlarmManager centralAlarmManagerInstance;
|
||||
private static boolean alarmListenerActive = false;
|
||||
private static boolean alarmListenerActive=false;
|
||||
private static ArrayList<ScheduleElement> alarmCandidates = new ArrayList<>();
|
||||
private static ArrayList<Integer> requestCodeList = new ArrayList<Integer>();
|
||||
static PendingIntent alarmPendingIntent = null;
|
||||
|
||||
public static void startAlarmListener(final AutomationService automationServiceRef)
|
||||
{
|
||||
{
|
||||
DateTimeListener.startAlarmListenerInternal(automationServiceRef);
|
||||
}
|
||||
public static void stopAlarmListener(Context context)
|
||||
@ -48,37 +47,37 @@ public class DateTimeListener extends BroadcastReceiver implements AutomationLis
|
||||
{
|
||||
return alarmListenerActive;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Alarm received", 2);
|
||||
|
||||
ArrayList<Rule> allRulesWithNowInTimeFrame = Rule.findRuleCandidates(Trigger_Enum.timeFrame);
|
||||
for(int i=0; i < allRulesWithNowInTimeFrame.size(); i++)
|
||||
ArrayList<Rule> allRulesWithTimeFrame = Rule.findRuleCandidates(Trigger_Enum.timeFrame);
|
||||
for(int i=0; i < allRulesWithTimeFrame.size(); i++)
|
||||
{
|
||||
if(allRulesWithNowInTimeFrame.get(i).getsGreenLight(context))
|
||||
allRulesWithNowInTimeFrame.get(i).activate(automationServiceRef, false);
|
||||
if(allRulesWithTimeFrame.get(i).getsGreenLight(context))
|
||||
allRulesWithTimeFrame.get(i).activate(automationServiceRef, false);
|
||||
}
|
||||
|
||||
setAlarms();
|
||||
|
||||
setOrResetAlarms();
|
||||
}
|
||||
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
|
||||
public static void setAlarms()
|
||||
public static void setOrResetAlarms()
|
||||
{
|
||||
alarmCandidates.clear();
|
||||
|
||||
Calendar calNow = Calendar.getInstance();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("E dd.MM.yyyy HH:mm");
|
||||
|
||||
|
||||
clearAlarms();
|
||||
|
||||
|
||||
int i=0;
|
||||
|
||||
|
||||
ArrayList<Rule> allRulesWithTimeFrames = new ArrayList<Rule>();
|
||||
allRulesWithTimeFrames = Rule.findRuleCandidates(Trigger_Enum.timeFrame);
|
||||
// allRulesWithTimeFrames = Rule.findRuleCandidatesByTimeFrame();
|
||||
|
||||
/*
|
||||
* Take care of regular executions, no repetitions in between.
|
||||
*/
|
||||
@ -192,18 +191,17 @@ public class DateTimeListener extends BroadcastReceiver implements AutomationLis
|
||||
* 4. Take div result +1 and add this on top of starting time
|
||||
* 5. Is this next possible execution still inside timeframe? Also consider timeframes spanning over midnight
|
||||
*/
|
||||
Calendar calSet;
|
||||
Time setTime;
|
||||
|
||||
TimeFrame tf = new TimeFrame(oneTrigger.getTriggerParameter2());
|
||||
|
||||
if(tf.getRepetition() > 0)
|
||||
{
|
||||
if(oneTrigger.applies(calNow, Miscellaneous.getAnyContext()))
|
||||
{
|
||||
Calendar calSchedule = getNextRepeatedExecutionAfter(oneTrigger, calNow);
|
||||
// if(oneTrigger.applies(calNow, Miscellaneous.getAnyContext()))
|
||||
// {
|
||||
Calendar calSchedule = getNextRepeatedExecution(oneTrigger);
|
||||
|
||||
alarmCandidates.add(new ScheduleElement(calSchedule, "Rule " + oneRule.getName() + ", repetition in trigger " + oneTrigger.toString()));
|
||||
}
|
||||
alarmCandidates.add(new ScheduleElement(calSchedule, "Rule " + oneRule.getName() + ", trigger " + oneTrigger.toString()));
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -214,39 +212,58 @@ public class DateTimeListener extends BroadcastReceiver implements AutomationLis
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
scheduleNextAlarm();
|
||||
}
|
||||
|
||||
|
||||
private static void scheduleNextAlarm()
|
||||
{
|
||||
Long currentTime = System.currentTimeMillis();
|
||||
ScheduleElement scheduleCandidate = null;
|
||||
|
||||
if(alarmCandidates.size() == 0)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmManager", "No alarms to be scheduled.", 3);
|
||||
return;
|
||||
}
|
||||
else
|
||||
else if(alarmCandidates.size() == 1)
|
||||
{
|
||||
Collections.sort(alarmCandidates);
|
||||
|
||||
Miscellaneous.logEvent("i", "AlarmManager", "Chose this as next scheduled alarm: " + alarmCandidates.get(0), 4);
|
||||
|
||||
Intent alarmIntent = new Intent(automationServiceRef, DateTimeListener.class);
|
||||
|
||||
if(Miscellaneous.getAnyContext().getApplicationContext().getApplicationInfo().targetSdkVersion >= 31)
|
||||
alarmPendingIntent = PendingIntent.getBroadcast(automationServiceRef, 0, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
else
|
||||
alarmPendingIntent = PendingIntent.getBroadcast(automationServiceRef, 0, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
||||
centralAlarmManagerInstance.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, alarmCandidates.get(0).time.getTimeInMillis(), alarmPendingIntent);
|
||||
else
|
||||
centralAlarmManagerInstance.set(AlarmManager.RTC_WAKEUP, alarmCandidates.get(0).time.getTimeInMillis(), alarmPendingIntent);
|
||||
// only one alarm, schedule that
|
||||
scheduleCandidate = alarmCandidates.get(0);
|
||||
}
|
||||
else if(alarmCandidates.size() > 1)
|
||||
{
|
||||
scheduleCandidate = alarmCandidates.get(0);
|
||||
|
||||
for(ScheduleElement alarmCandidate : alarmCandidates)
|
||||
{
|
||||
if(Math.abs(currentTime - alarmCandidate.time.getTimeInMillis()) < Math.abs(currentTime - scheduleCandidate.time.getTimeInMillis()))
|
||||
scheduleCandidate = alarmCandidate;
|
||||
}
|
||||
}
|
||||
|
||||
Intent alarmIntent = new Intent(automationServiceRef, DateTimeListener.class);
|
||||
|
||||
if(Miscellaneous.getAnyContext().getApplicationContext().getApplicationInfo().targetSdkVersion >= 31)
|
||||
alarmPendingIntent = PendingIntent.getBroadcast(automationServiceRef, 0, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
else
|
||||
alarmPendingIntent = PendingIntent.getBroadcast(automationServiceRef, 0, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
||||
centralAlarmManagerInstance.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, scheduleCandidate.time.getTimeInMillis(), alarmPendingIntent);
|
||||
else
|
||||
centralAlarmManagerInstance.set(AlarmManager.RTC_WAKEUP, scheduleCandidate.time.getTimeInMillis(), alarmPendingIntent);
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("E dd.MM.yyyy HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(scheduleCandidate.time.getTimeInMillis());
|
||||
Miscellaneous.logEvent("i", "AlarmManager", "Chose " + sdf.format(calendar.getTime()) + " as next scheduled alarm.", 4);
|
||||
}
|
||||
|
||||
|
||||
public static void clearAlarms()
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmManager", "Clearing possibly standing alarms.", 4);
|
||||
|
||||
for(int requestCode : requestCodeList)
|
||||
{
|
||||
Intent alarmIntent = new Intent(automationServiceRef, DateTimeListener.class);
|
||||
@ -255,9 +272,10 @@ public class DateTimeListener extends BroadcastReceiver implements AutomationLis
|
||||
|
||||
centralAlarmManagerInstance.cancel(alarmPendingIntent);
|
||||
}
|
||||
|
||||
requestCodeList.clear();
|
||||
}
|
||||
|
||||
|
||||
private static void startAlarmListenerInternal(AutomationService givenAutomationServiceRef)
|
||||
{
|
||||
if(!alarmListenerActive)
|
||||
@ -265,29 +283,34 @@ public class DateTimeListener extends BroadcastReceiver implements AutomationLis
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Starting alarm listener.", 4);
|
||||
DateTimeListener.automationServiceRef = givenAutomationServiceRef;
|
||||
centralAlarmManagerInstance = (AlarmManager)automationServiceRef.getSystemService(automationServiceRef.ALARM_SERVICE);
|
||||
|
||||
alarmListenerActive = true;
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Alarm listener started.", 4);
|
||||
DateTimeListener.setAlarms();
|
||||
DateTimeListener.setOrResetAlarms();
|
||||
|
||||
// // get a Calendar object with current time
|
||||
// Calendar cal = Calendar.getInstance();
|
||||
// // add 5 minutes to the calendar object
|
||||
// cal.add(Calendar.SECOND, 10);
|
||||
// centralAlarmManagerInstance.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 5000, alarmPendingIntent);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Request to start AlarmListener. But it's already active.", 5);
|
||||
}
|
||||
|
||||
|
||||
private static void stopAlarmListenerInternal()
|
||||
{
|
||||
if(alarmListenerActive)
|
||||
{
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Stopping alarm listener.", 4);
|
||||
clearAlarms();
|
||||
centralAlarmManagerInstance.cancel(alarmPendingIntent);
|
||||
alarmListenerActive = false;
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "AlarmListener", "Request to stop AlarmListener. But it's not running.", 5);
|
||||
}
|
||||
public static void reloadAlarms()
|
||||
{
|
||||
DateTimeListener.setAlarms();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startListener(AutomationService automationService)
|
||||
{
|
||||
@ -345,41 +368,217 @@ public class DateTimeListener extends BroadcastReceiver implements AutomationLis
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
public static Calendar getNextRepeatedExecutionAfter(Trigger trigger, Calendar now)
|
||||
static int getNextDayIntForExecution(Trigger trigger)
|
||||
{
|
||||
Calendar calSet;
|
||||
TimeObject setTime;
|
||||
TimeFrame tf = new TimeFrame(trigger.getTriggerParameter2());
|
||||
Calendar now = Calendar.getInstance();
|
||||
|
||||
if(tf.getDayList().contains(now.get(Calendar.DAY_OF_WEEK)))
|
||||
return now.get(Calendar.DAY_OF_WEEK);
|
||||
else
|
||||
{
|
||||
int dayNumberOfNextExecution = now.get(Calendar.DAY_OF_WEEK);
|
||||
|
||||
while(!tf.getDayList().contains(dayNumberOfNextExecution))
|
||||
{
|
||||
dayNumberOfNextExecution++;
|
||||
if(dayNumberOfNextExecution > 6)
|
||||
dayNumberOfNextExecution = 1;
|
||||
}
|
||||
|
||||
return dayNumberOfNextExecution;
|
||||
}
|
||||
}
|
||||
|
||||
static int getDayDelta(Calendar now, int dayNumberOfNextExecution)
|
||||
{
|
||||
int result = dayNumberOfNextExecution - now.get(Calendar.DAY_OF_WEEK);
|
||||
|
||||
if(result >= 0)
|
||||
return result;
|
||||
else
|
||||
return 6 + result;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
public static Calendar getNextRepeatedExecution(Trigger trigger)
|
||||
{
|
||||
Calendar now = Calendar.getInstance();
|
||||
Miscellaneous.logEvent("i", "DateTimeListener", "Checking for next repetition execution after " + Miscellaneous.formatDate(now.getTime()), 5);
|
||||
Calendar calculationStart, calSchedule = null;
|
||||
TimeFrame tf = new TimeFrame(trigger.getTriggerParameter2());
|
||||
|
||||
if(tf.getRepetition() > 0)
|
||||
{
|
||||
if(trigger.getTriggerParameter())
|
||||
setTime = tf.getTriggerTimeStart();
|
||||
else
|
||||
setTime = tf.getTriggerTimeStop();
|
||||
/*
|
||||
Are we inside of the timeframe or outside?
|
||||
|
||||
calSet = (Calendar) now.clone();
|
||||
calSet.set(Calendar.HOUR_OF_DAY, setTime.getHours());
|
||||
calSet.set(Calendar.MINUTE, setTime.getMinutes());
|
||||
calSet.set(Calendar.SECOND, 0);
|
||||
calSet.set(Calendar.MILLISECOND, 0);
|
||||
Inside -> is this demanded?
|
||||
Yes:
|
||||
If last execution known, calculate from it
|
||||
If not known, calculate from start of timeframe
|
||||
No:
|
||||
Use end-time and add repetition
|
||||
|
||||
// If the starting time is a day ahead remove 1 day.
|
||||
if(calSet.getTimeInMillis() > now.getTimeInMillis())
|
||||
calSet.add(Calendar.DAY_OF_MONTH, -1);
|
||||
Outside? -> is this demanded?
|
||||
Yes:
|
||||
If last execution known, calculate from it
|
||||
If not known, calculate from end of timeframe
|
||||
No:
|
||||
Use start-time and add repetition
|
||||
*/
|
||||
|
||||
long differenceInSeconds = Math.abs(now.getTimeInMillis() - calSet.getTimeInMillis()) / 1000;
|
||||
long nextExecutionMultiplier = Math.floorDiv(differenceInSeconds, tf.getRepetition()) + 1;
|
||||
long nextScheduleTimestamp = (calSet.getTimeInMillis() / 1000) + (nextExecutionMultiplier * tf.getRepetition());
|
||||
Calendar calSchedule = Calendar.getInstance();
|
||||
calSchedule.setTimeInMillis(nextScheduleTimestamp * 1000);
|
||||
if(areWeInTimeFrame(trigger, new Date()))
|
||||
{
|
||||
if(trigger.getTriggerParameter())
|
||||
{
|
||||
if(trigger.getParentRule().getLastExecution() != null)
|
||||
{
|
||||
calculationStart = (Calendar) trigger.getParentRule().getLastExecution().clone();
|
||||
}
|
||||
else
|
||||
{
|
||||
calculationStart = (Calendar) now.clone();
|
||||
calculationStart.set(Calendar.HOUR_OF_DAY, tf.getTriggerTimeStart().getHours());
|
||||
calculationStart.set(Calendar.MINUTE, tf.getTriggerTimeStart().getMinutes());
|
||||
calculationStart.set(Calendar.SECOND, tf.getTriggerTimeStart().getSeconds());
|
||||
calculationStart.set(Calendar.MILLISECOND, 0);
|
||||
}
|
||||
long differenceInSeconds = Math.abs(now.getTimeInMillis() - calculationStart.getTimeInMillis()) / 1000;
|
||||
long nextExecutionMultiplier = Math.floorDiv(differenceInSeconds, tf.getRepetition()) + 1;
|
||||
calSchedule = (Calendar) calculationStart.clone();
|
||||
calSchedule.add(Calendar.SECOND, (int) (nextExecutionMultiplier * tf.getRepetition()));
|
||||
}
|
||||
else
|
||||
{
|
||||
calculationStart = (Calendar) now.clone();
|
||||
calculationStart.set(Calendar.HOUR_OF_DAY, tf.getTriggerTimeStop().getHours());
|
||||
calculationStart.set(Calendar.MINUTE, tf.getTriggerTimeStop().getMinutes());
|
||||
calculationStart.set(Calendar.SECOND, tf.getTriggerTimeStop().getSeconds());
|
||||
calculationStart.set(Calendar.MILLISECOND, 0);
|
||||
calSchedule = (Calendar) calculationStart.clone();
|
||||
calSchedule.add(Calendar.SECOND, (int) tf.getRepetition());
|
||||
}
|
||||
}
|
||||
else // not in timeframe
|
||||
{
|
||||
if (!trigger.getTriggerParameter())
|
||||
{
|
||||
if (trigger.getParentRule().getLastExecution() != null)
|
||||
{
|
||||
calculationStart = (Calendar) trigger.getParentRule().getLastExecution().clone();
|
||||
long differenceInSeconds = Math.abs(now.getTimeInMillis() - calculationStart.getTimeInMillis()) / 1000;
|
||||
long nextExecutionMultiplier = Math.floorDiv(differenceInSeconds, tf.getRepetition()) + 1;
|
||||
calSchedule = (Calendar) calculationStart.clone();
|
||||
calSchedule.add(Calendar.SECOND, (int) (nextExecutionMultiplier * tf.getRepetition()));
|
||||
Miscellaneous.logEvent("i", "getNextRepeatedExecutionAfter()", "Chose " + Miscellaneous.formatDate(calSchedule.getTime()) + " as next repeated execution time.", 5);
|
||||
return calSchedule;
|
||||
}
|
||||
else
|
||||
{
|
||||
calculationStart = (Calendar) now.clone();
|
||||
if(tf.getDayList().contains(now.get(Calendar.DAY_OF_WEEK)))
|
||||
{
|
||||
calculationStart.set(Calendar.HOUR_OF_DAY, tf.getTriggerTimeStop().getHours());
|
||||
calculationStart.set(Calendar.MINUTE, tf.getTriggerTimeStop().getMinutes());
|
||||
calculationStart.set(Calendar.SECOND, tf.getTriggerTimeStop().getSeconds());
|
||||
calculationStart.set(Calendar.MILLISECOND, 0);
|
||||
calculationStart.add(Calendar.SECOND, (int) tf.getRepetition());
|
||||
|
||||
return calSchedule;
|
||||
int dayDelta = getDayDelta(now, getNextDayIntForExecution(trigger));
|
||||
calculationStart.add(Calendar.DAY_OF_WEEK, dayDelta);
|
||||
}
|
||||
calSchedule = (Calendar) calculationStart.clone();
|
||||
Miscellaneous.logEvent("i", "getNextRepeatedExecutionAfter()", "Chose " + Miscellaneous.formatDate(calSchedule.getTime()) + " as next repeated execution time.", 5);
|
||||
return calSchedule;
|
||||
}
|
||||
/*long differenceInSeconds = Math.abs(now.getTimeInMillis() - calculationStart.getTimeInMillis()) / 1000;
|
||||
long nextExecutionMultiplier = Math.floorDiv(differenceInSeconds, tf.getRepetition()) + 1;
|
||||
calSchedule = (Calendar) calculationStart.clone();
|
||||
calSchedule.add(Calendar.SECOND, (int) (nextExecutionMultiplier * tf.getRepetition()));*/
|
||||
}
|
||||
else
|
||||
{
|
||||
calculationStart = (Calendar) now.clone();
|
||||
calculationStart.set(Calendar.HOUR_OF_DAY, tf.getTriggerTimeStart().getHours());
|
||||
calculationStart.set(Calendar.MINUTE, tf.getTriggerTimeStart().getMinutes());
|
||||
calculationStart.set(Calendar.SECOND, tf.getTriggerTimeStart().getSeconds());
|
||||
calculationStart.set(Calendar.MILLISECOND, 0);
|
||||
calSchedule = (Calendar) calculationStart.clone();
|
||||
calSchedule.add(Calendar.SECOND, (int) (tf.getRepetition()));
|
||||
}
|
||||
|
||||
if (Miscellaneous.compareTimes(calSchedule, now) > 0)
|
||||
calSchedule.add(Calendar.DAY_OF_MONTH, 1);
|
||||
}
|
||||
|
||||
int dayDelta = getDayDelta(now, getNextDayIntForExecution(trigger));
|
||||
calSchedule.add(Calendar.DAY_OF_WEEK, dayDelta);
|
||||
|
||||
Miscellaneous.logEvent("i", "getNextRepeatedExecutionAfter()", "Chose " + Miscellaneous.formatDate(calSchedule.getTime()) + " as next repeated execution time.", 5);
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "DateTimeListener", "Trigger " + trigger.toString() + " is not executed repeatedly.", 5);
|
||||
Miscellaneous.logEvent("i", "getNextRepeatedExecutionAfter()", "Trigger " + trigger.toString() + " is not configured to repeat.", 5);
|
||||
|
||||
return null;
|
||||
return calSchedule;
|
||||
}
|
||||
|
||||
public static boolean areWeInTimeFrame(Trigger trigger, Object triggeringObject)
|
||||
{
|
||||
/*
|
||||
* Use format known from Automation
|
||||
* 07:30:00/17:30:00/23456/300 <-- last parameter is optional: repetition in seconds
|
||||
* Also required: inside or outside that interval
|
||||
*/
|
||||
|
||||
Date triggeringTime;
|
||||
// if(triggeringObject instanceof Date)
|
||||
// triggeringTime = (Date)triggeringObject;
|
||||
// else
|
||||
triggeringTime = new Date();
|
||||
|
||||
String timeString = String.valueOf(triggeringTime.getHours()) + ":" + String.valueOf(triggeringTime.getMinutes()) + ":" + String.valueOf(triggeringTime.getSeconds());
|
||||
TimeObject nowTime = TimeObject.valueOf(timeString);
|
||||
Calendar calNow = Calendar.getInstance();
|
||||
|
||||
try
|
||||
{
|
||||
TimeFrame tf = new TimeFrame(trigger.getTriggerParameter2());
|
||||
|
||||
if(tf.getDayList().contains(calNow.get(Calendar.DAY_OF_WEEK)))
|
||||
{
|
||||
if(
|
||||
// Regular case, start time is lower than end time
|
||||
(
|
||||
Miscellaneous.compareTimes(tf.getTriggerTimeStart(), nowTime) >= 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
|
||||
)
|
||||
)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "Trigger", "There was an error while checking if the time based trigger applies: " + Log.getStackTraceString(e), 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
@ -76,12 +76,12 @@ public class TimeZoneListener extends BroadcastReceiver implements AutomationLis
|
||||
if(action.equals(Intent.ACTION_TIMEZONE_CHANGED))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "TimeZoneListener", "Device timezone changed. Reloading alarms.", 3);
|
||||
DateTimeListener.reloadAlarms();
|
||||
DateTimeListener.setOrResetAlarms();
|
||||
}
|
||||
else if(action.equals(Intent.ACTION_TIME_CHANGED))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "TimeZoneListener", "Device time changed. Reloading alarms.", 3);
|
||||
DateTimeListener.reloadAlarms();
|
||||
DateTimeListener.setOrResetAlarms();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
@ -1,44 +1,48 @@
|
||||
<?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="fill_parent"
|
||||
android:layout_weight="30"
|
||||
android:layout_margin="@dimen/default_margin" >
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_margin="@dimen/default_margin"
|
||||
android:layout_weight="30">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/start"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TimePicker
|
||||
android:id="@+id/tpTimeFrameStart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLastRule"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/end"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TimePicker
|
||||
android:id="@+id/tpTimeFrameStop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRuleTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/start"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TimePicker
|
||||
android:id="@+id/tpTimeFrameStart"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:saveEnabled="false"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLastRule"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/end"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TimePicker
|
||||
android:id="@+id/tpTimeFrameStop"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:saveEnabled="false"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:background="#aa000000" />
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:background="#aa000000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
@ -47,24 +51,24 @@
|
||||
android:text="@string/insideOrOutsideTimeFrames"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radioTimeFrameEntering"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="@string/entering" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radioTimeFrameLeaving"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/leaving" />
|
||||
<RadioButton
|
||||
android:id="@+id/radioTimeFrameEntering"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="@string/entering" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radioTimeFrameLeaving"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/leaving" />
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
@ -80,52 +84,52 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDaysHint"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="@dimen/default_margin"
|
||||
android:textColor="@color/red" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkMonday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/monday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkTuesday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tuesday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkWednesday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/wednesday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkThursday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/thursday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkFriday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/friday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkSaturday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/saturday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkSunday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sunday" />
|
||||
<CheckBox
|
||||
android:id="@+id/checkMonday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/monday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkTuesday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tuesday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkWednesday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/wednesday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkThursday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/thursday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkFriday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/friday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkSaturday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/saturday" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkSunday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sunday" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
@ -136,7 +140,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/chkRepeat"
|
||||
@ -146,22 +150,22 @@
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etRepeatEvery"
|
||||
android:layout_marginLeft="@dimen/default_margin"
|
||||
android:minWidth="75dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/default_margin"
|
||||
android:enabled="false"
|
||||
android:inputType="numberSigned" />
|
||||
android:inputType="numberSigned"
|
||||
android:minWidth="75dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bSaveTimeFrame"
|
||||
|
||||
<Button
|
||||
android:id="@+id/bSaveTimeFrame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_margin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/save" />
|
||||
|
||||
android:text="@string/save" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
@ -65,7 +65,7 @@
|
||||
<string name="end">Ende</string>
|
||||
<string name="save">Speichern</string>
|
||||
<string name="urlToTrigger">URL, die ausgelöst werden soll:</string>
|
||||
<string name="urlLegend">Variablen:\nSie können die folgenden Variablen verwenden. Vor dem Auslösen werden sie mit dem entsprechenden Wert Ihres Geräts ersetzt. Die Klammern müssen in den Text mit aufgenommen werden.\n\n[uniqueid] - Die Unique ID Ihres Geräts\n[serialnr] - Die Seriennummer Ihres Geräts (< Android 9)\n[latitude] - Ihr gegenwärtiger Breitengrad\n[longitude] - Ihr gegenwärtiger Längengrad\n[phonenr] - Nummer des letzten ein- oder ausgehenden Anrufs\n[d] - Tag des Monats, 2-stellig mit führender Null\n[m] - Monat als Zahl, mit führenden Nullen\n[Y] - Vierstellige Jahreszahl\n[h] - Stunde im 12-Stunden-Format, mit führenden Nullen\n[H] - Stunde im 24-Stunden-Format, mit führenden Nullen\n[i] - Minuten, mit führenden Nullen\n[s] - Sekunden, mit führenden Nullen\n[ms] - milliseconds\n[notificationTitle] - Titel der letzten Benachrichtigung\n[notificationText] - Text der letzten Benachrichtigung\n[last_triggerurl_result] - Das Ergebnis der letzten Ausführung der triggerUrl-Aktion\n[last_run_executable_exit_code] - Der exit code der letzten starte-Programm Aktion\n[last_run_executable_output] - Die Ausgabe der letzten starte-Programm Aktion (nur für nicht-root)\n[last_calendar_title] - Titel des letzten Regel-auslösenden Kalendertermins\n[last_calendar_description] - Beschreibung des letzten Regel-auslösenden Kalendertermins\n[last_calendar_location] - Ort des letzten Regel-auslösenden Kalendertermins\n[variable-VARIABLENAME] - Der Wert Ihrer selbst definitierten Variable</string>
|
||||
<string name="urlLegend">Variablen:\nSie können die folgenden Variablen verwenden. Vor dem Auslösen werden sie mit dem entsprechenden Wert Ihres Geräts ersetzt. Die Klammern müssen in den Text mit aufgenommen werden.\n\n[uniqueid] - Die Unique ID Ihres Geräts\n[serialnr] - Die Seriennummer Ihres Geräts (< Android 9)\n[latitude] - Ihr gegenwärtiger Breitengrad\n[longitude] - Ihr gegenwärtiger Längengrad\n[phonenr] - Nummer des letzten ein- oder ausgehenden Anrufs\n[d] - Tag des Monats, 2-stellig mit führender Null\n[m] - Monat als Zahl, mit führenden Nullen\n[Y] - Vierstellige Jahreszahl\n[h] - Stunde im 12-Stunden-Format, mit führenden Nullen\n[H] - Stunde im 24-Stunden-Format, mit führenden Nullen\n[i] - Minuten, mit führenden Nullen\n[s] - Sekunden, mit führenden Nullen\n[ms] - milliseconds\n[w] - Wochentag in Textform\n[F] - Monat in Textform\n[notificationTitle] - Titel der letzten Benachrichtigung\n[notificationText] - Text der letzten Benachrichtigung\n[last_triggerurl_result] - Das Ergebnis der letzten Ausführung der triggerUrl-Aktion\n[last_run_executable_exit_code] - Der exit code der letzten starte-Programm Aktion\n[last_run_executable_output] - Die Ausgabe der letzten starte-Programm Aktion (nur für nicht-root)\n[last_calendar_title] - Titel des letzten Regel-auslösenden Kalendertermins\n[last_calendar_description] - Beschreibung des letzten Regel-auslösenden Kalendertermins\n[last_calendar_location] - Ort des letzten Regel-auslösenden Kalendertermins\n[variable-VARIABLENAME] - Der Wert Ihrer selbst definitierten Variable</string>
|
||||
<string name="wifi">WLAN</string>
|
||||
<string name="activating">Aktiviere</string>
|
||||
<string name="deactivating">Deaktiviere</string>
|
||||
|
@ -367,7 +367,7 @@
|
||||
<string name="networkAccuracy">Red exactitud [m]</string>
|
||||
<string name="minimumTimeForLocationUpdates">Tiempo mínimo para cambio en milisegundos para actualizar posición</string>
|
||||
<string name="timeForUpdate">Tiempo para actualizar [milisegundos]</string>
|
||||
<string name="urlLegend">Variables: Puede usar esas variables. Mientras ejecuta van a sustituir con los valores correspondientes en su dispositivo. Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dispositivo\n[serialnr] - el número de serie de su dispositivo (< Android 9)\n[latitude] - su latitud\n[longitude] - su longitud\n[phonenr] - Ùltimo número de llamada realizada tanto de salida como entrante\n[d] - Dia del mes, 2 digitos con cero al comienzo\n[m] - número del mes, 2 digitos con cero al comienzo\n[Y] - Número del año, 4 digitos\n[h] - Hora, formato 12 horas con cero al comienzo\n[H] - Hora, formato 24 horas con cero al comienzo\n[i] - Minutos con cero al comienzo\n[s] - Segundos con cero al comienzo\n[ms] - milisegundos\n[notificationTitle] - Título de la última notificación\n[notificationText] - Texto de la última notificación\n[last_triggerurl_result] - El resultado de la última ejecución de la acción triggerUrl\n[last_run_executable_exit_code] - El código de salida de la última acción ejecutable ejecutada\n[last_run_executable_output] - El resultado de la última acción ejecutable ejecutada (solo para no root)Titel des letzten Regel-auslösenden Kalendertermins\n[last_calendar_title] - Título de la ultima cita en el calendar que ejecutó una regla\n[last_calendar_description] - Descriptión de la ultima cita en el calendar que ejecutó una regla\n[last_calendar_location] - Ubicación de la ultima cita en el calendar que ejecutó una regla\n[variable-VARIABLENAME] - El valor de la variable definida personalizada</string>
|
||||
<string name="urlLegend">Variables: Puede usar esas variables. Mientras ejecuta van a sustituir con los valores correspondientes en su dispositivo. Incluya las paréntecis en su texto.\n\n[uniqueid] - el número único de su dispositivo\n[serialnr] - el número de serie de su dispositivo (< Android 9)\n[latitude] - su latitud\n[longitude] - su longitud\n[phonenr] - Ùltimo número de llamada realizada tanto de salida como entrante\n[d] - Dia del mes, 2 digitos con cero al comienzo\n[m] - número del mes, 2 digitos con cero al comienzo\n[Y] - Número del año, 4 digitos\n[h] - Hora, formato 12 horas con cero al comienzo\n[H] - Hora, formato 24 horas con cero al comienzo\n[i] - Minutos con cero al comienzo\n[s] - Segundos con cero al comienzo\n[ms] - milisegundos\n[w] - Día de la semana en forma de texto\n[F] - Mes en forma de texto\n[notificationTitle] - Título de la última notificación\n[notificationText] - Texto de la última notificación\n[last_triggerurl_result] - El resultado de la última ejecución de la acción triggerUrl\n[last_run_executable_exit_code] - El código de salida de la última acción ejecutable ejecutada\n[last_run_executable_output] - El resultado de la última acción ejecutable ejecutada (solo para no root)Titel des letzten Regel-auslösenden Kalendertermins\n[last_calendar_title] - Título de la ultima cita en el calendar que ejecutó una regla\n[last_calendar_description] - Descriptión de la ultima cita en el calendar que ejecutó una regla\n[last_calendar_location] - Ubicación de la ultima cita en el calendar que ejecutó una regla\n[variable-VARIABLENAME] - El valor de la variable definida personalizada</string>
|
||||
<string name="screenRotationAlreadyEnabled">Rotación del monitor todavia esta activado.</string>
|
||||
<string name="screenRotationAlreadyDisabled">Rotación del monitor todavia esta desactivado.</string>
|
||||
<string name="needLocationPermForWifiList">Se puede usar la lista de wifis conocidos para determinar los sitios en los cuales estuvo. Por eso el permiso de localización es necesario para cargar la lista de wifis. Si quiere elegir uno de la lista tiene que conceder el permiso. En caso contrario todavia puede introducir un nombre wifi manualmente.</string>
|
||||
|
@ -65,7 +65,7 @@
|
||||
<string name="end">Arrêt</string>
|
||||
<string name="save">Enregistrer</string>
|
||||
<string name="urlToTrigger">URL à déclencher :</string>
|
||||
<string name="urlLegend">Variables :\nVous pouvez utiliser les variables suivantes. Lors du déclenchement, elles seront remplacées par les variables correspondantes sur votre appareil. Insérez les parenthèses dans votre texte.\n\n[uniqueid] - Identifiant unique de votre appareil\n[serialnr] - Numéro de série de votre appareil (< Android 9)\n[latitude] - Latitude de votre appraeil\n[longitude] - Longitude de votre appraeil\n[phonenr] - Numéro des derniers appels entrants ou sortants\n[d] - Jour du mois, @ chiffres commençant par 0\n[m] - Valeur numérique du mois, avec @ chiffres\n[Y] - Valeur numérique de l’année, $ chiffres\n[h] - Format horaire 12 heures, 2 chiffres\n[H] - Format horaire 24 heures, 2 chiffres\n[i] - Nombre de minutes, 2 chiffres\n[s] - Nombre de secondes, 2 chiffres\n[ms] - Nombre de millisecondes\n[notificationTitle] - titre de la dernière notification\n[notificationText] - texte de la dernière notification\n[last_triggerurl_result] - Résultat de l\'exécution de la dernière action triggerUrl\n[last_run_executable_exit_code] - Le code de sortie de la dernière action exécutable exécutée\n[last_run_executable_output] - La sortie de la dernière action exécutable exécutée (uniquement pour les non-roots)\n[last_calendar_title] - Titre du dernier événement de calendrier déclenchant une règle\n[last_calendar_description] - Description du dernier événement de calendrier déclenchant une règle\n[last_calendar_location] - Emplacement du dernier événement de calendrier déclenchant la règle\n[variable-VARIABLENAME] - Valeur de votre variable définie personnalisée</string>
|
||||
<string name="urlLegend">Variables :\nVous pouvez utiliser les variables suivantes. Lors du déclenchement, elles seront remplacées par les variables correspondantes sur votre appareil. Insérez les parenthèses dans votre texte.\n\n[uniqueid] - Identifiant unique de votre appareil\n[serialnr] - Numéro de série de votre appareil (< Android 9)\n[latitude] - Latitude de votre appraeil\n[longitude] - Longitude de votre appraeil\n[phonenr] - Numéro des derniers appels entrants ou sortants\n[d] - Jour du mois, @ chiffres commençant par 0\n[m] - Valeur numérique du mois, avec @ chiffres\n[Y] - Valeur numérique de l’année, $ chiffres\n[h] - Format horaire 12 heures, 2 chiffres\n[H] - Format horaire 24 heures, 2 chiffres\n[i] - Nombre de minutes, 2 chiffres\n[s] - Nombre de secondes, 2 chiffres\n[ms] - Nombre de millisecondes\n[w] - Jour de la semaine sous forme de texte\n[F] - Mois sous forme de texte\n[notificationTitle] - titre de la dernière notification\n[notificationText] - texte de la dernière notification\n[last_triggerurl_result] - Résultat de l\'exécution de la dernière action triggerUrl\n[last_run_executable_exit_code] - Le code de sortie de la dernière action exécutable exécutée\n[last_run_executable_output] - La sortie de la dernière action exécutable exécutée (uniquement pour les non-roots)\n[last_calendar_title] - Titre du dernier événement de calendrier déclenchant une règle\n[last_calendar_description] - Description du dernier événement de calendrier déclenchant une règle\n[last_calendar_location] - Emplacement du dernier événement de calendrier déclenchant la règle\n[variable-VARIABLENAME] - Valeur de votre variable définie personnalisée</string>
|
||||
<string name="wifi">wifi</string>
|
||||
<string name="activating">Allumer</string>
|
||||
<string name="deactivating">Éteindre</string>
|
||||
|
@ -542,7 +542,7 @@
|
||||
<string name="tuesday">Martedì</string>
|
||||
<string name="unknownError">Errore indeterminato.</string>
|
||||
<string name="until">finchè</string>
|
||||
<string name="urlLegend">Variabili:\n È possibile utilizzare le seguenti variabili. Quando attivate, saranno sostituite con il valore corrispondente sul tuo dispositivo. Includi le parentesi nel tuo testo.\n\n[uniqueid] - L\'ID unico del tuo dispositivo\n[serialnr] - Il numero di serie del tuo dispositivio (< Android 9)\n[latitude] - La latitudine del tuo dispositivo\n[longitude] - La longitudine del tuo dispositivo\n[phonenr] - Numero dell\'ultima chiamata (entrante o uscente)\n[d] - Il giorno del mese, sempre 2 cifre con zero iniziale \n[m] - Mese in formato numerico, sempre 2 cifre con zero iniziale \n[Y] - L\’anno, sempre con 4 cifre\n[h] - Ore in formato 12 ore, sempre 2 cifre con due punti\n[H] - Ore in formato 24 ore, sempre 2 cifre con due punti\n[i] - Minuti, sempre 2 cifre\n[s] - Secondi, sempre 2 cifre\n[ms] - millisecondi, sempre 3 cifre\n[notificationTitle] - titolo dell\'ultima notifica\n[notificationText] - testo dell\'ultima notifica\n[last_triggerurl_result] - Risultato dell\'esecuzione dell\'ultima azione triggerUrl\n[last_run_executable_exit_code] - Codice di uscita dell\'ultima azione eseguibile di esecuzione\n[last_run_executable_output] - L\'output dell\'ultima azione eseguibile eseguita (solo per i non root)\n[last_calendar_title] - Titolo dell\'ultimo evento di calendario che ha attivato la regola\n[last_calendar_description] - Descrizione dell\'ultimo evento del calendario che ha attivato la regola\n[last_calendar_location] - Posizione dell\'ultimo evento del calendario che ha attivato la regola\n[variable-VARIABLENAME] - Il valore della variabile definita in modo personalizzato</string>
|
||||
<string name="urlLegend">Variabili:\n È possibile utilizzare le seguenti variabili. Quando attivate, saranno sostituite con il valore corrispondente sul tuo dispositivo. Includi le parentesi nel tuo testo.\n\n[uniqueid] - L\'ID unico del tuo dispositivo\n[serialnr] - Il numero di serie del tuo dispositivio (< Android 9)\n[latitude] - La latitudine del tuo dispositivo\n[longitude] - La longitudine del tuo dispositivo\n[phonenr] - Numero dell\'ultima chiamata (entrante o uscente)\n[d] - Il giorno del mese, sempre 2 cifre con zero iniziale \n[m] - Mese in formato numerico, sempre 2 cifre con zero iniziale \n[Y] - L\’anno, sempre con 4 cifre\n[h] - Ore in formato 12 ore, sempre 2 cifre con due punti\n[H] - Ore in formato 24 ore, sempre 2 cifre con due punti\n[i] - Minuti, sempre 2 cifre\n[s] - Secondi, sempre 2 cifre\n[ms] - millisecondi, sempre 3 cifre\n[w] - Giorno della settimana in forma di testo\n[F] - Mese in forma di testo\n[notificationTitle] - titolo dell\'ultima notifica\n[notificationText] - testo dell\'ultima notifica\n[last_triggerurl_result] - Risultato dell\'esecuzione dell\'ultima azione triggerUrl\n[last_run_executable_exit_code] - Codice di uscita dell\'ultima azione eseguibile di esecuzione\n[last_run_executable_output] - L\'output dell\'ultima azione eseguibile eseguita (solo per i non root)\n[last_calendar_title] - Titolo dell\'ultimo evento di calendario che ha attivato la regola\n[last_calendar_description] - Descrizione dell\'ultimo evento del calendario che ha attivato la regola\n[last_calendar_location] - Posizione dell\'ultimo evento del calendario che ha attivato la regola\n[variable-VARIABLENAME] - Il valore della variabile definita in modo personalizzato</string>
|
||||
<string name="urlToTrigger">URL da caricare:</string>
|
||||
<string name="urlTooShort">L\'url deve avere almeno 10 caratteri.</string>
|
||||
<string name="usbTetheringFailForAboveGingerbread">Questo molto probabilmente non funzionerà dato che sei su una versione superiore ad Android 2.3. Tuttavia è possibile utilizzare la connessione wifi tethering per attivare la regola.</string>
|
||||
|
@ -64,7 +64,7 @@
|
||||
<string name="end">Einde</string>
|
||||
<string name="save">Opslaan</string>
|
||||
<string name="urlToTrigger">URL om te activeren:</string>
|
||||
<string name="urlLegend">Variabelen:U kunt de volgende variabelen gebruiken. Bij het triggeren zullen ze worden vervangen door de corresponderende waarde op je apparaat. Zet de haakjes in uw tekst. \n[uniqueid] - Het unieke id van uw apparaat[serialnr] - Het serienummer van uw apparaat (< Android 9)[latitude] - De breedtegraad van uw apparaat[longitude] - De lengtegraad van uw apparaat[phonenr] - Nummer van het laatste inkomende of uitgaande gesprek[d] - Dag van de maand, 2 cijfers met voorloopnullen[m] - Numerieke weergave van een maand, met voorloopnullen[Y] - een volledige numerieke weergave van een jaar, 4 cijfers[h] - 12-uurs indeling van een uur, met voorloopnullen[H] - 24-uurs indeling van een uur, met voorloopnullen[i] - minuten, met voorloopnullen[s] - seconden, met voorloopnullen[ms] - milliseconden[notificationTitle] - titel van de laatste melding[notificationText] - tekst van de laatste melding\n[last_triggerurl_result] - Het resultaat van de laatste uitvoering van de triggerUrl-actie\n[last_run_executable_exit_code] - De afsluitcode van de uitvoerbare actie van de laatste uitvoering\n[last_run_executable_output] - De uitvoer van de uitvoerbare actie van de laatste uitvoering (alleen voor niet-root)\n[last_calendar_title] - Titel van de laatste agenda-afspraak die regels activeert\n[last_calendar_description] - Beschrijving van de laatste agenda-gebeurtenis die regels activeert\n[last_calendar_location] - Locatie van de laatste agenda-gebeurtenis die de regel activeert\n[variable-VARIABLENAME] - De waarde van uw aangepaste gedefinieerde variabele</string>
|
||||
<string name="urlLegend">Variabelen:U kunt de volgende variabelen gebruiken. Bij het triggeren zullen ze worden vervangen door de corresponderende waarde op je apparaat. Zet de haakjes in uw tekst. \n[uniqueid] - Het unieke id van uw apparaat\n[serialnr] - Het serienummer van uw apparaat (< Android 9)\n[latitude] - De breedtegraad van uw apparaat\n[longitude] - De lengtegraad van uw apparaat\n[phonenr] - Nummer van het laatste inkomende of uitgaande gesprek\n[d] - Dag van de maand, 2 cijfers met voorloopnullen\n[m] - Numerieke weergave van een maand, met voorloopnullen\n[Y] - een volledige numerieke weergave van een jaar, 4 cijfers\n[h] - 12-uurs indeling van een uur, met voorloopnullen\n[H] - 24-uurs indeling van een uur, met voorloopnullen\n[i] - minuten, met voorloopnullen\n[s] - seconden, met voorloopnullen\n[ms] - milliseconden\n[w] - Dag van de week in tekstvorm\n[F] - Maand in tekstvorm\n[notificationTitle] - titel van de laatste melding\n[notificationText] - tekst van de laatste melding\n[last_triggerurl_result] - Het resultaat van de laatste uitvoering van de triggerUrl-actie\n[last_run_executable_exit_code] - De afsluitcode van de uitvoerbare actie van de laatste uitvoering\n[last_run_executable_output] - De uitvoer van de uitvoerbare actie van de laatste uitvoering (alleen voor niet-root)\n[last_calendar_title] - Titel van de laatste agenda-afspraak die regels activeert\n[last_calendar_description] - Beschrijving van de laatste agenda-gebeurtenis die regels activeert\n[last_calendar_location] - Locatie van de laatste agenda-gebeurtenis die de regel activeert\n[variable-VARIABLENAME] - De waarde van uw aangepaste gedefinieerde variabele</string>
|
||||
<string name="wifi">wifi</string>
|
||||
<string name="activating">Activeren</string>
|
||||
<string name="deactivating">Deactiveren</string>
|
||||
|
@ -70,7 +70,7 @@
|
||||
<string name="end">Koniec</string>
|
||||
<string name="save">Zapisz</string>
|
||||
<string name="urlToTrigger">Adres URL do uruchomienia:</string>
|
||||
<string name="urlLegend">Zmienne:\nMożesz użyć następujących zmiennych. Po uruchomieniu zostaną one zastąpione odpowiednią wartością na Twoim urządzeniu. Umieść nawiasy w tekście.\n\n[uniqueid] – unikalny identyfikator Twojego urządzenia\n[serialnr] – numer seryjny Twojego urządzenia (< Android 9)\n[latitude] – Twoje urządzenie\ szerokość geograficzna użytkownika\n[longitude] – długość geograficzna Twojego urządzenia\n[phonenr] – numer ostatniego połączenia przychodzącego lub wychodzącego\n[d] – dzień miesiąca, 2 cyfry z zerami na początku\n[m] – Numeryczna reprezentacja miesiąca z zerami na początku\n[Y] — pełna cyfrowa reprezentacja roku, 4 cyfry\n[h] — godzina w formacie 12-godzinnym z zerami na początku\n[H] — format 24-godzinny format godziny z wiodącymi zerami\n[i] - minuty z wiodącymi zerami\n[s] - sekundy z wiodącymi zerami\n[ms] - milisekundy\n[notificationTitle] - tytuł ostatniego powiadomienia\n[notificationText] - tekst ostatniego powiadomienia\n[last_triggerurl_result] - Wynik ostatniego wykonania akcji triggerUrl\n[last_run_executable_exit_code] - Kod zakończenia ostatniej uruchomionej akcji wykonywalnej\n[last_run_executable_output] - Dane wyjściowe ostatniej akcji wykonywalnej uruchomienia (tylko dla użytkowników innych niż root)\n[last_calendar_title] - Tytuł ostatniego wydarzenia w kalendarzu wyzwalającego regułę\n[last_calendar_description] - opis ostatniego wydarzenia w kalendarzu wyzwalającego regułę\n[last_calendar_location] - Lokalizacja ostatniego zdarzenia w kalendarzu wyzwalającego regułę\n[variable-VARIABLENAME] - Wartość niestandardowej zmiennej zdefiniowanej przez Ciebie</string>
|
||||
<string name="urlLegend">Zmienne:\nMożesz użyć następujących zmiennych. Po uruchomieniu zostaną one zastąpione odpowiednią wartością na Twoim urządzeniu. Umieść nawiasy w tekście.\n\n[uniqueid] – unikalny identyfikator Twojego urządzenia\n[serialnr] – numer seryjny Twojego urządzenia (< Android 9)\n[latitude] – Twoje urządzenie\ szerokość geograficzna użytkownika\n[longitude] – długość geograficzna Twojego urządzenia\n[phonenr] – numer ostatniego połączenia przychodzącego lub wychodzącego\n[d] – dzień miesiąca, 2 cyfry z zerami na początku\n[m] – Numeryczna reprezentacja miesiąca z zerami na początku\n[Y] — pełna cyfrowa reprezentacja roku, 4 cyfry\n[h] — godzina w formacie 12-godzinnym z zerami na początku\n[H] — format 24-godzinny format godziny z wiodącymi zerami\n[i] - minuty z wiodącymi zerami\n[s] - sekundy z wiodącymi zerami\n[ms] - milisekundy\n[w] - Dzień tygodnia w formie tekstowej\n[F] - Miesiąc w formie tekstowej\n[notificationTitle] - tytuł ostatniego powiadomienia\n[notificationText] - tekst ostatniego powiadomienia\n[last_triggerurl_result] - Wynik ostatniego wykonania akcji triggerUrl\n[last_run_executable_exit_code] - Kod zakończenia ostatniej uruchomionej akcji wykonywalnej\n[last_run_executable_output] - Dane wyjściowe ostatniej akcji wykonywalnej uruchomienia (tylko dla użytkowników innych niż root)\n[last_calendar_title] - Tytuł ostatniego wydarzenia w kalendarzu wyzwalającego regułę\n[last_calendar_description] - opis ostatniego wydarzenia w kalendarzu wyzwalającego regułę\n[last_calendar_location] - Lokalizacja ostatniego zdarzenia w kalendarzu wyzwalającego regułę\n[variable-VARIABLENAME] - Wartość niestandardowej zmiennej zdefiniowanej przez Ciebie</string>
|
||||
<string name="wifi">wifi</string>
|
||||
<string name="activating">Aktywowanie</string>
|
||||
<string name="deactivating">Dezaktywowanie</string>
|
||||
|
@ -65,7 +65,7 @@
|
||||
<string name="end">Конец</string>
|
||||
<string name="save">Сохранить</string>
|
||||
<string name="urlToTrigger">URL для вызова:</string>
|
||||
<string name="urlLegend">Переменные:\nВы можете использовать следующие переменные. При срабатывании они будут заменены соответствующим значением на вашем устройстве. Скобки- часть переменной.\n\n[uniqueid] - уникальный идентификатор\n[serialnr] - серийный номер(< Android 9)\n[latitude] - широта\n[longitude] - долгота\n[phonenr] - Номер последнего входящего или исходящего вызова\n[d] - День месяца, 2 цифры с начальными нулями\n[m] – Месяц, 2 цифры с начальными нулями\n[Y] - Год, 4 цифры\n[h] - 12-часовой формат часа с начальными нулями\n[H] - 24-часовой формат часа с начальными нулями\n[i] - Минуты с начальными нулями\n[s] - Секунды с начальными нулями\n[ms] - миллисекунды\n[notificationTitle] - заголовок последнего уведомления\n[notificationText] - текст последнего уведомления\n[last_triggerurl_result] - Результат последнего выполнения действия triggerUrl\n[last_run_executable_exit_code] - Код выхода последнего выполняемого действия\n[last_run_executable_output] - Выходные данные последнего выполняемого действия (только для некорневых пользователей)\n[last_calendar_title] - Заголовок последнего календарного события, запускающего правило\n[last_calendar_description] - Описание последнего события календаря, активировавшего правило\n[last_calendar_location] - Местоположение последнего календарного события, запускающего правило\n[variable-VARIABLENAME] - Значение переменной, определенной пользователем</string>
|
||||
<string name="urlLegend">Переменные:\nВы можете использовать следующие переменные. При срабатывании они будут заменены соответствующим значением на вашем устройстве. Скобки- часть переменной.\n\n[uniqueid] - уникальный идентификатор\n[serialnr] - серийный номер(< Android 9)\n[latitude] - широта\n[longitude] - долгота\n[phonenr] - Номер последнего входящего или исходящего вызова\n[d] - День месяца, 2 цифры с начальными нулями\n[m] – Месяц, 2 цифры с начальными нулями\n[Y] - Год, 4 цифры\n[h] - 12-часовой формат часа с начальными нулями\n[H] - 24-часовой формат часа с начальными нулями\n[i] - Минуты с начальными нулями\n[s] - Секунды с начальными нулями\n[ms] - миллисекунды\n[w] - День недели в текстовом виде\n[F] - Месяц в текстовом виде\n[notificationTitle] - заголовок последнего уведомления\n[notificationText] - текст последнего уведомления\n[last_triggerurl_result] - Результат последнего выполнения действия triggerUrl\n[last_run_executable_exit_code] - Код выхода последнего выполняемого действия\n[last_run_executable_output] - Выходные данные последнего выполняемого действия (только для некорневых пользователей)\n[last_calendar_title] - Заголовок последнего календарного события, запускающего правило\n[last_calendar_description] - Описание последнего события календаря, активировавшего правило\n[last_calendar_location] - Местоположение последнего календарного события, запускающего правило\n[variable-VARIABLENAME] - Значение переменной, определенной пользователем</string>
|
||||
<string name="wifi">Wi-Fi</string>
|
||||
<string name="activating">Активация</string>
|
||||
<string name="deactivating">Деактивация</string>
|
||||
|
@ -56,7 +56,7 @@
|
||||
<string name="end">结束</string>
|
||||
<string name="save">保存</string>
|
||||
<string name="urlToTrigger">触发网址:</string>
|
||||
<string name="urlLegend">变量:\n您可以使用以下变量。触发后,它们将替换为您设备上的对应值。文本中要包含方括号。\n\n[uniqueid] - 您设备的唯一 ID\n[serialnr] - 您设备的序列号(< Android 9)\n[latitude] - 您设备的纬度\n[longitude] - 您设备的经度\n[phonenr] - 最后来电或去电的号码\n[d] - 日,2 位数字,带前导零\n[m] - 月,数字表示,带前导零\n[Y] - 年,完整数字表示,4 位数字\n[h] - 时,12 小时制,带前导零\n[H] - 时,24 小时制,带前导零\n[i] - 分,带前导零\n[s] - 秒,带前导零\n[ms] - 毫秒\n[notificationTitle] - 最后通知的标题\n[notificationText] - 最后通知的文本\n[last_triggerurl_result] - 上次 triggerUrl 操作执行的结果\n[last_run_executable_exit_code] - 上次运行可执行操作的退出代码\n[last_run_executable_output] - 上次运行可执行操作的输出(仅适用于非 root)\n[variable-变量名] - 自定义变量的值</string>
|
||||
<string name="urlLegend">变量:\n您可以使用以下变量。触发后,它们将替换为您设备上的对应值。文本中要包含方括号。\n\n[uniqueid] - 您设备的唯一 ID\n[serialnr] - 您设备的序列号(< Android 9)\n[latitude] - 您设备的纬度\n[longitude] - 您设备的经度\n[phonenr] - 最后来电或去电的号码\n[d] - 日,2 位数字,带前导零\n[m] - 月,数字表示,带前导零\n[Y] - 年,完整数字表示,4 位数字\n[h] - 时,12 小时制,带前导零\n[H] - 时,24 小时制,带前导零\n[i] - 分,带前导零\n[s] - 秒,带前导零\n[ms] - 毫秒\n[w] - 文本形式的星期几\n[F] - 文本形式的月份\n[notificationTitle] - 最后通知的标题\n[notificationText] - 最后通知的文本\n[last_triggerurl_result] - 上次 triggerUrl 操作执行的结果\n[last_run_executable_exit_code] - 上次运行可执行操作的退出代码\n[last_run_executable_output] - 上次运行可执行操作的输出(仅适用于非 root)\n[variable-变量名] - 自定义变量的值</string>
|
||||
<string name="wifi">WLAN</string>
|
||||
<string name="activating">启用</string>
|
||||
<string name="deactivating">停用</string>
|
||||
|
@ -71,7 +71,7 @@
|
||||
<string name="end">End</string>
|
||||
<string name="save">Save</string>
|
||||
<string name="urlToTrigger">URL to trigger:</string>
|
||||
<string name="urlLegend">Variables:\nYou can use the following variables. Upon triggering they will be replaced with the corresponding value on your device. Include the brackets in your text.\n\n[uniqueid] - Your device\'s unique id\n[serialnr] - Your device\'s serial number (< Android 9)\n[latitude] - Your device\'s latitude\n[longitude] - Your device\'s longitude\n[phonenr] - Number of last incoming or outgoing call\n[d] - Day of the month, 2 digits with leading zeros\n[m] - Numeric representation of a month, with leading zeros\n[Y] - A full numeric representation of a year, 4 digits\n[h] - 12-hour format of an hour with leading zeros\n[H] - 24-hour format of an hour with leading zeros\n[i] - Minutes with leading zeros\n[s] - Seconds, with leading zeros\n[ms] - milliseconds\n[notificationTitle] - title of last notification\n[notificationText] - text of last notification\n[last_triggerurl_result] - The result of the last triggerUrl action execution\n[last_run_executable_exit_code] - The exit code of the last run executable action\n[last_run_executable_output] - The output of the last run executable action (only for non-root)\n[last_calendar_title] - Title of the last rule-triggering calendar event\n[last_calendar_description] - Description of the last rule-triggering calendar event\n[last_calendar_location] - Location of the last rule-triggering calendar event\n[variable-VARIABLENAME] - The value of your custom defined variable</string>
|
||||
<string name="urlLegend">Variables:\nYou can use the following variables. Upon triggering they will be replaced with the corresponding value on your device. Include the brackets in your text.\n\n[uniqueid] - Your device\'s unique id\n[serialnr] - Your device\'s serial number (< Android 9)\n[latitude] - Your device\'s latitude\n[longitude] - Your device\'s longitude\n[phonenr] - Number of last incoming or outgoing call\n[d] - Day of the month, 2 digits with leading zeros\n[m] - Numeric representation of a month, with leading zeros\n[Y] - A full numeric representation of a year, 4 digits\n[h] - 12-hour format of an hour with leading zeros\n[H] - 24-hour format of an hour with leading zeros\n[i] - Minutes with leading zeros\n[s] - Seconds, with leading zeros\n[ms] - milliseconds\n[w] - Day of the week in text form\n[F] - Month in text form\n[notificationTitle] - title of last notification\n[notificationText] - text of last notification\n[last_triggerurl_result] - The result of the last triggerUrl action execution\n[last_run_executable_exit_code] - The exit code of the last run executable action\n[last_run_executable_output] - The output of the last run executable action (only for non-root)\n[last_calendar_title] - Title of the last rule-triggering calendar event\n[last_calendar_description] - Description of the last rule-triggering calendar event\n[last_calendar_location] - Location of the last rule-triggering calendar event\n[variable-VARIABLENAME] - The value of your custom defined variable</string>
|
||||
<string name="wifi">wifi</string>
|
||||
<string name="activating">Activating</string>
|
||||
<string name="deactivating">Deactivating</string>
|
||||
@ -592,7 +592,7 @@
|
||||
<string name="brightnessAuto">automatic brightness</string>
|
||||
<string name="brightnessManual">manual brightness</string>
|
||||
<string name="autoBrightnessNotice">If you use auto brightness the brightness value you use below will probably not be used long.</string>
|
||||
<string name="screenLockSoundNotice">Screenlock sounds cannot automatically be changed anymore on devices running Android version 6.0 or higher. Whatever you set here, it will not work in either direction.</string>
|
||||
<string name="screenLockSoundNotice">Screen lock sounds cannot automatically be changed anymore on devices running Android version 6.0 or higher. Whatever you set here, it will not work in either direction.</string>
|
||||
<string name="startScreen">Start screen</string>
|
||||
<string name="startScreenSummary">Select the screen the applications opens with at start.</string>
|
||||
<string name="executeRulesAndProfilesWithSingleClickTitle">Run rules/profiles with single click.</string>
|
||||
@ -947,4 +947,6 @@
|
||||
<string name="notCharging">not charging</string>
|
||||
<string name="triggerChargingComment">The type will only be evaluated if the device is charging. If not charging is chosen, it will fire at any previous charging type. If you want to evaluate that, consider using the variables trigger/action.</string>
|
||||
<string name="helpTextProfiles">A profile is a collection of settings for ringtones, volumes and other audio related settings that you can have applied from rules or apply it manually.\n\nIt is also possible to query for the last activated profile as a trigger. In the normal case it will only query if the profile was the last activated one (regardless if specific audio settings have been changed in the meantime). But you can also have the individual settings compared.</string>
|
||||
<string name="version143StartOtherActivityHint">In version 1.8.2 it was necessary to revise the way actions to start other programs were saved. Compatibility could not be ensured. Please check and edit your start other activity actions to make sure they are still working.</string>
|
||||
<string name="importChooseFolderNotice">In the following dialog do not try to select specific files, but choose the folder in which the Automation backup files reside. If the choose button is disabled, you have found an Android limitation. In that case try moving the files to a subdirectory first.</string>
|
||||
</resources>
|
12
fastlane/metadata/android/de-DE/changelogs/139.txt
Normal file
12
fastlane/metadata/android/de-DE/changelogs/139.txt
Normal file
@ -0,0 +1,12 @@
|
||||
* Behoben: Overlay-Berechtigung zum Starten einer anderen Programmaktion nur erforderlich, wenn startByActivity() ausgewählt ist
|
||||
* Behoben: Broadcast-Receiver-Trigger löste nichts aus, stürzte aber ab * Behoben: Fehler in Android 14 (nicht in Automation!!) erforderte eine Änderung beim Wählen von MMI-Codes, die ein #-Zeichen enthalten.
|
||||
* Behoben: Speicherberechtigung wurde möglicherweise als nicht erteilt angezeigt, auch wenn sie
|
||||
* Behoben: Ein sehr alter Bugfix wurde auch auf F-Droid- und Google-Play-Editionen angewendet, die irrtümlicherweise nur in der APK-Edition implementiert waren (TimeFrame-Trigger mit Wiederholungen)
|
||||
* Behoben: Seltener Absturz beim Starten des Dienstes
|
||||
* Behoben: Kompensiert für Android-Änderungen, zeitbasierte Trigger sind nun wieder präzise
|
||||
* Hinzugefügt: neue Aktion -> Screenshot machen * Hinzugefügt: Der Ortungsdienst (GPS) kann zwischen den Zuständen umgeschaltet werden, wenn WRITE_SECURE_SETTINGS von einem Computer aus erteilt wurde
|
||||
* Hinzugefügt: triggerUrl-Aktion kann jetzt mit POST und Parametern verwendet werden
|
||||
* Hinzugefügt: Das Ergebnis der triggerUrl-Aktion wird jetzt in einer Variablen gespeichert, wenn Sie es überprüfen möchten
|
||||
* Hinzugefügt: Neuer Auslöser: Kalenderereignisse
|
||||
* Hinzugefügt: Das Ergebnis der runExecutable-Aktion wird jetzt in einer Variablen gespeichert, wenn Sie es überprüfen möchten
|
||||
* Hinzugefügt: Ladeauslöser kann nun zwischen Typen unterscheiden (AC, USB, kabellos)
|
1
fastlane/metadata/android/de-DE/changelogs/141.txt
Normal file
1
fastlane/metadata/android/de-DE/changelogs/141.txt
Normal file
@ -0,0 +1 @@
|
||||
* Kalendar Funktion aus Google Version entfernt
|
3
fastlane/metadata/android/de-DE/changelogs/142.txt
Normal file
3
fastlane/metadata/android/de-DE/changelogs/142.txt
Normal file
@ -0,0 +1,3 @@
|
||||
* Behoben: Kalender Auslöser wird jetzt in Play Version verborgen
|
||||
* Behoben: Parameter wurde beim Starten anderer Apps nicht korrekt übergeben
|
||||
* Behoben: Absturz beim Verlassen der Einstellungen
|
4
fastlane/metadata/android/de-DE/changelogs/143.txt
Normal file
4
fastlane/metadata/android/de-DE/changelogs/143.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Behoben: AndereProgramme-Starten-Aktion wurde überarbeitet, eine Bearbeitung Ihrer Aktionen kann erforderlich sein, um weiterarbeiten zu können
|
||||
* Behoben: Die Aktionsauswahl öffnetein einigen Fällen eine andere Aktion als die Ausgewählte
|
||||
* Behoben: Aktivieren/deaktivieren der Datenverbindung mit root auf älteren Geräten
|
||||
* Hinzugefügt: Wochentag und Monat als Textvariablen hinzugefügt
|
1
fastlane/metadata/android/en-US/changelogs/137.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/137.txt
Normal file
@ -0,0 +1 @@
|
||||
* Fixed: Corrected multiple code points that caused crashes when targetApk > 31 (affected only Google Play version)
|
1
fastlane/metadata/android/en-US/changelogs/141.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/141.txt
Normal file
@ -0,0 +1 @@
|
||||
* Calendar trigger removed from Google version
|
3
fastlane/metadata/android/en-US/changelogs/142.txt
Normal file
3
fastlane/metadata/android/en-US/changelogs/142.txt
Normal file
@ -0,0 +1,3 @@
|
||||
* Fixed: Calendar trigger hidden from Play version
|
||||
* Fixed: Parameters not correctly supplied when starting other apps
|
||||
* Fixed: Crash when exiting settings while service is running
|
4
fastlane/metadata/android/en-US/changelogs/143.txt
Normal file
4
fastlane/metadata/android/en-US/changelogs/143.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Fixed: Start other program action revised, editing of your actions may be necessary to continue working
|
||||
* Fixed: Action type menu would in some cases pick up another action than selected
|
||||
* Fixed: Fix while toggling data connection with root on older devices
|
||||
* Added: Day of week and month added as text variables
|
14
fastlane/metadata/android/es-ES/changelogs/139.txt
Normal file
14
fastlane/metadata/android/es-ES/changelogs/139.txt
Normal file
@ -0,0 +1,14 @@
|
||||
* Corregido: El permiso de superposición para iniciar otra acción del programa solo se requiere si se selecciona startByActivity()
|
||||
* Corregido: El disparador del receptor de transmisión no activaba nada, pero se bloqueaba
|
||||
* Corregido: El error en Android 14 (no en Automatización!!) requería un cambio al marcar códigos MMI que contenían un carácter #.
|
||||
* Corregido: El permiso de almacenamiento podía mostrarse como no concedido incluso si se
|
||||
* Corregido: Se aplicó una corrección de errores muy antigua también a las ediciones F-Droid y Google-Play que por error se había implementado solo en la edición APK (disparador de timeFrame con repeticiones)
|
||||
* Corregido: Raro bloqueo al iniciar el servicio
|
||||
* Corregido: Compensado por los cambios de Android, los disparadores basados en el tiempo ahora son precisos nuevamente
|
||||
* Añadido: nueva acción -> tomar captura de pantalla
|
||||
* Agregado: El servicio de ubicación (GPS) se puede alternar entre estados si WRITE_SECURE_SETTINGS se ha otorgado desde una computadora
|
||||
* Añadido: la acción triggerUrl ahora se puede usar con POST y parámetros
|
||||
* Añadido: El resultado de la acción triggerUrl ahora se almacena en una variable si desea verificarlo
|
||||
* Añadido: Nuevo activador: Eventos de calendario
|
||||
* Añadido: El resultado de la acción runExecutable ahora se almacena en una variable si desea comprobarlo
|
||||
* Añadido: El gatillo de carga ahora puede diferenciar entre tipos (CA, USB, de forma inalámbrica)
|
1
fastlane/metadata/android/es-ES/changelogs/141.txt
Normal file
1
fastlane/metadata/android/es-ES/changelogs/141.txt
Normal file
@ -0,0 +1 @@
|
||||
* Eliminado el activador de calendario de la versión de Google
|
3
fastlane/metadata/android/es-ES/changelogs/142.txt
Normal file
3
fastlane/metadata/android/es-ES/changelogs/142.txt
Normal file
@ -0,0 +1,3 @@
|
||||
* Corregido: Condición de calendario ahora es oculto en la versión Play
|
||||
* Corregido: Los parámetros no se suministran correctamente al iniciar otras aplicaciones
|
||||
* Corregido: Bloqueo al salir de la configuración mientras el servicio se está ejecutando
|
4
fastlane/metadata/android/es-ES/changelogs/143.txt
Normal file
4
fastlane/metadata/android/es-ES/changelogs/143.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Corregido: Iniciar otra acción del programa revisada, puede ser necesario editar sus acciones para continuar trabajando
|
||||
* Corregido: El menú de tipo de acción en algunos casos recogía otra acción que la seleccionada
|
||||
* Solucionado: Solucionado al alternar la conexión de datos con root en dispositivos más antiguos
|
||||
* Añadido: Día de la semana y mes añadidos como variables de texto
|
12
fastlane/metadata/android/fr-FR/changelogs/139.txt
Normal file
12
fastlane/metadata/android/fr-FR/changelogs/139.txt
Normal file
@ -0,0 +1,12 @@
|
||||
* Corrigé : Autorisation de superposition pour démarrer une autre action de programme requise uniquement si startByActivity() est sélectionnée
|
||||
* Corrigé : Le déclenchement du récepteur de diffusion ne déclenchait rien, mais plantait
|
||||
* Corrigé : Un bug dans Android 14 (pas dans Automation !!) nécessitait un changement lors de la composition des codes MMI contenant un caractère #.
|
||||
* Résolu : L'autorisation de stockage pouvait être affichée comme n'ayant pas été accordée, même si elle l'était
|
||||
* Corrigé : Correction d'un très ancien bug également sur les éditions F-Droid et Google-Play qui n'avait été implémenté par erreur que dans l'édition APK (déclencheur timeFrame avec répétitions)
|
||||
* Corrigé : Crash rare lors du démarrage du service
|
||||
* Corrigé : Corrigé des changements d'Android, les déclencheurs basés sur le temps sont à nouveau précis
|
||||
* Ajouté : nouvelle action > prendre une capture d'écran * Ajouté : Le service de localisation (GPS) peut être basculé entre les états s'WRITE_SECURE_SETTINGS a été accordé à partir d'un ordinateur
|
||||
* Ajout : l'action triggerUrl peut maintenant être utilisée avec l'auto-test de démarrage (POST) et les paramètres
|
||||
* Ajouté : Le résultat de l'action triggerUrl est maintenant stocké dans une variable si vous souhaitez le vérifier
|
||||
* Ajout : Nouveau déclencheur : Événements de calendrier * Ajouté : Le résultat de l'action runExecutable est maintenant stocké dans une variable si vous souhaitez le vérifier
|
||||
* Ajouté : La gâchette de charge peut désormais différencier les types (AC, USB, sans fil)
|
1
fastlane/metadata/android/fr-FR/changelogs/141.txt
Normal file
1
fastlane/metadata/android/fr-FR/changelogs/141.txt
Normal file
@ -0,0 +1 @@
|
||||
* Déclencheur d'agenda supprimé de la version Google
|
3
fastlane/metadata/android/fr-FR/changelogs/142.txt
Normal file
3
fastlane/metadata/android/fr-FR/changelogs/142.txt
Normal file
@ -0,0 +1,3 @@
|
||||
* Correction : Déclencheur de calendrier caché dans la version Play
|
||||
* Correction : Les paramètres n'étaient pas correctement fournis lors du démarrage d'autres applications
|
||||
* Correction : Plantage lors de la fermeture des paramètres pendant l'exécution du service
|
4
fastlane/metadata/android/fr-FR/changelogs/143.txt
Normal file
4
fastlane/metadata/android/fr-FR/changelogs/143.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Corrigé : Démarrer d'autres actions du programme révisées, l'édition de vos actions peut être nécessaire pour continuer à travailler
|
||||
* Correction : Dans certains cas, le menu de type d'action récupérait une autre action que celle sélectionnée
|
||||
* Correction : Correction lors du basculement de la connexion de données avec root sur les appareils plus anciens
|
||||
* Ajouté : le jour de la semaine et le mois ajoutés en tant que variables de texte
|
14
fastlane/metadata/android/it-IT/changelogs/139.txt
Normal file
14
fastlane/metadata/android/it-IT/changelogs/139.txt
Normal file
@ -0,0 +1,14 @@
|
||||
* Risolto: l'autorizzazione di sovrapposizione per l'avvio di un'altra azione del programma è richiesta solo se è selezionato startByActivity()
|
||||
* Risolto: il trigger del ricevitore di trasmissione non attivava nulla, ma si bloccava
|
||||
* Risolto: un bug in Android 14 (non in Automazione!!) richiedeva una modifica durante la composizione dei codici MMI contenenti un carattere #.
|
||||
* Risolto: l'autorizzazione di archiviazione poteva essere visualizzata come non concessa anche se lo era
|
||||
* Risolto: Applicato un bug molto vecchio anche alle edizioni F-Droid e Google-Play che per errore era stato implementato solo nell'edizione APK (trigger timeFrame con ripetizioni)
|
||||
* Risolto: raro crash durante l'avvio del servizio
|
||||
* Risolto: compensato per le modifiche di Android, i trigger basati sul tempo ora sono di nuovo precisi
|
||||
* Aggiunto: nuova azione -> fai screenshot
|
||||
* Aggiunto: il servizio di localizzazione (GPS) può essere commutato tra gli stati se WRITE_SECURE_SETTINGS è stato concesso da un computer
|
||||
* Aggiunto: l'azione triggerUrl può ora essere utilizzata con POST e parametri
|
||||
* Aggiunto: il risultato dell'azione triggerUrl è ora memorizzato in una variabile se si desidera controllarlo
|
||||
* Aggiunto: Nuovo trigger: Eventi del calendario
|
||||
* Aggiunto: il risultato dell'azione runExecutable è ora memorizzato in una variabile se si desidera controllarlo
|
||||
* Aggiunto: il trigger di ricarica ora può distinguere tra i tipi (AC, USB, wireless)
|
1
fastlane/metadata/android/it-IT/changelogs/141.txt
Normal file
1
fastlane/metadata/android/it-IT/changelogs/141.txt
Normal file
@ -0,0 +1 @@
|
||||
* Il trigger del calendario è stato rimosso dalla versione Google
|
3
fastlane/metadata/android/it-IT/changelogs/142.txt
Normal file
3
fastlane/metadata/android/it-IT/changelogs/142.txt
Normal file
@ -0,0 +1,3 @@
|
||||
* Risolto: trigger del calendario nascosto dalla versione Play
|
||||
* Risolto: parametri non forniti correttamente all'avvio di altre app
|
||||
* Risolto: arresto anomalo quando si esce dalle impostazioni mentre il servizio è in esecuzione
|
4
fastlane/metadata/android/it-IT/changelogs/143.txt
Normal file
4
fastlane/metadata/android/it-IT/changelogs/143.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Risolto: Avvia altre azioni del programma riviste, potrebbe essere necessaria la modifica delle tue azioni per continuare a lavorare
|
||||
* Risolto: il menu del tipo di azione in alcuni casi riprendeva un'azione diversa da quella selezionata
|
||||
* Risolto: risolto il problema durante l'attivazione della connessione dati con root su dispositivi meno recenti
|
||||
* Aggiunto: giorno della settimana e mese aggiunti come variabili di testo
|
14
fastlane/metadata/android/nl-NL/changelogs/139.txt
Normal file
14
fastlane/metadata/android/nl-NL/changelogs/139.txt
Normal file
@ -0,0 +1,14 @@
|
||||
* Opgelost: overlay-toestemming voor het starten van een andere programmaactie is alleen vereist als startByActivity() is geselecteerd
|
||||
* Opgelost: de trigger van de uitzendontvanger zou niets activeren, maar crashen
|
||||
* Opgelost: bug in Android 14 (niet in Automation!!) vereiste een wijziging bij het kiezen van MMI-codes met een #-teken.
|
||||
* Opgelost: opslagtoestemming kan worden weergegeven als niet verleend, zelfs als dit wel het geval was
|
||||
* Opgelost: een zeer oude bugfix ook toegepast op F-Droid- en Google-Play-edities die per ongeluk alleen in de APK-editie waren geïmplementeerd (timeFrame-trigger met herhalingen)
|
||||
* Opgelost: zeldzame crash tijdens het starten van de service
|
||||
* Opgelost: gecompenseerd voor Android-wijzigingen, op tijd gebaseerde triggers zijn nu weer nauwkeurig
|
||||
* Toegevoegd: nieuwe actie > screenshot maken
|
||||
* Toegevoegd: Locatieservice (GPS) kan worden omgeschakeld tussen staten als WRITE_SECURE_SETTINGS is verleend vanaf een computer
|
||||
* Toegevoegd: triggerUrl-actie kan nu worden gebruikt met POST en parameters
|
||||
* Toegevoegd: Resultaat van triggerUrl-actie wordt nu opgeslagen in een variabele als u deze wilt controleren
|
||||
* Toegevoegd: Nieuwe trigger: Agenda-afspraken
|
||||
* Toegevoegd: Resultaat van runExecutable actie wordt nu opgeslagen in een variabele als u deze wilt controleren
|
||||
* Toegevoegd: oplaadtrigger kan nu onderscheid maken tussen typen (AC, USB, draadloos)
|
1
fastlane/metadata/android/nl-NL/changelogs/141.txt
Normal file
1
fastlane/metadata/android/nl-NL/changelogs/141.txt
Normal file
@ -0,0 +1 @@
|
||||
* Agendatrigger verwijderd uit Google-versie
|
3
fastlane/metadata/android/nl-NL/changelogs/142.txt
Normal file
3
fastlane/metadata/android/nl-NL/changelogs/142.txt
Normal file
@ -0,0 +1,3 @@
|
||||
* Opgelost: kalendertrigger verborgen voor Play-versie
|
||||
* Opgelost: parameters worden niet correct opgegeven bij het starten van andere apps
|
||||
* Opgelost: crash bij het afsluiten van instellingen terwijl de service actief is
|
4
fastlane/metadata/android/nl-NL/changelogs/143.txt
Normal file
4
fastlane/metadata/android/nl-NL/changelogs/143.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Opgelost: start andere programma-actie herzien, het bewerken van uw acties kan nodig zijn om door te gaan met werken
|
||||
* Opgelost: het menu van het actietype zou in sommige gevallen een andere actie oppikken dan geselecteerd
|
||||
* Opgelost: oplossing tijdens het schakelen tussen gegevensverbinding met root op oudere apparaten
|
||||
* Toegevoegd: Dag van de week en maand toegevoegd als tekstvariabelen
|
14
fastlane/metadata/android/pl-PL/changelogs/139.txt
Normal file
14
fastlane/metadata/android/pl-PL/changelogs/139.txt
Normal file
@ -0,0 +1,14 @@
|
||||
* Naprawiono: Uprawnienie nakładki do uruchamiania innej akcji programu jest wymagane tylko wtedy, gdy wybrano startByActivity()
|
||||
* Naprawiono: Wyzwalacz odbiornika transmisji nie uruchamiał niczego, ale zawieszał się
|
||||
* Naprawiono: Błąd w Androidzie 14 (nie w Automation!!) wymagał zmiany podczas wybierania kodów MMI zawierających znak #.
|
||||
* Naprawiono: Uprawnienie do przechowywania może być wyświetlane jako nieprzyznane, nawet jeśli było
|
||||
* Naprawiono: Zastosowano bardzo starą poprawkę błędu również do edycji F-Droid i Google-Play, która przez pomyłkę została zaimplementowana tylko w edycji APK (wyzwalacz timeFrame z powtórzeniami)
|
||||
* Naprawiono: Rzadka awaria podczas uruchamiania usługi
|
||||
* Naprawiono: Zrekompensowano zmiany w Androidzie, wyzwalacze oparte na czasie są teraz ponownie precyzyjne
|
||||
* Dodano: nowa akcja -> zrób zrzut ekranu
|
||||
* Dodano: Usługa lokalizacyjna (GPS) może być przełączana między stanami, jeśli WRITE_SECURE_SETTINGS została przyznana z komputera
|
||||
* Dodano: akcja triggerUrl może być teraz używana z POST i parametrami
|
||||
* Dodano: Wynik akcji triggerUrl jest teraz przechowywany w zmiennej, jeśli chcesz to sprawdzić
|
||||
* Dodano: Nowy wyzwalacz: Wydarzenia w kalendarzu
|
||||
* Dodano: Wynik akcji runExecutable jest teraz przechowywany w zmiennej, jeśli chcesz to sprawdzić
|
||||
* Dodano: Wyzwalacz ładowania może teraz rozróżniać typy (AC, USB, bezprzewodowo)
|
1
fastlane/metadata/android/pl-PL/changelogs/141.txt
Normal file
1
fastlane/metadata/android/pl-PL/changelogs/141.txt
Normal file
@ -0,0 +1 @@
|
||||
* Wyzwalacz kalendarza usunięty z wersji Google
|
3
fastlane/metadata/android/pl-PL/changelogs/142.txt
Normal file
3
fastlane/metadata/android/pl-PL/changelogs/142.txt
Normal file
@ -0,0 +1,3 @@
|
||||
* Naprawiono: Wyzwalacz kalendarza ukryty w wersji Play
|
||||
* Naprawiono: Parametry nie są poprawnie dostarczane podczas uruchamiania innych aplikacji
|
||||
* Naprawiono: Awaria podczas wychodzenia z ustawień, gdy usługa jest uruchomiona
|
4
fastlane/metadata/android/pl-PL/changelogs/143.txt
Normal file
4
fastlane/metadata/android/pl-PL/changelogs/143.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Naprawiono: Poprawiono uruchamianie innych akcji programu, może być konieczna edycja twoich działań do kontynuowania pracy
|
||||
* Poprawka: Menu typu akcji w niektórych przypadkach wybierało inną akcję niż wybrana
|
||||
* Naprawiono: Napraw podczas przełączania połączenia danych z rootem na starszych urządzeniach
|
||||
* Dodano: Dzień tygodnia i miesiąc dodane jako zmienne tekstowe
|
14
fastlane/metadata/android/ru-RU/changelogs/139.txt
Normal file
14
fastlane/metadata/android/ru-RU/changelogs/139.txt
Normal file
@ -0,0 +1,14 @@
|
||||
* Исправлено: Разрешение на оверлей для запуска других действий программы требуется только в том случае, если выбран startByActivity()
|
||||
* Исправлено: Триггер широковещательного приемника не вызывал ничего, кроме сбоя.
|
||||
* Исправлено: Ошибка в Android 14 (не в Automation!!) требовала изменения при наборе кодов MMI, содержащих символ #.
|
||||
* Исправлено: Разрешение на хранение могло отображаться как не предоставленное, даже если оно было
|
||||
* Исправлено: Применено очень старое исправление ошибки также к редакциям F-Droid и Google-Play, которые по ошибке были реализованы только в редакции APK (триггер timeFrame с повторами)
|
||||
* Исправлено: редкий сбой при запуске сервиса.
|
||||
* Исправлено: Компенсированы изменения Android, триггеры, основанные на времени, теперь снова точны
|
||||
* Добавлено: новое действие -> сделать скриншот
|
||||
* Добавлено: Служба определения местоположения (GPS) может переключаться между состояниями, если WRITE_SECURE_SETTINGS было предоставлено с компьютера.
|
||||
* Добавлено: действие triggerUrl теперь можно использовать с POST и параметрами
|
||||
* Добавлено: Результат действия triggerUrl теперь сохраняется в переменной, если вы хотите проверить это
|
||||
* Добавлено: Новый триггер: События календаря
|
||||
* Добавлено: Результат действия runExecutable теперь сохраняется в переменной, если вы хотите проверить это
|
||||
* Добавлено: Триггер зарядки теперь может различать типы (переменный ток, USB, беспроводная связь)
|
1
fastlane/metadata/android/ru-RU/changelogs/141.txt
Normal file
1
fastlane/metadata/android/ru-RU/changelogs/141.txt
Normal file
@ -0,0 +1 @@
|
||||
* Триггер календаря удален из версии Google
|
3
fastlane/metadata/android/ru-RU/changelogs/142.txt
Normal file
3
fastlane/metadata/android/ru-RU/changelogs/142.txt
Normal file
@ -0,0 +1,3 @@
|
||||
* Исправлено: Триггер календаря скрыт в игровой версии
|
||||
* Исправлено: Параметры неправильно указываются при запуске других приложений.
|
||||
* Исправлено: Сбой при выходе из настроек во время работы сервиса
|
4
fastlane/metadata/android/ru-RU/changelogs/143.txt
Normal file
4
fastlane/metadata/android/ru-RU/changelogs/143.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* Исправлено: Запуск другого действия программы пересмотрен, редактирование ваших действий может потребоваться для продолжения работы
|
||||
* Исправлено: Меню типа действия в некоторых случаях подхватывало действие, отличное от выбранного
|
||||
* Исправлено: Исправление при переключении подключения к данным с root на старых устройствах
|
||||
* Добавлено: День недели и месяц добавлены в качестве текстовых переменных
|
13
fastlane/metadata/android/zh-CN/changelogs/139.txt
Normal file
13
fastlane/metadata/android/zh-CN/changelogs/139.txt
Normal file
@ -0,0 +1,13 @@
|
||||
* 修复:只有在选择了 startByActivity() 时才需要启动其他程序操作的叠加权限
|
||||
* 修复:广播接收机触发不会触发任何内容,但会崩溃
|
||||
* 已修复:Android 14(不在 Automation!! 中)中的错误在拨打包含 # 字符的 MMI 代码时需要更改。
|
||||
* 修复:存储权限可能显示为未授予,即使已授予
|
||||
* 修复:将一个非常古老的错误修复也应用于 F-Droid 和 Google-Play 版本,这些版本错误地仅在 APK 版本中实现(具有重复的 timeFrame 触发器)
|
||||
* 修复:启动服务时罕见崩溃
|
||||
* 已修复:补偿了 Android 更改,基于时间的触发器现在再次精确
|
||||
* 新增:新动作 ->截图 * 新增:定位服务 (GPS) 可以在各州之间切换,前提是已从计算机授予WRITE_SECURE_SETTINGS
|
||||
* 新增:triggerUrl 操作现在可以与 POST 和参数一起使用
|
||||
* 新增:triggerUrl 操作的结果现在存储在变量中,如果您想检查它
|
||||
* 新增:新触发器:日历事件
|
||||
* 新增:runExecutable 操作的结果现在存储在变量中,如果您想检查它
|
||||
* 新增:充电触发器现在可以区分类型(交流、USB、无线)
|
1
fastlane/metadata/android/zh-CN/changelogs/141.txt
Normal file
1
fastlane/metadata/android/zh-CN/changelogs/141.txt
Normal file
@ -0,0 +1 @@
|
||||
* 日历触发器已从 Google 版本中删除
|
3
fastlane/metadata/android/zh-CN/changelogs/142.txt
Normal file
3
fastlane/metadata/android/zh-CN/changelogs/142.txt
Normal file
@ -0,0 +1,3 @@
|
||||
* 修复:播放版本中隐藏的日历触发器
|
||||
* 修复:启动其他应用程序时未正确提供参数的问题
|
||||
* 修复:服务运行时退出设置时崩溃
|
4
fastlane/metadata/android/zh-CN/changelogs/143.txt
Normal file
4
fastlane/metadata/android/zh-CN/changelogs/143.txt
Normal file
@ -0,0 +1,4 @@
|
||||
* 已修复:启动其他程序操作已修改,可能需要编辑您的操作才能继续工作
|
||||
* 已修复:在某些情况下,操作类型菜单会选择所选操作以外的其他操作
|
||||
* 已修复:在旧设备上使用 root 切换数据连接时修复
|
||||
* 添加:作为文本变量添加的星期几和月份
|
Reference in New Issue
Block a user