Compare commits

..

26 Commits

Author SHA1 Message Date
Jens
ab98b4d1db Build number changed because of Google Play version 2023-01-14 22:20:31 +01:00
Jens
6b32301894 New version prepared 2023-01-14 21:55:52 +01:00
Jens
d9cdfab828 French translation updated 2023-01-13 22:52:45 +01:00
62a8723344 Setting ringtones from profiles works again 2023-01-13 18:48:00 +01:00
2b69938ad5 corrected date variables 2023-01-09 20:13:17 +01:00
c42f65bd3a corrected date variables 2023-01-05 20:39:29 +01:00
Jens
ad0d9962b5 trim()s inserted 2023-01-01 23:51:51 +01:00
58f24953f3 startByService() 2023-01-01 20:13:34 +01:00
3d212456e6 tests 2022-12-24 02:27:35 +01:00
Jens
fff0a28310 mms 2022-11-16 22:42:25 +01:00
48da91cb40 send mms with attachment 2022-11-13 17:49:02 +01:00
Jens
98df050f42 mms 2022-11-10 23:06:07 +01:00
Jens
93cb72ac2f cosmetics 2022-11-05 23:10:23 +01:00
713228c06e send mms with attachment 2022-10-30 15:04:09 +01:00
c868d45896 variables as triggers and actions 2022-10-09 17:14:02 +02:00
4abce042eb stop phone call action 2022-10-03 20:16:56 +02:00
62034e1b10 stop phone call action 2022-10-03 13:22:25 +02:00
Jens
135f4594be call phone 2022-10-02 23:26:27 +02:00
900aaf3c8c Merge remote-tracking branch 'origin/development' into development 2022-10-02 19:00:40 +02:00
5baa40ed59 make phone call action 2022-10-02 18:59:54 +02:00
Jens
759e8076c3 translation syntax 2022-09-30 22:37:30 +02:00
Jens
17b9f19dc2 Description text about run executable improved 2022-09-22 23:15:53 +02:00
Jens
374a5c4263 confirmation dialog for deletions 2022-09-21 23:29:54 +02:00
Jens
2fd79140cb possible fix 2022-09-05 23:53:22 +02:00
a0910e620f cosmetics 2022-09-02 19:31:00 +02:00
Jens
475c1719d7 translation 2022-08-29 23:06:08 +02:00
56 changed files with 1799 additions and 586 deletions

View File

@ -11,8 +11,8 @@ android {
compileSdkVersion 31 compileSdkVersion 31
buildToolsVersion '29.0.2' buildToolsVersion '29.0.2'
useLibrary 'org.apache.http.legacy' useLibrary 'org.apache.http.legacy'
versionCode 122 versionCode 124
versionName "1.7.7" versionName "1.7.9"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
@ -36,7 +36,7 @@ android {
{ {
dimension "version" dimension "version"
versionNameSuffix "-googlePlay" versionNameSuffix "-googlePlay"
targetSdkVersion 30 targetSdkVersion 31
} }
fdroidFlavor fdroidFlavor

View File

@ -66,6 +66,8 @@
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/> <uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/> <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/> <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.ANSWER_PHONE_CALLS" />
<uses-feature <uses-feature
android:name="android.hardware.telephony" android:name="android.hardware.telephony"
@ -171,6 +173,10 @@
<activity android:name=".ActivityManageTriggerTethering" /> <activity android:name=".ActivityManageTriggerTethering" />
<activity android:name=".ActivityManageActionWakeLock" /> <activity android:name=".ActivityManageActionWakeLock" />
<activity android:name=".ActivityManageTriggerSubSystemState" /> <activity android:name=".ActivityManageTriggerSubSystemState" />
<activity android:name=".ActivityManageActionMakePhoneCall" />
<activity android:name=".ActivityManageActionSetVariable" />
<activity android:name=".ActivityManageTriggerCheckVariable" />
<activity <activity
android:name=".ActivityMainTabLayout" android:name=".ActivityMainTabLayout"
android:launchMode="singleTask"> android:launchMode="singleTask">

View File

@ -107,7 +107,7 @@ public class Rule implements Comparable<Rule>
} }
public void setName(String name) public void setName(String name)
{ {
this.name = name; this.name = name.trim();
} }
public static void readFromFile() public static void readFromFile()

View File

@ -64,6 +64,8 @@
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/> <uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/> <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/> <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.ANSWER_PHONE_CALLS" />
<uses-feature <uses-feature
android:name="android.hardware.telephony" android:name="android.hardware.telephony"
@ -169,6 +171,9 @@
<activity android:name=".ActivityManageTriggerTethering" /> <activity android:name=".ActivityManageTriggerTethering" />
<activity android:name=".ActivityManageActionWakeLock" /> <activity android:name=".ActivityManageActionWakeLock" />
<activity android:name=".ActivityManageTriggerSubSystemState" /> <activity android:name=".ActivityManageTriggerSubSystemState" />
<activity android:name=".ActivityManageMakePhoneCall" />
<activity android:name=".ActivityManageActionSetVariable" />
<activity android:name=".ActivityManageTriggerCheckVariable" />
<activity <activity
android:name=".ActivityMainTabLayout" android:name=".ActivityMainTabLayout"
android:launchMode="singleTask"> android:launchMode="singleTask">

View File

@ -104,7 +104,7 @@ public class Rule implements Comparable<Rule>
} }
public void setName(String name) public void setName(String name)
{ {
this.name = name; this.name = name.trim();
} }
public static void readFromFile() public static void readFromFile()

View File

@ -111,6 +111,7 @@
</intent-filter> </intent-filter>
</receiver> </receiver>
<receiver android:name=".receivers.PackageReplacedReceiver" <receiver android:name=".receivers.PackageReplacedReceiver"
android:exported="true"
android:enabled="true"> android:enabled="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" /> <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
@ -122,6 +123,7 @@
<receiver <receiver
android:name=".DeviceAdmin" android:name=".DeviceAdmin"
android:exported="true"
android:description="@string/app_name" android:description="@string/app_name"
android:label="@string/app_name" android:label="@string/app_name"
android:permission= "android.permission.BIND_DEVICE_ADMIN" > android:permission= "android.permission.BIND_DEVICE_ADMIN" >
@ -156,8 +158,11 @@
<activity android:name=".ActivityManageTriggerTethering" /> <activity android:name=".ActivityManageTriggerTethering" />
<activity android:name=".ActivityManageActionWakeLock" /> <activity android:name=".ActivityManageActionWakeLock" />
<activity android:name=".ActivityManageTriggerSubSystemState" /> <activity android:name=".ActivityManageTriggerSubSystemState" />
<activity android:name=".ActivityManageActionSetVariable" />
<activity android:name=".ActivityManageTriggerCheckVariable" />
<activity <activity
android:name=".ActivityMainTabLayout" android:name=".ActivityMainTabLayout"
android:exported="true"
android:launchMode="singleTask"> android:launchMode="singleTask">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@ -206,6 +211,7 @@
<service <service
android:name=".receivers.NotificationListener" android:name=".receivers.NotificationListener"
android:exported="true"
android:label="@string/app_name" android:label="@string/app_name"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" > android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" >
<intent-filter> <intent-filter>

View File

@ -107,7 +107,7 @@ public class Rule implements Comparable<Rule>
} }
public void setName(String name) public void setName(String name)
{ {
this.name = name; this.name = name.trim();
} }
public static void readFromFile() public static void readFromFile()

View File

@ -6,8 +6,6 @@ import android.os.Build;
import android.util.Log; import android.util.Log;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.RequiresApi;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpGet;
@ -54,6 +52,9 @@ public class Action
sendBroadcast, sendBroadcast,
runExecutable, runExecutable,
wakelock, wakelock,
setVariable,
startPhoneCall,
stopPhoneCall,
sendTextMessage; sendTextMessage;
public String getFullName(Context context) public String getFullName(Context context)
@ -130,6 +131,12 @@ public class Action
return context.getResources().getString(R.string.runExecutable); return context.getResources().getString(R.string.runExecutable);
case wakelock: case wakelock:
return context.getResources().getString(R.string.keepDeviceAwake); return context.getResources().getString(R.string.keepDeviceAwake);
case setVariable:
return context.getResources().getString(R.string.setVariable);
case startPhoneCall:
return context.getResources().getString(R.string.startPhoneCall);
case stopPhoneCall:
return context.getResources().getString(R.string.endPhoneCall);
default: default:
return "Unknown"; return "Unknown";
} }
@ -279,6 +286,22 @@ public class Action
case wakelock: case wakelock:
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.keepDeviceAwake) + " (" + String.valueOf(getParameter1()) + ")"); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.keepDeviceAwake) + " (" + String.valueOf(getParameter1()) + ")");
break; break;
case setVariable:
String[] variableParams = getParameter2().split(actionParameter2Split);
String addition;
if (variableParams.length >= 2)
addition = " (key: " + variableParams[0] + ", value: " + variableParams[1] + ")";
else
addition = " (delete key: " + variableParams[0] + ")";
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.setVariable) + addition);
break;
case startPhoneCall:
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.startPhoneCall));
break;
case stopPhoneCall:
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.endPhoneCall));
break;
default: default:
returnString.append(action.toString()); returnString.append(action.toString());
} }
@ -337,24 +360,24 @@ public class Action
if (parts.length > 4 && !StringUtils.isBlank(parts[4])) if (parts.length > 4 && !StringUtils.isBlank(parts[4]))
returnString.append(", " + Miscellaneous.getAnyContext().getResources().getString(R.string.ifString) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.text) + " " + Trigger.getMatchString(parts[3]) + " " + parts[4]); returnString.append(", " + Miscellaneous.getAnyContext().getResources().getString(R.string.ifString) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.text) + " " + Trigger.getMatchString(parts[3]) + " " + parts[4]);
if(parts.length >= 6) if (parts.length >= 6)
{ {
if(!parts[5].equals(ActivityManageActionCloseNotification.dismissRegularString)) if (!parts[5].equals(ActivityManageActionCloseNotification.dismissRegularString))
{ {
returnString.append(" " + String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.withButton), parts[5])); returnString.append(" " + String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.withButton), parts[5]));
} }
} }
} }
else if(this.getAction().equals(Action_Enum.setWifi)) else if (this.getAction().equals(Action_Enum.setWifi))
{ {
if(!StringUtils.isEmpty(this.parameter2)) if (!StringUtils.isEmpty(this.parameter2))
{ {
boolean useRoot = Boolean.parseBoolean(this.parameter2); boolean useRoot = Boolean.parseBoolean(this.parameter2);
if(useRoot) if (useRoot)
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.usingRoot)); returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.usingRoot));
} }
} }
else if(this.getAction().equals(Action_Enum.controlMediaPlayback)) else if (this.getAction().equals(Action_Enum.controlMediaPlayback))
{ {
returnString.append(": "); returnString.append(": ");
@ -382,10 +405,12 @@ public class Action
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.unknown)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.unknown));
} }
} }
else if(this.getAction().equals(Action_Enum.sendBroadcast)) else if (this.getAction().equals(Action_Enum.sendBroadcast))
{ {
returnString.append(": " + parameter2.replace(Action.actionParameter2Split, "; ").replace(Action.intentPairSeparator, "/")); returnString.append(": " + parameter2.replace(Action.actionParameter2Split, "; ").replace(Action.intentPairSeparator, "/"));
} }
else if (this.getAction().equals(Action_Enum.setVariable))
; // it's completed further above already
else if (parameter2 != null && parameter2.length() > 0) else if (parameter2 != null && parameter2.length() > 0)
returnString.append(": " + parameter2.replace(Action.actionParameter2Split, "; ")); returnString.append(": " + parameter2.replace(Action.actionParameter2Split, "; "));
} }
@ -590,6 +615,15 @@ public class Action
else else
Actions.wakeLockStop(); Actions.wakeLockStop();
break; break;
case setVariable:
Actions.setVariable(this.getParameter2());
break;
case startPhoneCall:
Actions.startPhoneCall(context, this.getParameter2());
break;
case stopPhoneCall:
Actions.endPhoneCall(context);
break;
default: default:
Miscellaneous.logEvent("w", "Action", context.getResources().getString(R.string.unknownActionSpecified), 3); Miscellaneous.logEvent("w", "Action", context.getResources().getString(R.string.unknownActionSpecified), 3);
break; break;

View File

@ -10,33 +10,32 @@ import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothProfile;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.ComponentName; import android.content.ContentResolver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.media.AudioManager; import android.media.AudioManager;
import android.media.MediaPlayer; import android.media.MediaPlayer;
import android.media.session.MediaController;
import android.media.session.MediaSessionManager;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
import android.net.Uri; import android.net.Uri;
import android.net.wifi.WifiManager; import android.net.wifi.WifiManager;
import android.os.Build; import android.os.Build;
import android.os.Bundle;
import android.os.PowerManager; import android.os.PowerManager;
import android.os.PowerManager.WakeLock; import android.os.PowerManager.WakeLock;
import android.os.VibrationEffect; import android.os.VibrationEffect;
import android.os.Vibrator; import android.os.Vibrator;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification;
import android.telecom.TelecomManager;
import android.telephony.SmsManager; import android.telephony.SmsManager;
import android.telephony.SubscriptionManager; import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.RequiresApi; import androidx.annotation.RequiresApi;
import androidx.legacy.content.WakefulBroadcastReceiver;
import com.jens.automation2.actions.wifi_router.MyOnStartTetheringCallback; import com.jens.automation2.actions.wifi_router.MyOnStartTetheringCallback;
import com.jens.automation2.actions.wifi_router.MyOreoWifiManager; import com.jens.automation2.actions.wifi_router.MyOreoWifiManager;
@ -44,7 +43,6 @@ import com.jens.automation2.location.WifiBroadcastReceiver;
import com.jens.automation2.receivers.ConnectivityReceiver; import com.jens.automation2.receivers.ConnectivityReceiver;
import com.jens.automation2.receivers.NotificationListener; import com.jens.automation2.receivers.NotificationListener;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.HttpClient; import org.apache.http.client.HttpClient;
import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.ClientConnectionManager;
@ -56,6 +54,7 @@ import org.apache.http.impl.client.DefaultHttpClient;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
@ -72,6 +71,7 @@ import java.util.Collections;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Random;
import java.util.Set; import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@ -218,7 +218,35 @@ public class Actions
context.sendBroadcast(broadcastIntent); context.sendBroadcast(broadcastIntent);
} }
public static class WifiStuff public static void setVariable(String parameter2)
{
String[] parts = parameter2.split(Action.actionParameter2Split);
if(AutomationService.isMyServiceRunning(Miscellaneous.getAnyContext()))
{
Map<String,String> map = AutomationService.getInstance().getVariableMap();
if(parts.length > 1)
map.put(parts[0], parts[1]);
else
map.remove(parts[0]);
}
Miscellaneous.logEvent("i", "Variable", "Checking for applicable rules after variable has been set or deleted.", 2);
List<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.checkVariable);
for(int i=0; i<ruleCandidates.size(); i++)
{
if(ruleCandidates.get(i).haveEnoughPermissions() && ruleCandidates.get(i).getsGreenLight(AutomationService.getInstance()))
{
Miscellaneous.logEvent("i", "Variable", "Rule " + ruleCandidates.get(i).getName() + " applies after variable has been set or deleted.", 2);
ruleCandidates.get(i).activate(AutomationService.getInstance(), false);
}
}
Miscellaneous.logEvent("i", "Variable", "Done checking for applicable rules after variable has been set or deleted.", 2);
}
public static class WifiStuff
{ {
public static Boolean setWifi(Context context, Boolean desiredState, String parameter2, boolean toggleActionIfPossible) public static Boolean setWifi(Context context, Boolean desiredState, String parameter2, boolean toggleActionIfPossible)
{ {
@ -1065,6 +1093,8 @@ public class Actions
if (params[2].equals(ActivityManageActionStartActivity.startByActivityString)) if (params[2].equals(ActivityManageActionStartActivity.startByActivityString))
automationServerRef.startActivity(externalActivityIntent); automationServerRef.startActivity(externalActivityIntent);
if (params[2].equals(ActivityManageActionStartActivity.startByServiceString))
automationServerRef.startService(externalActivityIntent);
else else
automationServerRef.sendBroadcast(externalActivityIntent); automationServerRef.sendBroadcast(externalActivityIntent);
} }
@ -1197,21 +1227,37 @@ public class Actions
public static void sendTextMessage(Context context, String[] parametersArray) public static void sendTextMessage(Context context, String[] parametersArray)
{ {
String phoneNumber, message; String phoneNumber, message, messageType = ActivityManageActionSendTextMessage.messageTypeSms, filePath = null;
phoneNumber = parametersArray[0]; phoneNumber = parametersArray[0];
message = parametersArray[1]; message = parametersArray[1];
if(parametersArray.length > 2)
{
messageType = parametersArray[2];
if(parametersArray.length > 3)
filePath = parametersArray[3];
}
try try
{ {
String textToSend = Miscellaneous.replaceVariablesInText(message, context); String textToSend = Miscellaneous.replaceVariablesInText(message, context);
if(messageType.equals("sms"))
sendSmsMessage(phoneNumber, textToSend);
else
sendMmsMessage(phoneNumber, textToSend, filePath);
}
catch (Exception e)
{
Miscellaneous.logEvent("e", Miscellaneous.getAnyContext().getString(R.string.sendTextMessage), "Error in sendTextMessage: " + Log.getStackTraceString(e), 3);
}
}
/* private static void sendSmsMessage(String phoneNumber, String textToSend)
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("sms:" + phoneNumber)); {
intent.putExtra("sms_body", message); try
AutomationService.getInstance().startActivity(intent); {
*/
PendingIntent pi = PendingIntent.getActivity(context, 0, new Intent(context, Actions.class), 0); PendingIntent pi = PendingIntent.getActivity(context, 0, new Intent(context, Actions.class), 0);
SmsManager sms = SmsManager.getDefault(); SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null, textToSend, pi, null); sms.sendTextMessage(phoneNumber, null, textToSend, pi, null);
@ -1222,6 +1268,26 @@ public class Actions
} }
} }
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private static void sendMmsMessage(String phoneNumber, String textToSend, String fileToBeAttached)
{
try
{
Miscellaneous.logEvent("i", "sendMmsMessage()", "Sending MMS message...", 2);
// Uri contentUri = Uri.fromFile(new File(fileToBeAttached));
String str2 = "send." + String.valueOf(Math.abs(new Random().nextLong())) + ".dat";
Uri contentUri = new Uri.Builder().authority(context.getPackageName() + ".MmsFileProvider").path(str2).scheme("content").build();
// Bundle a3 = C3326a.m16196a(new C8792q("enableGroupMms", true), new C8792q("maxMessageSize", Integer.valueOf(C3664a.m17428d())));
SmsManager.getDefault().sendMultimediaMessage(context, contentUri, phoneNumber, null, null);
}
catch (Exception e)
{
Miscellaneous.logEvent("e", "sendMmsMessage()", "Error in sendMmsMessage(): " + Log.getStackTraceString(e), 3);
}
}
private static class WakeUpDeviceClass implements Runnable private static class WakeUpDeviceClass implements Runnable
{ {
private long awakeTime; private long awakeTime;
@ -2192,4 +2258,43 @@ public class Actions
Miscellaneous.logEvent("i", "WakeLockStart", "Requesting stop.", 4); Miscellaneous.logEvent("i", "WakeLockStart", "Requesting stop.", 4);
wakeLockStopRequested = true; wakeLockStopRequested = true;
} }
public static void startPhoneCall(Context context, String phoneNumber)
{
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
// intent.setClassName("com.android.phone","com.android.phone.OutgoingCallBroadcaster");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_FROM_BACKGROUND);
context.startActivity(intent);
}
public static void endPhoneCall(Context context)
{
if(Build.VERSION.SDK_INT < 21)
{
TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
try
{
Class c = Class.forName(tm.getClass().getName());
Method m = c.getDeclaredMethod("getITelephony");
m.setAccessible(true);
Object telephonyService = m.invoke(tm);
c = Class.forName(telephonyService.getClass().getName());
m = c.getDeclaredMethod("endCall");
m.setAccessible(true);
m.invoke(telephonyService);
}
catch (Exception e)
{
e.printStackTrace();
}
}
else
{
TelecomManager mgr = (TelecomManager) context.getSystemService(context.TELECOM_SERVICE);
mgr.endCall();
}
}
} }

View File

@ -190,8 +190,27 @@ public class ActivityMainPoi extends ActivityGeneric
startActivityForResult(manageSpecificPoiIntent, 2000); startActivityForResult(manageSpecificPoiIntent, 2000);
break; break;
case 1: case 1:
if(pointOfInterest.delete(Miscellaneous.getAnyContext())) AlertDialog.Builder deleteDialog = new AlertDialog.Builder(ActivityMainPoi.this);
updateListView(); deleteDialog.setMessage(getResources().getString(R.string.areYouSure));
deleteDialog.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialogInterface, int i)
{
if(pointOfInterest.delete(Miscellaneous.getAnyContext()))
updateListView();
}
});
deleteDialog.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialogInterface, int i)
{
}
});
deleteDialog.show();
break; break;
} }
} }

View File

@ -187,10 +187,29 @@ public class ActivityMainProfiles extends ActivityGeneric
Rule user = profile.isInUseByRules(); Rule user = profile.isInUseByRules();
if(user == null) if(user == null)
{ {
if (profile.delete(ActivityMainProfiles.this)) AlertDialog.Builder deleteDialog = new AlertDialog.Builder(ActivityMainProfiles.this);
updateListView(); deleteDialog.setMessage(getResources().getString(R.string.areYouSure));
else deleteDialog.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener()
Toast.makeText(ActivityMainProfiles.this, getResources().getString(R.string.profileCouldNotBeDeleted), Toast.LENGTH_LONG).show(); {
@Override
public void onClick(DialogInterface dialogInterface, int i)
{
if (profile.delete(ActivityMainProfiles.this))
updateListView();
else
Toast.makeText(ActivityMainProfiles.this, getResources().getString(R.string.profileCouldNotBeDeleted), Toast.LENGTH_LONG).show();
}
});
deleteDialog.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialogInterface, int i)
{
}
});
deleteDialog.show();
} }
else else
Toast.makeText(ActivityMainProfiles.this, String.format(getResources().getString(R.string.ruleXIsUsingProfileY), user.getName(), profile.getName()), Toast.LENGTH_LONG).show(); Toast.makeText(ActivityMainProfiles.this, String.format(getResources().getString(R.string.ruleXIsUsingProfileY), user.getName(), profile.getName()), Toast.LENGTH_LONG).show();

View File

@ -18,6 +18,7 @@ import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.jens.automation2.AutomationService.serviceCommands; import com.jens.automation2.AutomationService.serviceCommands;
import com.jens.automation2.receivers.DateTimeListener; import com.jens.automation2.receivers.DateTimeListener;
@ -213,11 +214,30 @@ public class ActivityMainRules extends ActivityGeneric
startActivityForResult(manageSpecificRuleIntent, requestCodeChangeRule); startActivityForResult(manageSpecificRuleIntent, requestCodeChangeRule);
break; break;
case 2: case 2:
if(ruleThisIsAbout.delete()) AlertDialog.Builder deleteDialog = new AlertDialog.Builder(ActivityMainRules.this);
deleteDialog.setMessage(getResources().getString(R.string.areYouSure));
deleteDialog.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener()
{ {
ruleToEdit = null; //clear cache @Override
updateListView(); public void onClick(DialogInterface dialogInterface, int i)
} {
if(ruleThisIsAbout.delete())
{
ruleToEdit = null; //clear cache
updateListView();
}
}
});
deleteDialog.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialogInterface, int i)
{
}
});
deleteDialog.show();
break; break;
case 3: case 3:
ruleToEdit = ruleThisIsAbout; ruleToEdit = ruleThisIsAbout;

View File

@ -270,9 +270,14 @@ public class ActivityMainScreen extends ActivityGeneric
activityMainScreenInstance.tvMainScreenNotePermissions.setVisibility(View.GONE); activityMainScreenInstance.tvMainScreenNotePermissions.setVisibility(View.GONE);
} }
if(Miscellaneous.restrictedFeaturesConfigured()) if(BuildConfig.FLAVOR.equals(AutomationService.flavor_name_fdroid) && Miscellaneous.restrictedFeaturesConfiguredFdroid())
{ {
activityMainScreenInstance.tvMainScreenNoteFeaturesFromOtherFlavor.setText(R.string.settingsReferringToRestrictedFeatures); activityMainScreenInstance.tvMainScreenNoteFeaturesFromOtherFlavor.setText(R.string.settingsReferringToRestrictedFeaturesInFdroid);
activityMainScreenInstance.tvMainScreenNoteFeaturesFromOtherFlavor.setVisibility(View.VISIBLE);
}
else if(BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay) && Miscellaneous.restrictedFeaturesConfiguredGoogle())
{
activityMainScreenInstance.tvMainScreenNoteFeaturesFromOtherFlavor.setText(R.string.settingsReferringToRestrictedFeaturesInGoogle);
activityMainScreenInstance.tvMainScreenNoteFeaturesFromOtherFlavor.setVisibility(View.VISIBLE); activityMainScreenInstance.tvMainScreenNoteFeaturesFromOtherFlavor.setVisibility(View.VISIBLE);
} }
else else
@ -283,14 +288,6 @@ public class ActivityMainScreen extends ActivityGeneric
if(Miscellaneous.googleToBlameForLocation(true)) if(Miscellaneous.googleToBlameForLocation(true))
{ {
// Intent intent = new Intent(AutomationService.this, ActivityDisplayLongMessage.class);
// intent.putExtra("longMessage", getResources().getString(R.string.locationEngineDisabledLong));
// PendingIntent pi = PendingIntent.getActivity(AutomationService.this, 0, intent, 0);
// if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1)
// Miscellaneous.createDismissableNotificationWithDelay(2200, getResources().getString(R.string.featuresDisabled), notificationIdLocationRestriction, pi);
// else
// Miscellaneous.createDismissableNotification(getResources().getString(R.string.featuresDisabled), notificationIdLocationRestriction, pi);
activityMainScreenInstance.tvMainScreenNoteLocationImpossibleBlameGoogle.setText(R.string.locationEngineDisabledShort); activityMainScreenInstance.tvMainScreenNoteLocationImpossibleBlameGoogle.setText(R.string.locationEngineDisabledShort);
activityMainScreenInstance.tvMainScreenNoteLocationImpossibleBlameGoogle.setVisibility(View.VISIBLE); activityMainScreenInstance.tvMainScreenNoteLocationImpossibleBlameGoogle.setVisibility(View.VISIBLE);
activityMainScreenInstance.tvMainScreenNoteLocationImpossibleBlameGoogle.setOnClickListener(new OnClickListener() activityMainScreenInstance.tvMainScreenNoteLocationImpossibleBlameGoogle.setOnClickListener(new OnClickListener()
@ -315,8 +312,7 @@ public class ActivityMainScreen extends ActivityGeneric
uiUpdateRunning = true; uiUpdateRunning = true;
activityMainScreenInstance.toggleService.setChecked(true); activityMainScreenInstance.toggleService.setChecked(true);
uiUpdateRunning = false; uiUpdateRunning = false;
// if(activityMainScreenInstance.hasWindowFocus())
// {
try try
{ {
PointOfInterest activePoi = PointOfInterest.getActivePoi(); PointOfInterest activePoi = PointOfInterest.getActivePoi();

View File

@ -0,0 +1,54 @@
package com.jens.automation2;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import androidx.annotation.Nullable;
import org.apache.commons.lang3.StringUtils;
public class ActivityManageActionMakePhoneCall extends Activity
{
EditText etTargetPhoneNumber;
Button bActionMakePhoneCallSave;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_manage_action_make_phone_call);
etTargetPhoneNumber = (EditText)findViewById(R.id.etTargetPhoneNumber);
bActionMakePhoneCallSave = (Button) findViewById(R.id.bActionMakePhoneCallSave);
Intent input = getIntent();
/*if(input.hasExtra(ActivityManageRule.intentNameActionParameter1))
rbActionWifiOn.setChecked(input.getBooleanExtra(ActivityManageRule.intentNameActionParameter1, true));
*/
if(input.hasExtra(ActivityManageRule.intentNameActionParameter2))
etTargetPhoneNumber.setText(input.getStringExtra(ActivityManageRule.intentNameActionParameter2));
bActionMakePhoneCallSave.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view)
{
if(!StringUtils.isEmpty(etTargetPhoneNumber.getText()))
{
Intent response = new Intent();
response.putExtra(ActivityManageRule.intentNameActionParameter1, false);
response.putExtra(ActivityManageRule.intentNameActionParameter2, etTargetPhoneNumber.getText().toString());
setResult(RESULT_OK, response);
finish();
}
else
Toast.makeText(ActivityManageActionMakePhoneCall.this, getResources().getText(R.string.enterPhoneNumber), Toast.LENGTH_SHORT).show();
}
});
}
}

View File

@ -9,26 +9,37 @@ import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.provider.ContactsContract; import android.provider.ContactsContract;
import android.provider.MediaStore;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.widget.Button; import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.EditText; import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.jens.automation2.Action.Action_Enum; import com.jens.automation2.Action.Action_Enum;
import org.apache.commons.lang3.StringUtils;
public class ActivityManageActionSendTextMessage extends Activity public class ActivityManageActionSendTextMessage extends Activity
{ {
Button bSaveSendTextMessage, bImportNumberFromContacts; Button bSaveSendTextMessage, bImportNumberFromContacts, bMmsAttachment;
EditText etPhoneNumber, etSendTextMessage; EditText etPhoneNumber, etSendTextMessage;
RadioButton rbMessageTypeSms, rbMessageTypeMms;
TextView tvSendMmsFileAttachment;
protected final static int requestCodeForContactsPermissions = 9876; protected final static int requestCodeForContactsPermissions = 9876;
protected final static int requestCodeGetContact = 3235; protected final static int requestCodeGetContact = 3235;
protected final static int requestCodeGetMMSattachment = 3236;
// private String existingUrl = ""; public static final String messageTypeSms = "sms";
public static final String messageTypeMms = "mms";
public static boolean edit = false; public static boolean edit = false;
public static Action resultingAction = null; public static Action resultingAction = null;
@ -43,6 +54,10 @@ public class ActivityManageActionSendTextMessage extends Activity
etPhoneNumber = (EditText)findViewById(R.id.etPhoneNumber); etPhoneNumber = (EditText)findViewById(R.id.etPhoneNumber);
bSaveSendTextMessage = (Button)findViewById(R.id.bSaveSendTextMessage); bSaveSendTextMessage = (Button)findViewById(R.id.bSaveSendTextMessage);
bImportNumberFromContacts = (Button)findViewById(R.id.bImportNumberFromContacts); bImportNumberFromContacts = (Button)findViewById(R.id.bImportNumberFromContacts);
rbMessageTypeSms = (RadioButton)findViewById(R.id.rbMessageTypeSms);
rbMessageTypeMms = (RadioButton) findViewById(R.id.rbMessageTypeMms);
bMmsAttachment = (Button)findViewById(R.id.bMmsAttachment);
tvSendMmsFileAttachment = (TextView)findViewById(R.id.tvSendMmsFileAttachment);
bSaveSendTextMessage.setOnClickListener(new OnClickListener() bSaveSendTextMessage.setOnClickListener(new OnClickListener()
{ {
@ -51,13 +66,29 @@ public class ActivityManageActionSendTextMessage extends Activity
{ {
if(etSendTextMessage.getText().toString().length() > 0 && etPhoneNumber.getText().toString().length() > 0) if(etSendTextMessage.getText().toString().length() > 0 && etPhoneNumber.getText().toString().length() > 0)
{ {
if(resultingAction == null) if(rbMessageTypeMms.isChecked() && StringUtils.isEmpty(tvSendMmsFileAttachment.getText().toString()))
Toast.makeText(getBaseContext(), getResources().getString(R.string.chooseFile), Toast.LENGTH_LONG).show();
else
{ {
resultingAction = new Action(); if (resultingAction == null)
resultingAction.setAction(Action_Enum.sendTextMessage); {
resultingAction.setParameter2(etPhoneNumber.getText().toString() + Actions.smsSeparator + etSendTextMessage.getText().toString()); resultingAction = new Action();
resultingAction.setAction(Action_Enum.sendTextMessage);
String messageType = null;
String path = "";
if(rbMessageTypeSms.isChecked())
messageType = messageTypeSms;
else
{
messageType = messageTypeMms;
path = Actions.smsSeparator + tvSendMmsFileAttachment.getText().toString();
}
resultingAction.setParameter2(etPhoneNumber.getText().toString() + Actions.smsSeparator + etSendTextMessage.getText().toString() + Actions.smsSeparator + messageType + path);
}
backToRuleManager();
} }
backToRuleManager();
} }
else else
Toast.makeText(getBaseContext(), getResources().getString(R.string.enterPhoneNumberAndText), Toast.LENGTH_LONG).show(); Toast.makeText(getBaseContext(), getResources().getString(R.string.enterPhoneNumberAndText), Toast.LENGTH_LONG).show();
@ -78,6 +109,28 @@ public class ActivityManageActionSendTextMessage extends Activity
} }
}); });
RadioButton.OnCheckedChangeListener checkedChangedListener = new RadioButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b)
{
bMmsAttachment.setEnabled(rbMessageTypeMms.isChecked());
}
};
rbMessageTypeSms.setOnCheckedChangeListener(checkedChangedListener);
rbMessageTypeMms.setOnCheckedChangeListener(checkedChangedListener);
bMmsAttachment.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View view)
{
Intent chooseFileIntent = new Intent(Intent.ACTION_GET_CONTENT);
chooseFileIntent.setType("*/*");
chooseFileIntent = Intent.createChooser(chooseFileIntent, getResources().getString(R.string.chooseFile));
startActivityForResult(chooseFileIntent, requestCodeGetMMSattachment);
}
});
ActivityManageActionSendTextMessage.edit = getIntent().getBooleanExtra("edit", false); ActivityManageActionSendTextMessage.edit = getIntent().getBooleanExtra("edit", false);
if(edit) if(edit)
{ {
@ -144,10 +197,10 @@ public class ActivityManageActionSendTextMessage extends Activity
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) protected void onActivityResult(int requestCode, int resultCode, Intent data)
{ {
if(requestCode == requestCodeGetContact) if(resultCode == Activity.RESULT_OK)
{ {
if(resultCode == Activity.RESULT_OK) if(requestCode == requestCodeGetContact)
{ {
String phoneNo = null; String phoneNo = null;
String name = null; String name = null;
@ -165,6 +218,12 @@ public class ActivityManageActionSendTextMessage extends Activity
etPhoneNumber.setText(phoneNo); etPhoneNumber.setText(phoneNo);
} }
} }
else if (requestCode == requestCodeGetMMSattachment)
{
Uri fileUri = data.getData();
String filePath = fileUri.getPath();
tvSendMmsFileAttachment.setText(filePath);
}
} }
//super.onActivityResult(requestCode, resultCode, data); //super.onActivityResult(requestCode, resultCode, data);
} }

View File

@ -0,0 +1,64 @@
package com.jens.automation2;
import static com.jens.automation2.ActivityManageActionTriggerUrl.edit;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.jens.automation2.Action.Action_Enum;
import org.apache.commons.lang3.StringUtils;
public class ActivityManageActionSetVariable extends Activity
{
private Button bSaveVariable;
private EditText etVariableSetKey, etVariableSetValue;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
this.setContentView(R.layout.activity_manage_action_set_variable);
etVariableSetKey = (EditText)findViewById(R.id.etVariableSetKey);
etVariableSetValue = (EditText)findViewById(R.id.etVariableSetValue);
bSaveVariable = (Button)findViewById(R.id.bSaveVariable);
bSaveVariable.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
if(StringUtils.isEmpty(etVariableSetKey.getText().toString()))
{
Toast.makeText(ActivityManageActionSetVariable.this, getResources().getString(R.string.enterVariableKey), Toast.LENGTH_SHORT).show();
}
else
{
Intent response = new Intent();
if(StringUtils.isEmpty(etVariableSetValue.getText().toString()))
response.putExtra(ActivityManageRule.intentNameActionParameter2, etVariableSetKey.getText().toString());
else
response.putExtra(ActivityManageRule.intentNameActionParameter2, etVariableSetKey.getText().toString() + Action.actionParameter2Split + etVariableSetValue.getText().toString());
setResult(RESULT_OK, response);
finish();
}
}
});
if(getIntent().hasExtra(ActivityManageRule.intentNameActionParameter2))
{
String[] input = getIntent().getStringExtra(ActivityManageRule.intentNameActionParameter2).split(Action.actionParameter2Split);
etVariableSetKey.setText(input[0]);
if(input.length > 1)
etVariableSetValue.setText(input[1]);
}
}
}

View File

@ -53,11 +53,12 @@ public class ActivityManageActionStartActivity extends Activity
Spinner spinnerParameterType; Spinner spinnerParameterType;
boolean edit = false; boolean edit = false;
ProgressDialog progressDialog = null; ProgressDialog progressDialog = null;
RadioButton rbStartAppSelectByActivity, rbStartAppSelectByAction, rbStartAppByActivity, rbStartAppByBroadcast; RadioButton rbStartAppSelectByActivity, rbStartAppSelectByAction, rbStartAppByActivity, rbStartAppByBroadcast, rbStartAppByService;
final String urlShowExamples = "https://server47.de/automation/examples_startProgram.html"; final String urlShowExamples = "https://server47.de/automation/examples_startProgram.html";
final static String startByActivityString = "0"; final static String startByActivityString = "0";
final static String startByBroadcastString = "1"; final static String startByBroadcastString = "1";
final static String startByServiceString = "2";
final static int requestCodeForRequestQueryAllPackagesPermission = 4711; final static int requestCodeForRequestQueryAllPackagesPermission = 4711;
@ -81,6 +82,7 @@ public class ActivityManageActionStartActivity extends Activity
showStartProgramExamples = (Button)findViewById(R.id.showStartProgramExamples); showStartProgramExamples = (Button)findViewById(R.id.showStartProgramExamples);
rbStartAppByActivity = (RadioButton)findViewById(R.id.rbStartAppByActivity); rbStartAppByActivity = (RadioButton)findViewById(R.id.rbStartAppByActivity);
rbStartAppByBroadcast = (RadioButton)findViewById(R.id.rbStartAppByBroadcast); rbStartAppByBroadcast = (RadioButton)findViewById(R.id.rbStartAppByBroadcast);
rbStartAppByService = (RadioButton)findViewById(R.id.rbStartAppByService);
intentTypeSpinnerAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, ActivityManageActionStartActivity.supportedIntentTypes); intentTypeSpinnerAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, ActivityManageActionStartActivity.supportedIntentTypes);
spinnerParameterType.setAdapter(intentTypeSpinnerAdapter); spinnerParameterType.setAdapter(intentTypeSpinnerAdapter);
@ -234,6 +236,8 @@ public class ActivityManageActionStartActivity extends Activity
if (rbStartAppByActivity.isChecked()) if (rbStartAppByActivity.isChecked())
parameter2 += ";" + startByActivityString; parameter2 += ";" + startByActivityString;
else if(rbStartAppByService.isChecked())
parameter2 += ";" + startByServiceString;
else else
parameter2 += ";" + startByBroadcastString; parameter2 += ";" + startByBroadcastString;
@ -595,6 +599,7 @@ public class ActivityManageActionStartActivity extends Activity
rbStartAppByActivity.setChecked(params[2].equals(startByActivityString)); rbStartAppByActivity.setChecked(params[2].equals(startByActivityString));
rbStartAppByBroadcast.setChecked(params[2].equals(startByBroadcastString)); rbStartAppByBroadcast.setChecked(params[2].equals(startByBroadcastString));
rbStartAppByService.setChecked(params[2].equals(startByServiceString));
int startIndex = -1; int startIndex = -1;

View File

@ -47,37 +47,37 @@ public class ActivityManageProfile extends Activity
boolean guiUpdate = false; boolean guiUpdate = false;
File incomingCallsRingtone = null, notificationsRingtone = null; String incomingCallsRingtone = null, notificationsRingtone = null;
ArrayAdapter<String> soundModeAdapter; ArrayAdapter<String> soundModeAdapter;
ArrayAdapter<String> dndModeAdapter; ArrayAdapter<String> dndModeAdapter;
public void setIncomingCallsRingtone(File incomingCallsRingtone) public void setIncomingCallsRingtone(String incomingCallsRingtone)
{ {
this.incomingCallsRingtone = incomingCallsRingtone; this.incomingCallsRingtone = incomingCallsRingtone;
if(incomingCallsRingtone != null) if(incomingCallsRingtone != null)
tvIncomingCallsRingtone.setText(this.incomingCallsRingtone.getAbsolutePath()); tvIncomingCallsRingtone.setText(this.incomingCallsRingtone);
else else
tvIncomingCallsRingtone.setText(getResources().getString(R.string.none)); tvIncomingCallsRingtone.setText(getResources().getString(R.string.none));
} }
public File getIncomingCallsRingtone() public String getIncomingCallsRingtone()
{ {
return incomingCallsRingtone; return incomingCallsRingtone;
} }
public void setNotificationsRingtone(File notificationsRingtone) public void setNotificationsRingtone(String notificationsRingtone)
{ {
this.notificationsRingtone = notificationsRingtone; this.notificationsRingtone = notificationsRingtone;
if(this.notificationsRingtone != null) if(this.notificationsRingtone != null)
tvNotificationsRingtone.setText(this.notificationsRingtone.getAbsolutePath()); tvNotificationsRingtone.setText(this.notificationsRingtone);
else else
tvNotificationsRingtone.setText(getResources().getString(R.string.none)); tvNotificationsRingtone.setText(getResources().getString(R.string.none));
} }
public File getNotificationsRingtone() public String getNotificationsRingtone()
{ {
return notificationsRingtone; return notificationsRingtone;
} }
@ -284,26 +284,26 @@ public class ActivityManageProfile extends Activity
@Override @Override
public void onClick(View v) public void onClick(View v)
{ {
try // try
{ // {
Intent fileIntent = new Intent(Intent.ACTION_GET_CONTENT); // Intent fileIntent = new Intent(Intent.ACTION_GET_CONTENT);
fileIntent.setType("audio/*"); // fileIntent.setType("audio/*");
startActivityForResult(Intent.createChooser(fileIntent, "Select a ringtone"), intentCodeRingtonePickerCallsFile); // startActivityForResult(Intent.createChooser(fileIntent, "Select a ringtone"), intentCodeRingtonePickerCallsFile);
} // }
catch(ActivityNotFoundException e) // catch(ActivityNotFoundException e)
{ // {
// Use media browser instead // Use media browser instead
Intent fileSelectionIntent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER); Intent fileSelectionIntent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
if(ActivityMainProfiles.profileToEdit != null) if(ActivityMainProfiles.profileToEdit != null)
{ {
Uri currenturi = Uri.parse(ActivityMainProfiles.profileToEdit.incomingCallsRingtone.getAbsolutePath()); Uri currenturi = Uri.parse(ActivityMainProfiles.profileToEdit.incomingCallsRingtone);
if(ActivityMainProfiles.profileToEdit.changeIncomingCallsRingtone) if(ActivityMainProfiles.profileToEdit.changeIncomingCallsRingtone)
fileSelectionIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currenturi); fileSelectionIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currenturi);
} }
startActivityForResult(fileSelectionIntent, intentCodeRingtonePickerCallsRingtone); startActivityForResult(fileSelectionIntent, intentCodeRingtonePickerCallsRingtone);
} // }
} }
}); });
bChangeSoundNotifications.setOnClickListener(new OnClickListener() bChangeSoundNotifications.setOnClickListener(new OnClickListener()
@ -324,7 +324,7 @@ public class ActivityManageProfile extends Activity
if(ActivityMainProfiles.profileToEdit != null) if(ActivityMainProfiles.profileToEdit != null)
{ {
Uri currenturi = Uri.parse(ActivityMainProfiles.profileToEdit.notificationRingtone.getAbsolutePath()); Uri currenturi = Uri.parse(ActivityMainProfiles.profileToEdit.notificationRingtone);
if(ActivityMainProfiles.profileToEdit.changeNotificationRingtone) if(ActivityMainProfiles.profileToEdit.changeNotificationRingtone)
fileSelectionIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currenturi); fileSelectionIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currenturi);
} }
@ -495,15 +495,20 @@ public class ActivityManageProfile extends Activity
Uri uri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI); Uri uri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
if (uri != null) if (uri != null)
{ {
String ringTonePath = CompensateCrappyAndroidPaths.getPath(ActivityManageProfile.this, uri); // if(Build.VERSION.SDK_INT < 26)
setIncomingCallsRingtone(new File(ringTonePath)); // {
// String ringTonePath = CompensateCrappyAndroidPaths.getPath(ActivityManageProfile.this, uri);
// setIncomingCallsRingtone(ringTonePath);
// }
// else
setIncomingCallsRingtone(uri.toString());
} }
break; break;
} }
case intentCodeRingtonePickerCallsFile: case intentCodeRingtonePickerCallsFile:
{ {
String ringTonePath = CompensateCrappyAndroidPaths.getPath(ActivityManageProfile.this, data.getData()); String ringTonePath = CompensateCrappyAndroidPaths.getPath(ActivityManageProfile.this, data.getData());
setIncomingCallsRingtone(new File(ringTonePath)); setIncomingCallsRingtone(ringTonePath);
break; break;
} }
case intentCodeRingtonePickerNotificationsRingtone: // notifications case intentCodeRingtonePickerNotificationsRingtone: // notifications
@ -511,15 +516,20 @@ public class ActivityManageProfile extends Activity
Uri uri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI); Uri uri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
if (uri != null) if (uri != null)
{ {
String ringTonePath = CompensateCrappyAndroidPaths.getPath(ActivityManageProfile.this, data.getData()); // if(Build.VERSION.SDK_INT < 26)
setNotificationsRingtone(new File(ringTonePath)); // {
// String ringTonePath = CompensateCrappyAndroidPaths.getPath(ActivityManageProfile.this, uri);
// setNotificationsRingtone(ringTonePath);
// }
// else
setNotificationsRingtone(uri.toString());
} }
break; break;
} }
case intentCodeRingtonePickerNotificationsFile: case intentCodeRingtonePickerNotificationsFile:
{ {
String ringTonePath = CompensateCrappyAndroidPaths.getPath(ActivityManageProfile.this, data.getData()); String ringTonePath = CompensateCrappyAndroidPaths.getPath(ActivityManageProfile.this, data.getData());
setNotificationsRingtone(new File(ringTonePath)); setNotificationsRingtone(ringTonePath);
break; break;
} }
default: default:

View File

@ -133,6 +133,12 @@ public class ActivityManageRule extends Activity
final static int requestCodeActionWakeLockEdit = 820; final static int requestCodeActionWakeLockEdit = 820;
final static int requestCodeTriggerSubSystemStateAdd = 821; final static int requestCodeTriggerSubSystemStateAdd = 821;
final static int requestCodeTriggerSubSystemStateEdit = 822; final static int requestCodeTriggerSubSystemStateEdit = 822;
final static int requestCodeActionMakePhoneCallAdd = 823;
final static int requestCodeActionMakePhoneCallEdit = 824;
final static int requestCodeActionSetVariableAdd = 825;
final static int requestCodeActionSetVariableEdit = 826;
final static int requestCodeTriggerCheckVariableAdd = 827;
final static int requestCodeTriggerCheckVariableEdit = 828;
public static ActivityManageRule getInstance() public static ActivityManageRule getInstance()
{ {
@ -330,6 +336,12 @@ public class ActivityManageRule extends Activity
subSystemStateEditor.putExtra(intentNameTriggerParameter2, selectedTrigger.getTriggerParameter2()); subSystemStateEditor.putExtra(intentNameTriggerParameter2, selectedTrigger.getTriggerParameter2());
startActivityForResult(subSystemStateEditor, requestCodeTriggerSubSystemStateEdit); startActivityForResult(subSystemStateEditor, requestCodeTriggerSubSystemStateEdit);
break; break;
case checkVariable:
Intent variableStateEditor = new Intent(ActivityManageRule.this, ActivityManageTriggerCheckVariable.class);
variableStateEditor.putExtra(intentNameTriggerParameter1, selectedTrigger.getTriggerParameter());
variableStateEditor.putExtra(intentNameTriggerParameter2, selectedTrigger.getTriggerParameter2());
startActivityForResult(variableStateEditor, requestCodeTriggerCheckVariableEdit);
break;
default: default:
break; break;
} }
@ -416,6 +428,17 @@ public class ActivityManageRule extends Activity
activityEditRunExecutableIntent.putExtra(intentNameActionParameter2, a.getParameter2()); activityEditRunExecutableIntent.putExtra(intentNameActionParameter2, a.getParameter2());
startActivityForResult(activityEditRunExecutableIntent, requestCodeActionRunExecutableEdit); startActivityForResult(activityEditRunExecutableIntent, requestCodeActionRunExecutableEdit);
break; break;
case startPhoneCall:
Intent activityEditMakePhoneCallIntent = new Intent(ActivityManageRule.this, ActivityManageActionMakePhoneCall.class);
activityEditMakePhoneCallIntent.putExtra(intentNameActionParameter1, a.getParameter1());
activityEditMakePhoneCallIntent.putExtra(intentNameActionParameter2, a.getParameter2());
startActivityForResult(activityEditMakePhoneCallIntent, requestCodeActionMakePhoneCallEdit);
break;
case setVariable:
Intent activityEditSetVariableIntent = new Intent(ActivityManageRule.this, ActivityManageActionSetVariable.class);
activityEditSetVariableIntent.putExtra(intentNameActionParameter2, a.getParameter2());
startActivityForResult(activityEditSetVariableIntent, requestCodeActionSetVariableEdit);
break;
case setWifi: case setWifi:
Intent activityEditSetWifiIntent = new Intent(ActivityManageRule.this, ActivityManageActionWifi.class); Intent activityEditSetWifiIntent = new Intent(ActivityManageRule.this, ActivityManageActionWifi.class);
activityEditSetWifiIntent.putExtra(intentNameActionParameter1, a.getParameter1()); activityEditSetWifiIntent.putExtra(intentNameActionParameter1, a.getParameter1());
@ -814,6 +837,13 @@ public class ActivityManageRule extends Activity
startActivityForResult(subSystemStateTriggerEditor, requestCodeTriggerSubSystemStateAdd); startActivityForResult(subSystemStateTriggerEditor, requestCodeTriggerSubSystemStateAdd);
return; return;
} }
else if(triggerType == Trigger_Enum.checkVariable)
{
newTrigger.setTriggerType(Trigger_Enum.checkVariable);
Intent variableTriggerEditor = new Intent(myContext, ActivityManageTriggerCheckVariable.class);
startActivityForResult(variableTriggerEditor, requestCodeTriggerCheckVariableAdd);
return;
}
else else
getTriggerParameterDialog(context, booleanChoices).show(); getTriggerParameterDialog(context, booleanChoices).show();
@ -1055,7 +1085,7 @@ public class ActivityManageRule extends Activity
AlertDialog.Builder alertDialog = new AlertDialog.Builder(this); AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);
alertDialog.setTitle(myContext.getResources().getString(R.string.phoneNumber)); alertDialog.setTitle(myContext.getResources().getString(R.string.phoneNumber));
alertDialog.setMessage(myContext.getResources().getString(R.string.enterPhoneNumber)); alertDialog.setMessage(myContext.getResources().getString(R.string.enterPhoneNumberBlankForAny));
// Set an EditText view to get user input // Set an EditText view to get user input
final EditText input = new EditText(this); final EditText input = new EditText(this);
@ -1582,6 +1612,27 @@ public class ActivityManageRule extends Activity
this.refreshActionList(); this.refreshActionList();
} }
} }
else if(requestCode == requestCodeActionMakePhoneCallAdd)
{
if(resultCode == RESULT_OK)
{
newAction.setParentRule(ruleToEdit);
newAction.setParameter1(data.getBooleanExtra(intentNameActionParameter1, false));
newAction.setParameter2(data.getStringExtra(intentNameActionParameter2));
ruleToEdit.getActionSet().add(newAction);
this.refreshActionList();
}
}
else if(requestCode == requestCodeActionSetVariableAdd)
{
if(resultCode == RESULT_OK)
{
newAction.setParentRule(ruleToEdit);
newAction.setParameter2(data.getStringExtra(intentNameActionParameter2));
ruleToEdit.getActionSet().add(newAction);
this.refreshActionList();
}
}
else if(requestCode == requestCodeActionWakeLockAdd) else if(requestCode == requestCodeActionWakeLockAdd)
{ {
if(resultCode == RESULT_OK) if(resultCode == RESULT_OK)
@ -1692,6 +1743,35 @@ public class ActivityManageRule extends Activity
this.refreshActionList(); this.refreshActionList();
} }
} }
else if(requestCode == requestCodeActionMakePhoneCallEdit)
{
if(resultCode == RESULT_OK)
{
ruleToEdit.getActionSet().get(editIndex).setParentRule(ruleToEdit);
if(data.hasExtra(intentNameActionParameter1) && data.hasExtra(intentNameActionParameter2))
{
ruleToEdit.getActionSet().get(editIndex).setParameter1(data.getBooleanExtra(intentNameActionParameter1, false));
ruleToEdit.getActionSet().get(editIndex).setParameter2(data.getStringExtra(intentNameActionParameter2));
}
this.refreshActionList();
}
}
else if(requestCode == requestCodeActionSetVariableEdit)
{
if(resultCode == RESULT_OK)
{
ruleToEdit.getActionSet().get(editIndex).setParentRule(ruleToEdit);
if(data.hasExtra(intentNameActionParameter1) && data.hasExtra(intentNameActionParameter2))
{
ruleToEdit.getActionSet().get(editIndex).setParameter2(data.getStringExtra(intentNameActionParameter2));
}
this.refreshActionList();
}
}
else if(requestCode == requestCodeActionSetWifiEdit) else if(requestCode == requestCodeActionSetWifiEdit)
{ {
if(resultCode == RESULT_OK) if(resultCode == RESULT_OK)
@ -1886,6 +1966,17 @@ public class ActivityManageRule extends Activity
this.refreshTriggerList(); this.refreshTriggerList();
} }
} }
else if(requestCode == requestCodeTriggerCheckVariableAdd)
{
if(resultCode == RESULT_OK)
{
newTrigger.setTriggerParameter(data.getBooleanExtra(intentNameTriggerParameter1, true));
newTrigger.setTriggerParameter2(data.getStringExtra(intentNameTriggerParameter2));
newTrigger.setParentRule(ruleToEdit);
ruleToEdit.getTriggerSet().add(newTrigger);
this.refreshTriggerList();
}
}
else if(requestCode == requestCodeTriggerTetheringEdit) else if(requestCode == requestCodeTriggerTetheringEdit)
{ {
if(resultCode == RESULT_OK) if(resultCode == RESULT_OK)
@ -1912,6 +2003,19 @@ public class ActivityManageRule extends Activity
this.refreshTriggerList(); this.refreshTriggerList();
} }
} }
else if(requestCode == requestCodeTriggerCheckVariableEdit)
{
if(resultCode == RESULT_OK)
{
Trigger editedTrigger = new Trigger();
editedTrigger.setTriggerType(Trigger_Enum.checkVariable);
editedTrigger.setTriggerParameter(data.getBooleanExtra(intentNameTriggerParameter1, true));
editedTrigger.setTriggerParameter2(data.getStringExtra(intentNameTriggerParameter2));
editedTrigger.setParentRule(ruleToEdit);
ruleToEdit.getTriggerSet().set(editIndex, editedTrigger);
this.refreshTriggerList();
}
}
} }
protected AlertDialog getActionTypeDialog() protected AlertDialog getActionTypeDialog()
@ -1971,9 +2075,18 @@ public class ActivityManageRule extends Activity
items.add(new Item(typesLong[i].toString(), R.drawable.coffee)); items.add(new Item(typesLong[i].toString(), R.drawable.coffee));
else if(types[i].toString().equals(Action_Enum.runExecutable.toString())) else if(types[i].toString().equals(Action_Enum.runExecutable.toString()))
items.add(new Item(typesLong[i].toString(), R.drawable.script)); 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))
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))
items.add(new Item(typesLong[i].toString(), R.drawable.phone));
}
else if(types[i].toString().equals(Action_Enum.sendTextMessage.toString())) else if(types[i].toString().equals(Action_Enum.sendTextMessage.toString()))
{ {
// if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageSpecificRule.this, "android.permission.SEND_SMS") && !Miscellaneous.isGooglePlayInstalled(ActivityManageSpecificRule.this))
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, Manifest.permission.SEND_SMS)) if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, Manifest.permission.SEND_SMS))
items.add(new Item(typesLong[i].toString(), R.drawable.message)); items.add(new Item(typesLong[i].toString(), R.drawable.message));
} }
@ -2143,6 +2256,24 @@ public class ActivityManageRule extends Activity
Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionRunExecutable.class); Intent intent = new Intent(ActivityManageRule.this, ActivityManageActionRunExecutable.class);
startActivityForResult(intent, requestCodeActionRunExecutableAdd); startActivityForResult(intent, requestCodeActionRunExecutableAdd);
} }
else if(Action.getActionTypesAsArray()[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()))
{
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()))
{
newAction.setAction(Action_Enum.stopPhoneCall);
ruleToEdit.getActionSet().add(newAction);
refreshActionList();
}
else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.wakelock.toString())) else if(Action.getActionTypesAsArray()[which].toString().equals(Action_Enum.wakelock.toString()))
{ {
newAction.setAction(Action_Enum.wakelock); newAction.setAction(Action_Enum.wakelock);

View File

@ -0,0 +1,56 @@
package com.jens.automation2;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import androidx.annotation.Nullable;
import org.apache.commons.lang3.StringUtils;
public class ActivityManageTriggerCheckVariable extends Activity
{
EditText etVariableKeyTrigger, etVariableValueTrigger;
Button bTriggerVariableSave;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_manage_trigger_check_variable);
etVariableKeyTrigger = (EditText) findViewById(R.id.etVariableKeyTrigger);
etVariableValueTrigger = (EditText) findViewById(R.id.etVariableValueTrigger);
bTriggerVariableSave = (Button) findViewById(R.id.bTriggerVariableSave);
Intent input = getIntent();
if(input.hasExtra(ActivityManageRule.intentNameTriggerParameter2))
{
String[] conditions = input.getStringExtra(ActivityManageRule.intentNameTriggerParameter2).split(Trigger.triggerParameter2Split);
etVariableKeyTrigger.setText(conditions[0]);
if(conditions.length > 1)
etVariableValueTrigger.setText(conditions[1]);
}
bTriggerVariableSave.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view)
{
Intent response = new Intent();
// response.putExtra(ActivityManageRule.intentNameTriggerParameter1, rbTetheringOn.isChecked());
if(StringUtils.isEmpty(etVariableValueTrigger.getText().toString()))
response.putExtra(ActivityManageRule.intentNameTriggerParameter2, etVariableKeyTrigger.getText().toString());
else
response.putExtra(ActivityManageRule.intentNameTriggerParameter2, etVariableKeyTrigger.getText().toString() + Trigger.triggerParameter2Split + etVariableValueTrigger.getText().toString());
setResult(RESULT_OK, response);
finish();
}
});
}
}

View File

@ -248,6 +248,10 @@ public class ActivityPermissions extends Activity
if (!havePermission(s, context)) if (!havePermission(s, context))
return true; return true;
} }
else if((s.equalsIgnoreCase(Manifest.permission.CALL_PHONE) || s.equalsIgnoreCase(Manifest.permission.ANSWER_PHONE_CALLS)) && BuildConfig.FLAVOR.equalsIgnoreCase(AutomationService.flavor_name_googleplay))
{
return false;
}
else if(s.equalsIgnoreCase(Manifest.permission.ACTIVITY_RECOGNITION) || s.equalsIgnoreCase(permissionNameGoogleActivityDetection)) else if(s.equalsIgnoreCase(Manifest.permission.ACTIVITY_RECOGNITION) || s.equalsIgnoreCase(permissionNameGoogleActivityDetection))
{ {
if(!BuildConfig.FLAVOR.equalsIgnoreCase(AutomationService.flavor_name_fdroid)) if(!BuildConfig.FLAVOR.equalsIgnoreCase(AutomationService.flavor_name_fdroid))
@ -679,6 +683,13 @@ public class ActivityPermissions extends Activity
else else
addToArrayListUnique(Manifest.permission.BIND_DEVICE_ADMIN, requiredPermissions); addToArrayListUnique(Manifest.permission.BIND_DEVICE_ADMIN, requiredPermissions);
break; break;
case startPhoneCall:
addToArrayListUnique(Manifest.permission.CALL_PHONE, requiredPermissions);
// addToArrayListUnique(Manifest.permission.SYSTEM_ALERT_WINDOW, requiredPermissions);
break;
case stopPhoneCall:
addToArrayListUnique(Manifest.permission.ANSWER_PHONE_CALLS, requiredPermissions);
break;
default: default:
break; break;
} }
@ -870,6 +881,14 @@ public class ActivityPermissions extends Activity
for(String ruleName : getRulesUsing(Action.Action_Enum.sendTextMessage)) for(String ruleName : getRulesUsing(Action.Action_Enum.sendTextMessage))
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName)); usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
break; break;
case Manifest.permission.CALL_PHONE:
for(String ruleName : getRulesUsing(Action.Action_Enum.startPhoneCall))
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
break;
case Manifest.permission.ANSWER_PHONE_CALLS:
for(String ruleName : getRulesUsing(Action.Action_Enum.stopPhoneCall))
usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName));
break;
case Manifest.permission.FOREGROUND_SERVICE: case Manifest.permission.FOREGROUND_SERVICE:
usingElements.add(getResources().getString(R.string.startAutomationAsService)); usingElements.add(getResources().getString(R.string.startAutomationAsService));
break; break;

View File

@ -33,6 +33,8 @@ import com.jens.automation2.receivers.PackageReplacedReceiver;
import com.jens.automation2.receivers.PhoneStatusListener; import com.jens.automation2.receivers.PhoneStatusListener;
import java.util.Calendar; import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
import java.util.Set; import java.util.Set;
@SuppressLint("NewApi") @SuppressLint("NewApi")
@ -63,6 +65,8 @@ public class AutomationService extends Service implements OnInitListener
protected Calendar lockSoundChangesEnd = null; protected Calendar lockSoundChangesEnd = null;
protected boolean isRunning; protected boolean isRunning;
Map<String,String> variableMap = new HashMap();
protected static AutomationService centralInstance = null; protected static AutomationService centralInstance = null;
public void nullLockSoundChangesEnd() public void nullLockSoundChangesEnd()
@ -457,6 +461,10 @@ public class AutomationService extends Service implements OnInitListener
private void stopRoutine() private void stopRoutine()
{ {
Miscellaneous.logEvent("i", "Service", "Stopping service...", 3); Miscellaneous.logEvent("i", "Service", "Stopping service...", 3);
// Clear variables for trigger/action with same name
variableMap.clear();
try try
{ {
myLocationProvider.stopLocationService(); myLocationProvider.stopLocationService();
@ -692,13 +700,18 @@ public class AutomationService extends Service implements OnInitListener
} }
} }
public static boolean isMainActivityRunning(Context context) public Map<String, String> getVariableMap()
{ {
return variableMap;
}
public static boolean isMainActivityRunning(Context context)
{
if(ActivityMainScreen.getActivityMainScreenInstance() == null) if(ActivityMainScreen.getActivityMainScreenInstance() == null)
return false; return false;
else else
return true; return true;
} }
public static boolean isMyServiceRunning(Context context) public static boolean isMyServiceRunning(Context context)
{ {

View File

@ -82,7 +82,6 @@ import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException; import java.security.cert.CertificateException;
import java.security.cert.X509Certificate; import java.security.cert.X509Certificate;
import java.sql.Time;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
@ -91,7 +90,6 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Scanner; import java.util.Scanner;
import java.util.Set;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream; import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
@ -617,26 +615,81 @@ public class Miscellaneous extends Service
source = source.replace("[serialnr]", "serialUnknown"); source = source.replace("[serialnr]", "serialUnknown");
if( if(
source.contains("[d]") | source.contains("[d]") ||
source.contains("[m]") | source.contains("[m]") ||
source.contains("[Y]") | source.contains("[Y]") ||
source.contains("[h]") | source.contains("[h]") ||
source.contains("[H]") | source.contains("[H]") ||
source.contains("[i]") | source.contains("[i]") ||
source.contains("[s]") | source.contains("[s]") ||
source.contains("[ms]") source.contains("[ms]")
) )
{ {
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
source = source.replace("[d]", String.valueOf(cal.get(Calendar.DAY_OF_MONTH))); if(source.contains("[d]"))
source = source.replace("[m]", String.valueOf(cal.get(Calendar.MONTH))); {
source = source.replace("[Y]", String.valueOf(cal.get(Calendar.YEAR))); String result = String.valueOf(cal.get(Calendar.DAY_OF_MONTH));
source = source.replace("[h]", String.valueOf(cal.get(Calendar.HOUR))); if(result.length() < 2)
source = source.replace("[H]", String.valueOf(cal.get(Calendar.HOUR_OF_DAY))); result = "0" + result;
source = source.replace("[i]", String.valueOf(cal.get(Calendar.MINUTE)));
source = source.replace("[s]", String.valueOf(cal.get(Calendar.SECOND))); source = source.replace("[d]", result);
source = source.replace("[ms]", String.valueOf(cal.get(Calendar.MILLISECOND))); }
if(source.contains("[m]"))
{
String result = String.valueOf(cal.get(Calendar.MONTH) +1);
if(result.length() < 2)
result = "0" + result;
source = source.replace("[m]", result);
}
if(source.contains("[Y]"))
{
source = source.replace("[Y]", String.valueOf(cal.get(Calendar.YEAR)));
}
if(source.contains("[h]"))
{
String result = String.valueOf(cal.get(Calendar.HOUR));
if(result.length() < 2)
result = "0" + result;
source = source.replace("[h]", result);
}
if(source.contains("[H]"))
{
String result = String.valueOf(cal.get(Calendar.HOUR_OF_DAY));
if(result.length() < 2)
result = "0" + result;
source = source.replace("[H]", result);
}
if(source.contains("[i]"))
{
String result = String.valueOf(cal.get(Calendar.MINUTE));
if(result.length() < 2)
result = "0" + result;
source = source.replace("[i]", result);
}
if(source.contains("[s]"))
{
String result = String.valueOf(cal.get(Calendar.SECOND));
if(result.length() < 2)
result = "0" + result;
source = source.replace("[s]", String.valueOf(cal.get(Calendar.SECOND)));
}
if(source.contains("[ms]"))
{
source = source.replace("[ms]", String.valueOf(cal.get(Calendar.MILLISECOND)));
}
} }
if(source.contains("[notificationTitle]")) if(source.contains("[notificationTitle]"))
@ -1392,7 +1445,7 @@ public class Miscellaneous extends Service
return result; return result;
} }
public static boolean restrictedFeaturesConfigured() public static boolean restrictedFeaturesConfiguredFdroid()
{ {
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.activityDetection)) if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.activityDetection))
{ {
@ -1409,6 +1462,17 @@ public class Miscellaneous extends Service
return false; return false;
} }
public static boolean restrictedFeaturesConfiguredGoogle()
{
if(Rule.isAnyRuleUsing(Action.Action_Enum.startPhoneCall) || Rule.isAnyRuleUsing(Action.Action_Enum.stopPhoneCall))
{
if(BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay))
return true;
}
return false;
}
public static Element getXmlTree(String inputString) throws SAXException, IOException, ParserConfigurationException public static Element getXmlTree(String inputString) throws SAXException, IOException, ParserConfigurationException
{ {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

View File

@ -64,7 +64,7 @@ public class PointOfInterest implements Comparable<PointOfInterest>
public void setName(String desiredName) public void setName(String desiredName)
{ {
this.oldName = this.name; this.oldName = this.name;
this.name = desiredName; this.name = desiredName.trim();
} }
public Location getLocation() public Location getLocation()

View File

@ -3,6 +3,7 @@ package com.jens.automation2;
import android.app.NotificationManager; import android.app.NotificationManager;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Context; import android.content.Context;
import android.database.Cursor;
import android.media.AudioManager; import android.media.AudioManager;
import android.media.RingtoneManager; import android.media.RingtoneManager;
import android.net.Uri; import android.net.Uri;
@ -41,13 +42,13 @@ public class Profile implements Comparable<Profile>
protected int volumeAlarms; protected int volumeAlarms;
protected boolean changeIncomingCallsRingtone; protected boolean changeIncomingCallsRingtone;
protected File incomingCallsRingtone; protected String incomingCallsRingtone;
protected boolean changeVibrateWhenRinging; protected boolean changeVibrateWhenRinging;
protected boolean vibrateWhenRinging; protected boolean vibrateWhenRinging;
protected boolean changeNotificationRingtone; protected boolean changeNotificationRingtone;
protected File notificationRingtone; protected String notificationRingtone;
protected boolean changeAudibleSelection; protected boolean changeAudibleSelection;
protected boolean audibleSelection; protected boolean audibleSelection;
@ -62,7 +63,7 @@ public class Profile implements Comparable<Profile>
public void setName(String name) public void setName(String name)
{ {
this.oldName = this.name; this.oldName = this.name;
this.name = name; this.name = name.trim();
} }
public String getName() public String getName()
@ -171,11 +172,11 @@ public class Profile implements Comparable<Profile>
return changeIncomingCallsRingtone; return changeIncomingCallsRingtone;
} }
public void setIncomingCallsRingtone(File incomingCallsRingtone) public void setIncomingCallsRingtone(String incomingCallsRingtone)
{ {
this.incomingCallsRingtone = incomingCallsRingtone; this.incomingCallsRingtone = incomingCallsRingtone;
} }
public File getIncomingCallsRingtone() public String getIncomingCallsRingtone()
{ {
return incomingCallsRingtone; return incomingCallsRingtone;
} }
@ -207,11 +208,11 @@ public class Profile implements Comparable<Profile>
return changeNotificationRingtone; return changeNotificationRingtone;
} }
public void setNotificationRingtone(File notificationsRingtone) public void setNotificationRingtone(String notificationsRingtone)
{ {
this.notificationRingtone = notificationsRingtone; this.notificationRingtone = notificationsRingtone;
} }
public File getNotificationRingtone() public String getNotificationRingtone()
{ {
return notificationRingtone; return notificationRingtone;
} }
@ -292,51 +293,67 @@ public class Profile implements Comparable<Profile>
return null; return null;
} }
private boolean applyRingTone(File ringtoneFile, int ringtoneType, Context context) private boolean applyRingTone(String ringtoneFile, int ringtoneType, Context context)
{ {
Miscellaneous.logEvent("i", "Profile", "Request to set ringtone to " + ringtoneFile.getAbsolutePath(), 3); Miscellaneous.logEvent("i", "Profile", "Request to set ringtone to " + ringtoneFile, 3);
if(!ringtoneFile.exists() || !ringtoneFile.canRead()) // if(!ringtoneFile.exists() || !ringtoneFile.canRead())
// {
// String message = "Ringtone file does not exist or cannot read it: " + ringtoneFile.getAbsolutePath();
// Miscellaneous.logEvent("i", "Profile", message, 3);
// Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
// return false;
// }
// Set by URI
if(ringtoneFile.contains("//"))
{ {
String message = "Ringtone file does not exist or cannot read it: " + ringtoneFile.getAbsolutePath(); Uri target = Uri.parse(ringtoneFile);
Miscellaneous.logEvent("i", "Profile", message, 3); RingtoneManager.setActualDefaultRingtoneUri(context, ringtoneType, target);
Toast.makeText(context, message, Toast.LENGTH_SHORT).show(); Miscellaneous.logEvent("i", "Profile", "Ringtone set to: " + ringtoneFile, 1);
return false; return true;
} } // Set by filepath
else
ContentValues values = new ContentValues();
values.put(MediaStore.MediaColumns.DATA, ringtoneFile.getAbsolutePath());
values.put(MediaStore.MediaColumns.TITLE, ringtoneFile.getName());
values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mp3");
values.put(MediaStore.MediaColumns.SIZE, ringtoneFile.length());
values.put(MediaStore.Audio.Media.IS_RINGTONE, ringtoneType == RingtoneManager.TYPE_RINGTONE);
values.put(MediaStore.Audio.Media.IS_NOTIFICATION, ringtoneType == RingtoneManager.TYPE_NOTIFICATION);
values.put(MediaStore.Audio.Media.IS_ALARM, false);
values.put(MediaStore.Audio.Media.IS_MUSIC, false);
try
{ {
Uri newRingTone = null; ContentValues values = new ContentValues();
values.put(MediaStore.MediaColumns.DATA, ringtoneFile);
values.put(MediaStore.MediaColumns.TITLE, ringtoneFile);
//values.put(MediaStore.MediaColumns.TITLE, ringtoneFile.getName());
values.put(MediaStore.MediaColumns.MIME_TYPE, "audio/mp3");
values.put(MediaStore.MediaColumns.SIZE, ringtoneFile.length());
values.put(MediaStore.Audio.Media.IS_RINGTONE, ringtoneType == RingtoneManager.TYPE_RINGTONE);
values.put(MediaStore.Audio.Media.IS_NOTIFICATION, ringtoneType == RingtoneManager.TYPE_NOTIFICATION);
values.put(MediaStore.Audio.Media.IS_ALARM, false);
values.put(MediaStore.Audio.Media.IS_MUSIC, false);
//TODO: This part needs to be made compatible with Android 11 and above. try
if(Build.VERSION.SDK_INT > 30)
{ {
Uri existingRingTone = MediaStore.Audio.Media.getContentUriForPath(ringtoneFile.getAbsolutePath()); Uri newRingTone = null;
if (existingRingTone != null) Uri existingRingTone = MediaStore.Audio.Media.getContentUriForPath(ringtoneFile);
context.getContentResolver().delete(existingRingTone, MediaStore.MediaColumns.DATA + "=\"" + ringtoneFile.getAbsolutePath() + "\"", null);
try
{
if (existingRingTone != null)
context.getContentResolver().delete(existingRingTone, MediaStore.MediaColumns.DATA + "=\"" + ringtoneFile + "\"", null);
}
catch(Exception e)
{
Miscellaneous.logEvent("w","Delete file from ringtones", "Deleting ringtone from library failed: " + Log.getStackTraceString(e), 2);
}
newRingTone = context.getContentResolver().insert(existingRingTone, values); newRingTone = context.getContentResolver().insert(existingRingTone, values);
}
RingtoneManager.setActualDefaultRingtoneUri(context, ringtoneType, newRingTone); RingtoneManager.setActualDefaultRingtoneUri(context, ringtoneType, newRingTone);
Miscellaneous.logEvent("i", "Profile", "Ringtone set to: " + newRingTone.toString(), 1);
return true; Miscellaneous.logEvent("i", "Profile", "Ringtone set to: " + newRingTone.toString(), 1);
} return true;
catch (Throwable t) }
{ catch (Throwable t)
String message = "Error setting ringtone: " + Log.getStackTraceString(t); {
Miscellaneous.logEvent("e", "Profile", message, 1); String message = "Error setting ringtone: " + Log.getStackTraceString(t);
Miscellaneous.logEvent("e", "Profile", message, 1);
}
} }
return false; return false;
@ -568,17 +585,17 @@ public class Profile implements Comparable<Profile>
} }
finally finally
{ {
Miscellaneous.logEvent("i", "POI", "Checking for applicable rule after profile " + this.getName() + " has been activated.", 2); Miscellaneous.logEvent("i", "Profile", "Checking for applicable rules after profile " + this.getName() + " has been activated.", 2);
List<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.profileActive); List<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.profileActive);
for(int i=0; i<ruleCandidates.size(); i++) for(int i=0; i<ruleCandidates.size(); i++)
{ {
if(ruleCandidates.get(i).haveEnoughPermissions() && ruleCandidates.get(i).getsGreenLight(AutomationService.getInstance())) if(ruleCandidates.get(i).haveEnoughPermissions() && ruleCandidates.get(i).getsGreenLight(AutomationService.getInstance()))
{ {
Miscellaneous.logEvent("i", "POI", "Rule " + ruleCandidates.get(i).getName() + " applies after " + this.getName() + " has been activated.", 2); Miscellaneous.logEvent("i", "Profile", "Rule " + ruleCandidates.get(i).getName() + " applies after " + this.getName() + " has been activated.", 2);
ruleCandidates.get(i).activate(AutomationService.getInstance(), false); ruleCandidates.get(i).activate(AutomationService.getInstance(), false);
} }
} }
Miscellaneous.logEvent("i", "POI", "Done checking for applicable rule after profile " + this.getName() + " has been activated.", 2); Miscellaneous.logEvent("i", "Profile", "Done checking for applicable rules after profile " + this.getName() + " has been activated.", 2);
} }
} }
else else

View File

@ -31,6 +31,7 @@ import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.Map;
public class Trigger public class Trigger
{ {
@ -61,6 +62,7 @@ public class Trigger
broadcastReceived, broadcastReceived,
tethering, tethering,
subSystemState, subSystemState,
checkVariable,
phoneCall; //phoneCall always needs to be at the very end because of Google's shitty so called privacy phoneCall; //phoneCall always needs to be at the very end because of Google's shitty so called privacy
public String getFullName(Context context) public String getFullName(Context context)
@ -119,6 +121,8 @@ public class Trigger
return context.getResources().getString(R.string.tetheringState); return context.getResources().getString(R.string.tetheringState);
case subSystemState: case subSystemState:
return context.getResources().getString(R.string.subSystemState); return context.getResources().getString(R.string.subSystemState);
case checkVariable:
return context.getResources().getString(R.string.checkVariable);
default: default:
return "Unknown"; return "Unknown";
} }
@ -244,6 +248,10 @@ public class Trigger
if(!checkSubSystemState()) if(!checkSubSystemState())
result = false; result = false;
break; break;
case checkVariable:
if(!checkVariable())
result = false;
break;
default: default:
break; break;
} }
@ -574,6 +582,33 @@ public class Trigger
return false; return false;
} }
boolean checkVariable()
{
try
{
Map<String,String> map = AutomationService.getInstance().getVariableMap();
String[] conditions = this.getTriggerParameter2().split(Trigger.triggerParameter2Split);
if(conditions.length == 1) // no real condition
return true;
else
{
if (map.containsKey(conditions[0]))
{
if (map.get(conditions[0]).equals(conditions[1]))
return true;
}
}
}
catch(Exception e)
{
Miscellaneous.logEvent("e", "checkVariable()", Log.getStackTraceString(e), 1);
}
return false;
}
boolean checkBluetooth() boolean checkBluetooth()
{ {
Miscellaneous.logEvent("i", Miscellaneous.getAnyContext().getResources().getString(R.string.ruleCheckOf), String.format("Checking for bluetooth...", this.getParentRule().getName()), 4); Miscellaneous.logEvent("i", Miscellaneous.getAnyContext().getResources().getString(R.string.ruleCheckOf), String.format("Checking for bluetooth...", this.getParentRule().getName()), 4);
@ -842,6 +877,12 @@ public class Trigger
if(this.getTriggerParameter()) if(this.getTriggerParameter())
{ {
if(this.getBatteryLevel() == 100)
{
Miscellaneous.logEvent("i", Miscellaneous.getAnyContext().getResources().getString(R.string.ruleCheckOf), "Rule " + this.getParentRule().getName() + " doesn't apply. Can never exceed 100%.", 3);
return false;
}
if(BatteryReceiver.getBatteryLevel() < this.getBatteryLevel()) if(BatteryReceiver.getBatteryLevel() < this.getBatteryLevel())
{ {
Miscellaneous.logEvent("i", Miscellaneous.getAnyContext().getResources().getString(R.string.ruleCheckOf), String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.ruleDoesntApplyBatteryLowerThan) + " " + String.valueOf(this.getBatteryLevel()), this.getParentRule().getName()), 3); Miscellaneous.logEvent("i", Miscellaneous.getAnyContext().getResources().getString(R.string.ruleCheckOf), String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.ruleDoesntApplyBatteryLowerThan) + " " + String.valueOf(this.getBatteryLevel()), this.getParentRule().getName()), 3);
@ -850,6 +891,12 @@ public class Trigger
} }
else else
{ {
if(this.getBatteryLevel() == 0)
{
Miscellaneous.logEvent("i", Miscellaneous.getAnyContext().getResources().getString(R.string.ruleCheckOf), "Rule " + this.getParentRule().getName() + " doesn't apply. Can never drop below 0%.", 3);
return false;
}
if(BatteryReceiver.getBatteryLevel() < 100 && BatteryReceiver.getBatteryLevel() >= this.getBatteryLevel() if(BatteryReceiver.getBatteryLevel() < 100 && BatteryReceiver.getBatteryLevel() >= this.getBatteryLevel()
|| ||
BatteryReceiver.getBatteryLevel() > this.getBatteryLevel() BatteryReceiver.getBatteryLevel() > this.getBatteryLevel()
@ -1383,7 +1430,7 @@ public class Trigger
public void setTriggerParameter2(String triggerParameter2) public void setTriggerParameter2(String triggerParameter2)
{ {
this.triggerParameter2 = triggerParameter2; this.triggerParameter2 = triggerParameter2.trim();
} }
public TimeFrame getTimeFrame() public TimeFrame getTimeFrame()
@ -1406,7 +1453,7 @@ public class Trigger
switch(this.getTriggerType()) switch(this.getTriggerType())
{ {
case charging: case charging:
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.starting) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.starting) + " ");
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.stopping) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.stopping) + " ");
@ -1414,14 +1461,14 @@ public class Trigger
break; break;
case batteryLevel: case batteryLevel:
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.batteryLevel)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.batteryLevel));
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.exceeds) + " "); returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.exceeds) + " ");
else else
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.dropsBelow) + " "); returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.dropsBelow) + " ");
returnString.append(String.valueOf(this.getBatteryLevel()) + " %"); returnString.append(String.valueOf(this.getBatteryLevel()) + " %");
break; break;
case usb_host_connection: case usb_host_connection:
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.connecting) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.connecting) + " ");
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.disconnecting) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.disconnecting) + " ");
@ -1429,9 +1476,9 @@ public class Trigger
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.triggerUsb_host_connection)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.triggerUsb_host_connection));
break; break;
case pointOfInterest: case pointOfInterest:
if(this.getPointOfInterest() != null) if (this.getPointOfInterest() != null)
{ {
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.entering) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.entering) + " ");
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.leaving) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.leaving) + " ");
@ -1440,33 +1487,33 @@ public class Trigger
} }
else else
{ {
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.leaving) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.anyLocation)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.leaving) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.anyLocation));
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.entering) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.anyLocation)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.entering) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.anyLocation));
} }
break; break;
case timeFrame: case timeFrame:
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.entering) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.entering) + " ");
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.leaving) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.leaving) + " ");
String repeat = ", " + Miscellaneous.getAnyContext().getResources().getString(R.string.noRepetition); String repeat = ", " + Miscellaneous.getAnyContext().getResources().getString(R.string.noRepetition);
if(this.getTimeFrame().getRepetition() > 0) if (this.getTimeFrame().getRepetition() > 0)
repeat = ", " + String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.repeatEveryXsecondsWithVariable), String.valueOf(this.getTimeFrame().getRepetition())); repeat = ", " + String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.repeatEveryXsecondsWithVariable), String.valueOf(this.getTimeFrame().getRepetition()));
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.triggerTimeFrame) + ": " + this.getTimeFrame().getTriggerTimeStart().toString() + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.until) + " " + this.getTimeFrame().getTriggerTimeStop().toString() + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.onDays) + " " + this.getTimeFrame().getDayList().toString() + repeat); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.triggerTimeFrame) + ": " + this.getTimeFrame().getTriggerTimeStart().toString() + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.until) + " " + this.getTimeFrame().getTriggerTimeStop().toString() + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.onDays) + " " + this.getTimeFrame().getDayList().toString() + repeat);
break; break;
case speed: case speed:
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.exceeding) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.exceeding) + " ");
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.droppingBelow) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.droppingBelow) + " ");
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.triggerSpeed) + ": " + String.valueOf(this.getSpeed()) + " km/h"); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.triggerSpeed) + ": " + String.valueOf(this.getSpeed()) + " km/h");
break; break;
case noiseLevel: case noiseLevel:
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.exceeding) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.exceeding) + " ");
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.droppingBelow) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.droppingBelow) + " ");
@ -1475,12 +1522,12 @@ public class Trigger
break; break;
case wifiConnection: case wifiConnection:
String wifiDisplayName = ""; String wifiDisplayName = "";
if(this.getTriggerParameter2().length() == 0) if (this.getTriggerParameter2().length() == 0)
wifiDisplayName += Miscellaneous.getAnyContext().getResources().getString(R.string.anyWifi); wifiDisplayName += Miscellaneous.getAnyContext().getResources().getString(R.string.anyWifi);
else else
wifiDisplayName += this.getTriggerParameter2(); wifiDisplayName += this.getTriggerParameter2();
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.connectedToWifi), wifiDisplayName)); returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.connectedToWifi), wifiDisplayName));
else else
returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.disconnectedFromWifi), wifiDisplayName)); returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.disconnectedFromWifi), wifiDisplayName));
@ -1488,13 +1535,13 @@ public class Trigger
break; break;
case process_started_stopped: case process_started_stopped:
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.application) + " " + this.getProcessName() + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.is) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.application) + " " + this.getProcessName() + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.is) + " ");
if(this.triggerParameter) if (this.triggerParameter)
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.started)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.started));
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.stopped)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.stopped));
break; break;
case airplaneMode: case airplaneMode:
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.activated) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.activated) + " ");
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.deactivated) + " "); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.deactivated) + " ");
@ -1502,7 +1549,7 @@ public class Trigger
break; break;
case roaming: case roaming:
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.roaming)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.roaming));
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.activated)); returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.activated));
else else
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.deactivated)); returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.deactivated));
@ -1514,27 +1561,27 @@ public class Trigger
returnString.append(" "); returnString.append(" ");
if(elements[1].equals(triggerPhoneCallDirectionAny)) if (elements[1].equals(triggerPhoneCallDirectionAny))
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.with)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.with));
else if(elements[1].equals(triggerPhoneCallDirectionIncoming)) else if (elements[1].equals(triggerPhoneCallDirectionIncoming))
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.from)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.from));
else if(elements[1].equals(triggerPhoneCallDirectionOutgoing)) else if (elements[1].equals(triggerPhoneCallDirectionOutgoing))
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.to)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.to));
returnString.append(" "); returnString.append(" ");
if(elements[2].equals(Trigger.triggerPhoneCallNumberAny)) if (elements[2].equals(Trigger.triggerPhoneCallNumberAny))
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.any) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.number)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.any) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.number));
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.number) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.matching) + " " + elements[2]); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.number) + " " + Miscellaneous.getAnyContext().getResources().getString(R.string.matching) + " " + elements[2]);
returnString.append(" "); returnString.append(" ");
if(elements[0].equals(Trigger.triggerPhoneCallStateRinging)) if (elements[0].equals(Trigger.triggerPhoneCallStateRinging))
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.ringing)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.ringing));
else if(elements[0].equals(Trigger.triggerPhoneCallStateStarted)) else if (elements[0].equals(Trigger.triggerPhoneCallStateStarted))
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.started)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.started));
else if(elements[0].equals(Trigger.triggerPhoneCallStateStopped)) else if (elements[0].equals(Trigger.triggerPhoneCallStateStopped))
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.stopped)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.stopped));
break; break;
@ -1554,18 +1601,18 @@ public class Trigger
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.featureNotInFdroidVersion)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.featureNotInFdroidVersion));
} }
catch(ClassNotFoundException e) catch (ClassNotFoundException e)
{ {
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.featureNotInFdroidVersion)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.featureNotInFdroidVersion));
} }
break; break;
case bluetoothConnection: case bluetoothConnection:
String device = Miscellaneous.getAnyContext().getResources().getString(R.string.anyDevice); String device = Miscellaneous.getAnyContext().getResources().getString(R.string.anyDevice);
if(bluetoothDeviceAddress.equals("<any>")) if (bluetoothDeviceAddress.equals("<any>"))
{ {
device = Miscellaneous.getAnyContext().getResources().getString(R.string.any); device = Miscellaneous.getAnyContext().getResources().getString(R.string.any);
} }
else if(bluetoothDeviceAddress.equals("<none>")) else if (bluetoothDeviceAddress.equals("<none>"))
{ {
device = Miscellaneous.getAnyContext().getResources().getString(R.string.noDevice); device = Miscellaneous.getAnyContext().getResources().getString(R.string.noDevice);
} }
@ -1575,21 +1622,21 @@ public class Trigger
{ {
device = BluetoothReceiver.getDeviceByAddress(bluetoothDeviceAddress).getName() + " (" + this.bluetoothDeviceAddress + ")"; device = BluetoothReceiver.getDeviceByAddress(bluetoothDeviceAddress).getName() + " (" + this.bluetoothDeviceAddress + ")";
} }
catch(NullPointerException e) catch (NullPointerException e)
{ {
device = Miscellaneous.getAnyContext().getResources().getString(R.string.invalidDevice) + ": " + this.bluetoothDeviceAddress; device = Miscellaneous.getAnyContext().getResources().getString(R.string.invalidDevice) + ": " + this.bluetoothDeviceAddress;
Miscellaneous.logEvent("w", "Trigger", device, 3); Miscellaneous.logEvent("w", "Trigger", device, 3);
} }
} }
if(bluetoothEvent.equals(BluetoothDevice.ACTION_ACL_CONNECTED) || bluetoothEvent.equals(BluetoothDevice.ACTION_ACL_DISCONNECTED)) if (bluetoothEvent.equals(BluetoothDevice.ACTION_ACL_CONNECTED) || bluetoothEvent.equals(BluetoothDevice.ACTION_ACL_DISCONNECTED))
{ {
if (this.triggerParameter) if (this.triggerParameter)
returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.bluetoothConnectionTo), device)); returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.bluetoothConnectionTo), device));
else else
returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.bluetoothDisconnectFrom), device)); returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.bluetoothDisconnectFrom), device));
} }
else if(bluetoothEvent.equals(BluetoothDevice.ACTION_FOUND)) else if (bluetoothEvent.equals(BluetoothDevice.ACTION_FOUND))
{ {
if (this.triggerParameter) if (this.triggerParameter)
returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.bluetoothDeviceInRange), device)); returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.bluetoothDeviceInRange), device));
@ -1599,7 +1646,7 @@ public class Trigger
break; break;
case headsetPlugged: case headsetPlugged:
String type; String type;
switch(headphoneType) switch (headphoneType)
{ {
case 0: case 0:
type = Miscellaneous.getAnyContext().getResources().getString(R.string.headphoneSimple); type = Miscellaneous.getAnyContext().getResources().getString(R.string.headphoneSimple);
@ -1614,13 +1661,13 @@ public class Trigger
type = Miscellaneous.getAnyContext().getResources().getString(R.string.notSet); type = Miscellaneous.getAnyContext().getResources().getString(R.string.notSet);
break; break;
} }
if(getTriggerParameter()) if (getTriggerParameter())
returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.headsetConnected), type)); returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.headsetConnected), type));
else else
returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.headsetDisconnected), type)); returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.headsetDisconnected), type));
break; break;
case notification: case notification:
if(this.getTriggerParameter2().contains(triggerParameter2Split)) if (this.getTriggerParameter2().contains(triggerParameter2Split))
{ {
String[] params = getTriggerParameter2().split(triggerParameter2Split); String[] params = getTriggerParameter2().split(triggerParameter2Split);
@ -1641,7 +1688,7 @@ public class Trigger
else else
appString = "app " + app; appString = "app " + app;
if(triggerParameter) if (triggerParameter)
triggerBuilder.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.postsNotification), appString)); triggerBuilder.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.postsNotification), appString));
else else
triggerBuilder.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.removedNotification), appString)); triggerBuilder.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.removedNotification), appString));
@ -1663,26 +1710,26 @@ public class Trigger
returnString.append(Miscellaneous.getAnyContext().getString(R.string.deviceIsInCertainOrientation)); returnString.append(Miscellaneous.getAnyContext().getString(R.string.deviceIsInCertainOrientation));
break; break;
case profileActive: case profileActive:
if(triggerParameter) if (triggerParameter)
returnString.append(String.format(Miscellaneous.getAnyContext().getString(R.string.profileActive), getTriggerParameter2().split(Trigger.triggerParameter2Split)[0])); returnString.append(String.format(Miscellaneous.getAnyContext().getString(R.string.profileActive), getTriggerParameter2().split(Trigger.triggerParameter2Split)[0]));
else else
returnString.append(String.format(Miscellaneous.getAnyContext().getString(R.string.profileNotActive), getTriggerParameter2().split(Trigger.triggerParameter2Split)[0])); returnString.append(String.format(Miscellaneous.getAnyContext().getString(R.string.profileNotActive), getTriggerParameter2().split(Trigger.triggerParameter2Split)[0]));
break; break;
case musicPlaying: case musicPlaying:
if(triggerParameter) if (triggerParameter)
returnString.append(Miscellaneous.getAnyContext().getString(R.string.musicIsPlaying)); returnString.append(Miscellaneous.getAnyContext().getString(R.string.musicIsPlaying));
else else
returnString.append(Miscellaneous.getAnyContext().getString(R.string.musicIsNotPlaying)); returnString.append(Miscellaneous.getAnyContext().getString(R.string.musicIsNotPlaying));
break; break;
case screenState: case screenState:
String state; String state;
switch(triggerParameter2) switch (triggerParameter2)
{ {
case "0": case "0":
state = Miscellaneous.getAnyContext().getString(R.string.off); state = Miscellaneous.getAnyContext().getString(R.string.off);
break; break;
case "1": case "1":
state = Miscellaneous.getAnyContext().getString(R.string.on); state = Miscellaneous.getAnyContext().getString(R.string.on);
break; break;
case "2": case "2":
state = Miscellaneous.getAnyContext().getString(R.string.unlocked); state = Miscellaneous.getAnyContext().getString(R.string.unlocked);
@ -1707,7 +1754,7 @@ public class Trigger
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.serviceIsStarting) + ": " + String.valueOf(triggerParameter)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.serviceIsStarting) + ": " + String.valueOf(triggerParameter));
break; break;
case broadcastReceived: case broadcastReceived:
if(triggerParameter) if (triggerParameter)
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.broadcastReceived)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.broadcastReceived));
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.broadcastNotReceived)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.broadcastNotReceived));
@ -1715,7 +1762,7 @@ public class Trigger
returnString.append(": " + triggerParameter2); returnString.append(": " + triggerParameter2);
break; break;
case tethering: case tethering:
if(triggerParameter) if (triggerParameter)
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.tetheringActive)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.tetheringActive));
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.tetheringNotActive)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.tetheringNotActive));
@ -1724,7 +1771,7 @@ public class Trigger
break; break;
case subSystemState: case subSystemState:
Trigger.subSystemStates desiredState = subSystemStates.valueOf(triggerParameter2); Trigger.subSystemStates desiredState = subSystemStates.valueOf(triggerParameter2);
switch(desiredState) switch (desiredState)
{ {
case wifi: case wifi:
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.wifi)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.wifi));
@ -1736,11 +1783,20 @@ public class Trigger
returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.is) + " "); returnString.append(" " + Miscellaneous.getAnyContext().getResources().getString(R.string.is) + " ");
if(triggerParameter) if (triggerParameter)
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.activated)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.activated));
else else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.deactivated)); returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.deactivated));
break; break;
case checkVariable:
if (triggerParameter2.contains(triggerParameter2Split))
{
String[] parts = triggerParameter2.split(triggerParameter2Split);
returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.variableCheckString), parts[0], parts[1]));
}
else
returnString.append(String.format(Miscellaneous.getAnyContext().getResources().getString(R.string.variableCheckStringDeleted), triggerParameter2));
break;
default: default:
returnString.append("error"); returnString.append("error");
break; break;

View File

@ -160,9 +160,9 @@ public class XmlFileInterface
serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getChangeIncomingCallsRingtone())); serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getChangeIncomingCallsRingtone()));
serializer.endTag(null, "changeIncomingCallsRingtone");// serializer.endTag(null, "changeIncomingCallsRingtone");//
serializer.startTag(null, "incomingCallsRingtone"); serializer.startTag(null, "incomingCallsRingtone");
File incomingFile = Profile.getProfileCollection().get(i).getIncomingCallsRingtone(); String incomingFile = Profile.getProfileCollection().get(i).getIncomingCallsRingtone();
if(incomingFile != null) if(incomingFile != null)
serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getIncomingCallsRingtone().getPath())); serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getIncomingCallsRingtone()));
else else
serializer.text("null"); serializer.text("null");
serializer.endTag(null, "incomingCallsRingtone"); serializer.endTag(null, "incomingCallsRingtone");
@ -178,9 +178,9 @@ public class XmlFileInterface
serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getChangeNotificationRingtone())); serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getChangeNotificationRingtone()));
serializer.endTag(null, "changeNotificationRingtone");// serializer.endTag(null, "changeNotificationRingtone");//
serializer.startTag(null, "notificationRingtone"); serializer.startTag(null, "notificationRingtone");
File notificationFile = Profile.getProfileCollection().get(i).getNotificationRingtone(); String notificationFile = Profile.getProfileCollection().get(i).getNotificationRingtone();
if(notificationFile != null) if(notificationFile != null)
serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getNotificationRingtone().getPath())); serializer.text(String.valueOf(Profile.getProfileCollection().get(i).getNotificationRingtone()));
else else
serializer.text("null"); serializer.text("null");
serializer.endTag(null, "notificationRingtone"); serializer.endTag(null, "notificationRingtone");
@ -631,7 +631,7 @@ public class XmlFileInterface
{ {
String path = readTag(parser, "incomingCallsRingtone"); String path = readTag(parser, "incomingCallsRingtone");
if(!path.equals("null")) if(!path.equals("null"))
newProfile.setIncomingCallsRingtone(new File(path)); newProfile.setIncomingCallsRingtone(path);
else else
newProfile.setIncomingCallsRingtone(null); newProfile.setIncomingCallsRingtone(null);
} }
@ -643,7 +643,7 @@ public class XmlFileInterface
{ {
String path = readTag(parser, "notificationRingtone"); String path = readTag(parser, "notificationRingtone");
if(!path.equals("null")) if(!path.equals("null"))
newProfile.setNotificationRingtone(new File(path)); newProfile.setNotificationRingtone(path);
else else
newProfile.setNotificationRingtone(null); newProfile.setNotificationRingtone(null);
} }

View File

@ -19,14 +19,13 @@ import java.util.ArrayList;
public class BatteryReceiver extends BroadcastReceiver implements AutomationListenerInterface public class BatteryReceiver extends BroadcastReceiver implements AutomationListenerInterface
{ {
private static int batteryLevel = -1; // initialize with a better value than this
public static AutomationService automationServiceRef = null; public static AutomationService automationServiceRef = null;
private static boolean usbHostConnected = false; static int batteryLevel = -1; // initialize with a better value than this
static boolean usbHostConnected = false;
private static boolean batteryReceiverActive = false; static boolean batteryReceiverActive = false;
private static IntentFilter batteryIntentFilter = null; static IntentFilter batteryIntentFilter = null;
private static Intent batteryStatus = null; static Intent batteryStatus = null;
private static BroadcastReceiver batteryInfoReceiverInstance = null; static BroadcastReceiver batteryInfoReceiverInstance = null;
public static void startBatteryReceiver(final AutomationService automationServiceRef) public static void startBatteryReceiver(final AutomationService automationServiceRef)
{ {
@ -90,7 +89,7 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
@Override @Override
public void onReceive(Context context, Intent intent) public void onReceive(Context context, Intent intent)
{ {
// Log.i("Battery", "Some battery event"); Miscellaneous.logEvent("i", "BatteryReceiver", "Received event " + intent.getAction(), 5);
if (intent == null) if (intent == null)
return; return;
@ -133,6 +132,7 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
switch(status) switch(status)
{ {
case BatteryManager.BATTERY_STATUS_CHARGING:
case BatteryManager.BATTERY_STATUS_FULL: case BatteryManager.BATTERY_STATUS_FULL:
Miscellaneous.logEvent("i", "BatteryReceiver", "Device has been fully charged.", 5); Miscellaneous.logEvent("i", "BatteryReceiver", "Device has been fully charged.", 5);
this.actionCharging(context); this.actionCharging(context);

View File

@ -76,7 +76,6 @@ public class HeadphoneJackListener extends BroadcastReceiver implements Automati
} }
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.headsetPlugged); ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.headsetPlugged);
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByHeadphoneJack(isHeadsetConnected());
for(int i=0; i<ruleCandidates.size(); i++) for(int i=0; i<ruleCandidates.size(); i++)
{ {
if(ruleCandidates.get(i).getsGreenLight(context)) if(ruleCandidates.get(i).getsGreenLight(context))
@ -104,7 +103,6 @@ public class HeadphoneJackListener extends BroadcastReceiver implements Automati
{ {
Miscellaneous.logEvent("i", "HeadsetJackListener", "Starting HeadsetJackListener", 4); Miscellaneous.logEvent("i", "HeadsetJackListener", "Starting HeadsetJackListener", 4);
headphoneJackListenerActive = true; headphoneJackListenerActive = true;
// getInstance().startHeadphoneJackListener(AutomationService.getInstance(), headphoneJackListenerIntentFilter);
automationService.registerReceiver(this, headphoneJackListenerIntentFilter); automationService.registerReceiver(this, headphoneJackListenerIntentFilter);
} }
} }
@ -122,7 +120,6 @@ public class HeadphoneJackListener extends BroadcastReceiver implements Automati
if(headphoneJackListenerActive) if(headphoneJackListenerActive)
{ {
Miscellaneous.logEvent("i", "HeadsetJackListener", "Stopping HeadsetJackListener", 4); Miscellaneous.logEvent("i", "HeadsetJackListener", "Stopping HeadsetJackListener", 4);
// getInstance().stopHeadphoneJackListener(AutomationService.getInstance());
automationService.unregisterReceiver(this); automationService.unregisterReceiver(this);
headphoneJackListenerActive = false; headphoneJackListenerActive = false;
} }
@ -150,5 +147,4 @@ public class HeadphoneJackListener extends BroadcastReceiver implements Automati
{ {
return new Trigger_Enum[] { Trigger_Enum.headsetPlugged }; return new Trigger_Enum[] { Trigger_Enum.headsetPlugged };
} }
} }

View File

@ -0,0 +1,64 @@
<?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="match_parent"
android:orientation="vertical"
android:layout_margin="@dimen/default_margin" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_span="2"
android:textSize="25dp"
android:textStyle="bold"
android:layout_marginBottom="@dimen/default_margin"
android:text="@string/startPhoneCall"/>
<TextView
android:id="@+id/tvMakePhoneCallExplanation1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/makePhoneCallExplanation1" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/default_margin"
android:stretchColumns="1"
android:shrinkColumns="1" >
<TableRow
android:layout_marginTop="@dimen/default_margin">
<TextView
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/default_margin"
android:text="@string/phoneNumber" />
<EditText
android:id="@+id/etTargetPhoneNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="phone"/>
</TableRow>
</TableLayout>
<Button
android:id="@+id/bActionMakePhoneCallSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/default_margin"
android:text="@string/save" />
</LinearLayout>
</ScrollView>

View File

@ -41,6 +41,32 @@
<requestFocus /> <requestFocus />
</EditText> </EditText>
<TextView
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/messageType" />
<RadioGroup
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<RadioButton
android:id="@+id/rbMessageTypeSms"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/sms" />
<RadioButton
android:id="@+id/rbMessageTypeMms"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/mms" />
</RadioGroup>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -67,6 +93,23 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/urlLegend" /> android:text="@string/urlLegend" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/attachment" />
<TextView
android:id="@+id/tvSendMmsFileAttachment"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:id="@+id/bMmsAttachment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false"
android:text="@string/chooseFile" />
<Button <Button
android:id="@+id/bSaveSendTextMessage" android:id="@+id/bSaveSendTextMessage"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/default_margin" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setVariable"
android:textSize="25dp"
android:layout_marginBottom="@dimen/default_margin" />
<TableLayout
android:layout_marginLeft="@dimen/default_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:shrinkColumns="1"
android:stretchColumns="1" >
<TableRow>
<TextView
android:text="@string/VariableKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/etVariableSetKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="text" />
</TableRow>
<TableRow>
<TextView
android:text="@string/variableValue"
android:layout_marginRight="@dimen/default_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/etVariableSetValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginVertical="@dimen/default_margin"
android:text="@string/setVariableExplanation" />
<Button
android:id="@+id/bSaveVariable"
android:layout_marginTop="@dimen/default_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/save" />
</LinearLayout>
</ScrollView>

View File

@ -129,6 +129,12 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/startAppBySendBroadcast" /> android:text="@string/startAppBySendBroadcast" />
<RadioButton
android:id="@+id/rbStartAppByService"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/startAppByStartService" />
</RadioGroup> </RadioGroup>
</TableRow> </TableRow>

View File

@ -0,0 +1,80 @@
<?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="match_parent"
android:orientation="vertical"
android:layout_margin="@dimen/default_margin" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_span="2"
android:textSize="25dp"
android:textStyle="bold"
android:layout_marginBottom="@dimen/default_margin"
android:text="@string/checkVariable"/>
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/default_margin"
android:stretchColumns="1"
android:shrinkColumns="1" >
<TableRow
android:layout_marginTop="@dimen/default_margin">
<TextView
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/default_margin"
android:text="@string/VariableKey" />
<EditText
android:id="@+id/etVariableKeyTrigger"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:layout_marginTop="@dimen/default_margin">
<TextView
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/default_margin"
android:text="@string/variableValue" />
<EditText
android:id="@+id/etVariableValueTrigger"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/default_margin"
android:text="@string/checkVariableExplanation" />
<Button
android:id="@+id/bTriggerVariableSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/default_margin"
android:text="@string/save" />
</LinearLayout>
</ScrollView>

View File

@ -270,7 +270,8 @@
<string name="phoneCall">Telefongespräch</string> <string name="phoneCall">Telefongespräch</string>
<string name="with">mit</string> <string name="with">mit</string>
<string name="phoneNumber">Telefonnummer</string> <string name="phoneNumber">Telefonnummer</string>
<string name="enterPhoneNumber">Geben Sie eine Telefonnummer ein. Leer lassen für irgendeine Nummer.</string> <string name="enterPhoneNumberBlankForAny">Geben Sie eine Telefonnummer ein. Leer lassen für irgendeine Nummer.</string>
<string name="enterPhoneNumber">Geben Sie eine Telefonnummer ein.</string>
<string name="phoneDirection">Wählen Sie die\nGesprächsrichtung</string> <string name="phoneDirection">Wählen Sie die\nGesprächsrichtung</string>
<string name="any">egal</string> <string name="any">egal</string>
<string name="incoming">eingehend</string> <string name="incoming">eingehend</string>
@ -511,7 +512,7 @@
<string name="googleLocationChicaneryOld">Diese Anwendung sammelt Positionsdaten, um festzustellen, ob Sie sich gerade an einem der Orte aufhalten, die Sie definiert haben. Außerdem wird es benutzt, um Ihre Geschwindigkeit zu ermitteln, falls Sie diese in Regeln verwenden. Das wird auch dann gemacht, wenn das Programm nicht im Vordergrund ist (aber nur, wenn der Dienst aktiv ist).</string> <string name="googleLocationChicaneryOld">Diese Anwendung sammelt Positionsdaten, um festzustellen, ob Sie sich gerade an einem der Orte aufhalten, die Sie definiert haben. Außerdem wird es benutzt, um Ihre Geschwindigkeit zu ermitteln, falls Sie diese in Regeln verwenden. Das wird auch dann gemacht, wenn das Programm nicht im Vordergrund ist (aber nur, wenn der Dienst aktiv ist).</string>
<string name="error">Fehler</string> <string name="error">Fehler</string>
<string name="featureNotInFdroidVersion">Diese Funktion basiert auf nicht-freier Software (Google Bibliotheken). Daher ist sie in der F-Droid Version nicht verfügbar.</string> <string name="featureNotInFdroidVersion">Diese Funktion basiert auf nicht-freier Software (Google Bibliotheken). Daher ist sie in der F-Droid Version nicht verfügbar.</string>
<string name="settingsReferringToRestrictedFeatures">Ihre Einstellungen und Regeln verwenden derzeit nicht-freie Funktionen (Google Bibliotheken). Diese sind in der F-Droid Version nicht funktionsfähig. Das schließt die Erkennung Ihrer gegenwärtigen körperlichen Aktivität ein.</string> <string name="settingsReferringToRestrictedFeaturesInFdroid">Ihre Einstellungen und Regeln verwenden derzeit nicht-freie Funktionen (Google Bibliotheken). Diese sind in der F-Droid Version nicht funktionsfähig. Das schließt die Erkennung Ihrer gegenwärtigen körperlichen Aktivität ein.</string>
<string name="displayNewsOnMainScreen">Nachrichten auf dem Hauptbildschirm anzeigen</string> <string name="displayNewsOnMainScreen">Nachrichten auf dem Hauptbildschirm anzeigen</string>
<string name="displayNewsOnMainScreenDescription">Nachrichten ausschließlich über diese Anwendung, wir sprechen von 1-2 pro Jahr, nicht mehr.</string> <string name="displayNewsOnMainScreenDescription">Nachrichten ausschließlich über diese Anwendung, wir sprechen von 1-2 pro Jahr, nicht mehr.</string>
<string name="newsOptIn">Möchten Sie wichtige Nachrichten über diese Anwendung auf dem Hauptbildschirm angezeigt bekommen? Diese werden von der Webseite des Entwicklers heruntergeladen. Es gibt keine aufdringliche Benachrichtigung, etc., lediglich eine stille Anzeige auf dem Hauptbildschirm.</string> <string name="newsOptIn">Möchten Sie wichtige Nachrichten über diese Anwendung auf dem Hauptbildschirm angezeigt bekommen? Diese werden von der Webseite des Entwicklers heruntergeladen. Es gibt keine aufdringliche Benachrichtigung, etc., lediglich eine stille Anzeige auf dem Hauptbildschirm.</string>
@ -736,7 +737,7 @@
<string name="tetheringState">Tethering Status</string> <string name="tetheringState">Tethering Status</string>
<string name="wifiExplanation2">Während der Flugmodus aktiv ist, kann WLAN nur von Anwendungen ein- oder ausgeschaltet werden, wenn root-Rechte dafür verwendet werden.</string> <string name="wifiExplanation2">Während der Flugmodus aktiv ist, kann WLAN nur von Anwendungen ein- oder ausgeschaltet werden, wenn root-Rechte dafür verwendet werden.</string>
<string name="wifiExplanation1">Anwendungen, die auf Android Q oder höher ausgerichtet sind, können WLAN nicht mehr ein- oder ausschalten. Daran ist Google schuld, nicht ich.\n\nSie können diese Einschränkung umgehen, indem Sie Ihr Gerät rooten und die Checkbox unten aktivieren. Alternativ laden Sie sich diese Anwendung von F-Droid oder meiner Webseite herunter. In diesen Versionen bin ich nicht gezwungen, die Anwendungen auf die neuesten API Level zu unterstützen.</string> <string name="wifiExplanation1">Anwendungen, die auf Android Q oder höher ausgerichtet sind, können WLAN nicht mehr ein- oder ausschalten. Daran ist Google schuld, nicht ich.\n\nSie können diese Einschränkung umgehen, indem Sie Ihr Gerät rooten und die Checkbox unten aktivieren. Alternativ laden Sie sich diese Anwendung von F-Droid oder meiner Webseite herunter. In diesen Versionen bin ich nicht gezwungen, die Anwendungen auf die neuesten API Level zu unterstützen.</string>
<string name="runExecutableExplanation">Sie können ein Script oder eine andere ausführbare Datei auswählen, die dann als Aktion ausgeführt wird.\n\nAllerdings gibt es ein paar Voraussetzungen, um die Sie sich selbst kümmern müssen. Google hat es sehr schwer gemacht, irgendetwas außer normalen Android Anwendungen auszuführen.\n\n1.\nDie Datei muß im Dateisystem als ausführbar markiert sein. Auf einem normalen Android-System (ohne Root) ist das in der Tat der schwierigste Teil.\n\n2.\nDas bedeutet auch, daß auch Automation in der Lage sein muß, die Datei auszuführen, nicht nur der Besitzer oder die Gruppe.\n\n3.\nWenn es ein Script ist, muß eine gültige Shell im Header des Scripts definiert sein.</string> <string name="runExecutableExplanation">Sie können hier ein Skript oder eine ausführbare Datei auswählen, die als Aktion ausgeführt wird.\n\nEs gibt aber einige Voraussetzungen, mit denen Sie sich selbst auseinandersetzen müssen. Google hat es sehr schwierig gemacht, etwas anderes als normale Android-Anwendungen auszuführen.\n\n1. Das Skript muss als ausführbar markiert sein. Auf einem normalen Android-System (ohne root) ist dies eigentlich der schwierige Teil.\n\n2. Das bedeutet auch, dass Automation in der Lage sein muß, die Datei auszuführen, nicht nur der Besitzer oder die Gruppe.\n\n3. Falls es sich um ein Skript handelt, muß im Header des Scripts eine gültige Shell angegeben sein.\n\nFalls Sie die oben genannten Anforderungen nicht erfüllen können, können Sie alternativ versuchen, eine Shell als tatsächliche ausführbare Datei (z. B. /system/bin/sh) und Ihr Skript als Parameter anzugeben. Das hat für mindestens einen Benutzer funktioniert.</string>
<string name="regularExpressionsIfEquals">Falls \"ist gleich\" ausgewählt ist, können Sie reguläre Ausdrücke eingeben.</string> <string name="regularExpressionsIfEquals">Falls \"ist gleich\" ausgewählt ist, können Sie reguläre Ausdrücke eingeben.</string>
<string name="enter_a_number">Geben Sie eine Zahl ein.</string> <string name="enter_a_number">Geben Sie eine Zahl ein.</string>
<string name="duration">Dauer [ms]</string> <string name="duration">Dauer [ms]</string>
@ -754,4 +755,20 @@
<string name="cable">Kabel</string> <string name="cable">Kabel</string>
<string name="tetheringBluetoothNotPossible">Bluetooth tethering kann gegenwärtig nicht detektiert werden. Nur die anderen Verbindungsarten werden diesen Auslöser aktivieren.</string> <string name="tetheringBluetoothNotPossible">Bluetooth tethering kann gegenwärtig nicht detektiert werden. Nur die anderen Verbindungsarten werden diesen Auslöser aktivieren.</string>
<string name="type">Art</string> <string name="type">Art</string>
<string name="startPhoneCall">Telefonnummer anrufen</string>
<string name="android.permission.CALL_PHONE">Telefonnummer anrufen</string>
<string name="makePhoneCallExplanation1">Hier können Sie eine Telefonnummer eingeben, die ohne weitere Aufforderung angerufen wird. Sie können dies verwenden, um Einstellungen vorzunehmen, z. B. Anpassungen an der Anrufweiterleitung usw. vorzunehmen. Bitte suchen Sie selbst nach den dafür benötigten Codes.</string>
<string name="endPhoneCall">Telefonanruf beenden</string>
<string name="android.permission.ANSWER_PHONE_CALLS">Telefonanruf beenden</string>
<string name="settingsReferringToRestrictedFeaturesInGoogle">Ihre Einstellungen und/oder Regeln verweisen derzeit auf Funktionen, die in der Google Play-Version nicht bereitgestellt werden können. Dazu gehört unter anderem alles, was mit Telefonaten und Textnachrichten zu tun hat.</string>
<string name="setVariable">Variable festlegen</string>
<string name="deleteVariable">Variable löschen</string>
<string name="VariableKey">Variablenname</string>
<string name="variableValue">Variablenwert</string>
<string name="setVariableExplanation">Wenn Sie für eine Variable einen leeren Wert angeben, wird sie gelöscht.</string>
<string name="enterVariableKey">Geben Sie einen Namen für die Variable an.</string>
<string name="checkVariable">Variable prüfen</string>
<string name="checkVariableExplanation">Wenn Sie den Wert der Variablen leer lassen, darf sie nicht gesetzt sein, damit die Bedingung als erfüllt gilt.</string>
<string name="variableCheckString">wenn Variable %1$s den Wert %2$s hat</string>
<string name="variableCheckStringDeleted">wenn Variable %1$s nicht gesetzt ist</string>
</resources> </resources>

View File

@ -254,7 +254,8 @@
<string name="headsetDisconnected">Auriculares (tipo: %1$s) desconectados</string> <string name="headsetDisconnected">Auriculares (tipo: %1$s) desconectados</string>
<string name="phoneCall">Llamada</string> <string name="phoneCall">Llamada</string>
<string name="phoneNumber">Número de teléfono</string> <string name="phoneNumber">Número de teléfono</string>
<string name="enterPhoneNumber">Inserte numero de teléfono. Vacio para algún número.</string> <string name="enterPhoneNumberBlankForAny">Inserte numero de teléfono. Vacio para algún número.</string>
<string name="enterPhoneNumber">Inserte numero de teléfono.</string>
<string name="phoneDirection">Elija llamada\nentrante o saliente</string> <string name="phoneDirection">Elija llamada\nentrante o saliente</string>
<string name="headphoneSimple">Auriculares</string> <string name="headphoneSimple">Auriculares</string>
<string name="headphoneSelectType">Elija tipo de auriculares</string> <string name="headphoneSelectType">Elija tipo de auriculares</string>
@ -575,7 +576,7 @@
<string name="screenLockSoundNotice">Sonidos de bloqueo de pantalla no seran mas cambiados en dispositivos que usan Android 6 o mas nuevos. Cualquier ajuste aqui no va a funcionar en cualquier dirección.</string> <string name="screenLockSoundNotice">Sonidos de bloqueo de pantalla no seran mas cambiados en dispositivos que usan Android 6 o mas nuevos. Cualquier ajuste aqui no va a funcionar en cualquier dirección.</string>
<string name="googleLocationChicanery">Este app almacena datos de posición para activar reglas que necesitan la posición o la velocidad - incluso cuando la app esta cerrada o no en uso.</string> <string name="googleLocationChicanery">Este app almacena datos de posición para activar reglas que necesitan la posición o la velocidad - incluso cuando la app esta cerrada o no en uso.</string>
<string name="googleLocationChicaneryOld">Este app almacena datos de posición para determinar si actualmente esta en uno de los sitios que creó. Además estan usados para determinar su actual velocidad (si usa esta condición en reglas). Incluso cuando la app esta cerrada o no en uso (pero solo cuando el servicio esta iniciado).</string> <string name="googleLocationChicaneryOld">Este app almacena datos de posición para determinar si actualmente esta en uno de los sitios que creó. Además estan usados para determinar su actual velocidad (si usa esta condición en reglas). Incluso cuando la app esta cerrada o no en uso (pero solo cuando el servicio esta iniciado).</string>
<string name="settingsReferringToRestrictedFeatures">Su configuración y/o reglas actualmente referencian caracteristicas no-libres no seran proveidas en la versión F-Droid. Esto incluye determinar su actual actividad fisica.</string> <string name="settingsReferringToRestrictedFeaturesInFdroid">Su configuración y/o reglas actualmente referencian caracteristicas no-libres no seran proveidas en la versión F-Droid. Esto incluye determinar su actual actividad fisica.</string>
<string name="filesHaveBeenMovedTo">Automation ahora usa otra ruta para guardar sus archivos. Todos sus archivos de Automation fueron desplazados aqui: \"%s\". El permiso del almacenamiento externo todavia no es necesario; puede revocarlo. Sera eliminado en una futura versión.</string> <string name="filesHaveBeenMovedTo">Automation ahora usa otra ruta para guardar sus archivos. Todos sus archivos de Automation fueron desplazados aqui: \"%s\". El permiso del almacenamiento externo todavia no es necesario; puede revocarlo. Sera eliminado en una futura versión.</string>
<string name="newsOptIn">Quiere recibir noticias (solo importantes) en la pantalla principal? Estas serán descargadas de la pagina del desarollador. No habrán notificaciones inoportunas, solo un texto en la pantalla principal cuando abra la app.</string> <string name="newsOptIn">Quiere recibir noticias (solo importantes) en la pantalla principal? Estas serán descargadas de la pagina del desarollador. No habrán notificaciones inoportunas, solo un texto en la pantalla principal cuando abra la app.</string>
<string name="filesStoredAt">Config y archivos de log seran guardados en el directorio %1$s. Cliquee en este texto para abrir un administrador de archivos. Desafortunadamente solo funciona en un dispositivo rooted.\n\nPARA OTROS DISP.: Simplemente use el boton para crear un backup.</string> <string name="filesStoredAt">Config y archivos de log seran guardados en el directorio %1$s. Cliquee en este texto para abrir un administrador de archivos. Desafortunadamente solo funciona en un dispositivo rooted.\n\nPARA OTROS DISP.: Simplemente use el boton para crear un backup.</string>
@ -740,7 +741,7 @@
<string name="tetheringState">Estado de tethering</string> <string name="tetheringState">Estado de tethering</string>
<string name="wifiExplanation2">Mientras modo vuelo esta activo, solo aplicaciones que tienen el permiso root pueden encender/desactivar wifi.</string> <string name="wifiExplanation2">Mientras modo vuelo esta activo, solo aplicaciones que tienen el permiso root pueden encender/desactivar wifi.</string>
<string name="wifiExplanation1">Las aplicaciones dirigidas a Android Q o superior ya no pueden activar o desactivar el wifi. Por favor, culpe a Google por esta restricción, no a mí. Puede omitir esta restricción rooteando su dispositivo y activando la casilla de verificación a continuación. Alternativamente, descargue esta aplicación de F-Droid o mi sitio web, ya que no estoy obligado a apuntar al último nivel de API en esas versiones.</string> <string name="wifiExplanation1">Las aplicaciones dirigidas a Android Q o superior ya no pueden activar o desactivar el wifi. Por favor, culpe a Google por esta restricción, no a mí. Puede omitir esta restricción rooteando su dispositivo y activando la casilla de verificación a continuación. Alternativamente, descargue esta aplicación de F-Droid o mi sitio web, ya que no estoy obligado a apuntar al último nivel de API en esas versiones.</string>
<string name="runExecutableExplanation">Puede seleccionar un script o un archivo ejecutable aquí que se ejecutará como una acción. Pero hay algunos requisitos previos con los que tienes que lidiar por tu cuenta. Google ha hecho que sea muy difícil ejecutar cualquier otra cosa que no sean aplicaciones normales de Android. 1. El archivo debe estar marcado como ejecutable en el sistema de archivos. En un sistema Android normal (sin root) esta es en realidad la parte difícil. 2. Eso también significa que la automatización debe poder ejecutar el archivo, no solo el propietario o el grupo. 3. Si se trata de un script, se especificará un shell válido en el encabezado del script.</string> <string name="runExecutableExplanation">Puede seleccionar un script o un archivo ejecutable aquí que se ejecutará como una acción.\n\nPero hay algunos requisitos previos con los que debe lidiar por su cuenta. Google ha hecho que sea muy difícil ejecutar cualquier cosa que no sean aplicaciones normales de Android.\n\n1. El script debe marcarse como ejecutable. En un sistema Android normal (sin root) esta es en realidad la parte difícil.\n\n2. Eso también significa que Automation debe poder ejecutar el archivo, no solo el propietario o el grupo.\n\n3. Si se trata de un script, se especificará un shell válido en el encabezado del script\'s.\n\nSi no puede cumplir con los requisitos anteriores, también puede intentar especificar un shell como el ejecutable real (como /system/bin/sh) y su script como parámetro. Eso ha funcionado para al menos un usuario.</string>
<string name="wakeLockExplanation">Activar mantendrá la pantalla encendida mientras desactiva la dejará apagarla. Para mantenerlo encendido, puede ingresar una duración después de la cual puede apagarse nuevamente o puede mantenerlo encendido indefinidamente. En este último caso, deberá crear otra acción de mantenerse despierto (en esta u otra regla) en la que seleccione desactivar.</string> <string name="wakeLockExplanation">Activar mantendrá la pantalla encendida mientras desactiva la dejará apagarla. Para mantenerlo encendido, puede ingresar una duración después de la cual puede apagarse nuevamente o puede mantenerlo encendido indefinidamente. En este último caso, deberá crear otra acción de mantenerse despierto (en esta u otra regla) en la que seleccione desactivar.</string>
<string name="mayUseRegularExpressions">Aqui tambien puede insertar expressiones regulares.</string> <string name="mayUseRegularExpressions">Aqui tambien puede insertar expressiones regulares.</string>
<string name="locationRequiredToDetermineWifiName">Para obtener el SSID wifi, la aplicación requiere permisos de ubicación. Debido a que la versión de Google no puede obtener eso, solo puede usar este desencadenador si no especifica un SSID. Por lo tanto, solo se puede usar para detectar si wifi está conectado o no.</string> <string name="locationRequiredToDetermineWifiName">Para obtener el SSID wifi, la aplicación requiere permisos de ubicación. Debido a que la versión de Google no puede obtener eso, solo puede usar este desencadenador si no especifica un SSID. Por lo tanto, solo se puede usar para detectar si wifi está conectado o no.</string>
@ -753,4 +754,20 @@
<string name="cable">Cable</string> <string name="cable">Cable</string>
<string name="tetheringBluetoothNotPossible">Actualmente no se puede detectar Bluetooth tethering. Solo los otros tipos de connection van a activar este condición.</string> <string name="tetheringBluetoothNotPossible">Actualmente no se puede detectar Bluetooth tethering. Solo los otros tipos de connection van a activar este condición.</string>
<string name="type">Tipo</string> <string name="type">Tipo</string>
<string name="startPhoneCall">Llamar al número de teléfono</string>
<string name="android.permission.CALL_PHONE">Llamar al número de teléfono</string>
<string name="makePhoneCallExplanation1">Aquí puede ingresar un número de teléfono al que se llamará sin más indicaciones. Puede usar esto para realizar configuraciones como realizar ajustes en el enrutamiento de llamadas, etc. Por favor, busque los códigos necesarios para esto por su cuenta.</string>
<string name="endPhoneCall">Terminar llamda de teléfono</string>
<string name="android.permission.ANSWER_PHONE_CALLS">Terminar llamda de teléfono</string>
<string name="settingsReferringToRestrictedFeaturesInGoogle">La configuración y/o las reglas hacen referencia a funciones que no se pueden proporcionar en la versión de Google Play. Entre otras cosas que incluye todo lo relacionado con llamadas telefónicas y mensajes de texto.</string>
<string name="variableCheckStringDeleted">Si la variable %1$s no está establecida</string>
<string name="variableCheckString">Si la variable %1$s es %2$s</string>
<string name="checkVariableExplanation">Si deja el valor vacío, no se debe establecer la variable para que la condición devuelva true.</string>
<string name="checkVariable">Comprobar variable</string>
<string name="enterVariableKey">Introduzca una clave para la variable.</string>
<string name="setVariableExplanation">Si establece una variable en un valor vacío, se eliminará.</string>
<string name="variableValue">Valor variable</string>
<string name="VariableKey">Clave variable</string>
<string name="deleteVariable">Eliminar variable</string>
<string name="setVariable">Establecer una variable</string>
</resources> </resources>

File diff suppressed because it is too large Load Diff

View File

@ -179,7 +179,8 @@
<string name="enterAname">Inserisci un nome.</string> <string name="enterAname">Inserisci un nome.</string>
<string name="enterNameForIntentPair">Definisci un nome per la coppia dell\'Intent</string> <string name="enterNameForIntentPair">Definisci un nome per la coppia dell\'Intent</string>
<string name="enterPackageName">Inserisci un nome di pacchetto che sia valido.</string> <string name="enterPackageName">Inserisci un nome di pacchetto che sia valido.</string>
<string name="enterPhoneNumber">Inserisci un numero di telefono. Lascia vuoto per accettare qualsiasi numero.</string> <string name="enterPhoneNumberBlankForAny">Inserisci un numero di telefono. Lascia vuoto per accettare qualsiasi numero.</string>
<string name="enterPhoneNumber">Inserisci un numero di telefono.</string>
<string name="enterValidAction">Inserisci una azione valida</string> <string name="enterValidAction">Inserisci una azione valida</string>
<string name="enterValidReferenceValue">Inserisci un valore di riferimento valido.</string> <string name="enterValidReferenceValue">Inserisci un valore di riferimento valido.</string>
<string name="enterValueForIntentPair">Definisci un valore per la coppia dell\'Intent.</string> <string name="enterValueForIntentPair">Definisci un valore per la coppia dell\'Intent.</string>
@ -452,7 +453,7 @@
<string name="settingsCategoryNoiseLevelMeasurements">Misura del livello di rumore</string> <string name="settingsCategoryNoiseLevelMeasurements">Misura del livello di rumore</string>
<string name="settingsCategoryProcessMonitoring">Monitoraggio del processo</string> <string name="settingsCategoryProcessMonitoring">Monitoraggio del processo</string>
<string name="settingsErased">Impostazioni cancellate.</string> <string name="settingsErased">Impostazioni cancellate.</string>
<string name="settingsReferringToRestrictedFeatures">Le tue impostazioni e/o regole si riferiscono attualmente a funzioni non coperte da una licenza aperta e che pertanto non possono essere fornite nella versione F-Droid. Questo include il rilevamento della tua attuale attività fisica.</string> <string name="settingsReferringToRestrictedFeaturesInFdroid">Le tue impostazioni e/o regole si riferiscono attualmente a funzioni non coperte da una licenza aperta e che pertanto non possono essere fornite nella versione F-Droid. Questo include il rilevamento della tua attuale attività fisica.</string>
<string name="settingsSetToDefault">Impostazioni predefinite ripristinate.</string> <string name="settingsSetToDefault">Impostazioni predefinite ripristinate.</string>
<string name="settingsWillTakeTime">Alcune impostazioni non saranno applicate prima che alcune impostazioni contestuali cambino o che il servizio venga riavviato.</string> <string name="settingsWillTakeTime">Alcune impostazioni non saranno applicate prima che alcune impostazioni contestuali cambino o che il servizio venga riavviato.</string>
<string name="shareConfigAndLogExplanation">Questo creerà una email con la tua configurazione e i file di log allegati come file zip. Non sarà inviata automaticamente, dovrai premere \"invia\". Puoi anche cambiare il destinatario con te stesso, per esempio.</string> <string name="shareConfigAndLogExplanation">Questo creerà una email con la tua configurazione e i file di log allegati come file zip. Non sarà inviata automaticamente, dovrai premere \"invia\". Puoi anche cambiare il destinatario con te stesso, per esempio.</string>
@ -736,7 +737,7 @@
<string name="tetheringState">Stato del tethering</string> <string name="tetheringState">Stato del tethering</string>
<string name="wifiExplanation2">Quando la modalità aereo è attiva, lo stato del wifi può essere commutato soltanto da applicazioni che usano i permessi di root.</string> <string name="wifiExplanation2">Quando la modalità aereo è attiva, lo stato del wifi può essere commutato soltanto da applicazioni che usano i permessi di root.</string>
<string name="wifiExplanation1">Le app che hanno come target Android Q o superiore non possono più attivare o disattivare il wifi. Lamentatevi con Google per questa limitazione, non con me.\n\nSi può aggirare questa limitazione usando il root e spuntando la casella qua sotto. In alternativa si può scaricare questa applicazione da F-Droid o dal mio sito, dove non sono obbligato a usare come target le ultime API.</string> <string name="wifiExplanation1">Le app che hanno come target Android Q o superiore non possono più attivare o disattivare il wifi. Lamentatevi con Google per questa limitazione, non con me.\n\nSi può aggirare questa limitazione usando il root e spuntando la casella qua sotto. In alternativa si può scaricare questa applicazione da F-Droid o dal mio sito, dove non sono obbligato a usare come target le ultime API.</string>
<string name="runExecutableExplanation">"Si può scegliere uno script o un eseguibile che sarà eseguito come azione.\n\nCi sono però dei prerequisiti che devi sistemare per conto tuo. Google ha reso molto difficile eseguire tutto tranne le normali applicazioni Android.\n\n1.\nIl file deve essere eseguibile nel file system. In un sistema Android normale (senza root) questa è la parte più difficile.\n\n2.\nAnche Automation deve poter eseguire il file, non soltanto il proprietario o il gruppo.\n\n3.\nSe si tratta di uno script, deve essere specificata una shell valida nell'intestazione. "</string> <string name="runExecutableExplanation">È possibile selezionare uno script o un file eseguibile qui che verrà eseguito come azione.\n\nMa ci sono alcuni prerequisiti che è necessario gestire da soli. Google ha reso molto difficile l\'esecuzione di qualcosa di diverso dalle normali applicazioni Android.\n\n1. Lo script deve essere contrassegnato come eseguibile. Su un normale sistema Android (senza root) questa è in realtà la parte difficile.\n\n2. Ciò significa anche che Automation deve essere in grado di eseguire il file, non solo il proprietario o il gruppo.\n\n3. Se si tratta di uno script, è possibile specificare una shell valida nell\'intestazione dello script.\n\nSe non è possibile soddisfare i requisiti di cui sopra, in alternativa si può provare a specificare una shell come eseguibile effettivo (come /system/bin/sh) e lo script come parametro. Questo ha funzionato per almeno un utente.</string>
<string name="enter_a_number">Inserisci un numero.</string> <string name="enter_a_number">Inserisci un numero.</string>
<string name="regularExpressionsIfEquals">Se è selezionato \"uguale\", è possibile immettere un\'espressione regolare.</string> <string name="regularExpressionsIfEquals">Se è selezionato \"uguale\", è possibile immettere un\'espressione regolare.</string>
<string name="duration">Durata [ms]</string> <string name="duration">Durata [ms]</string>
@ -754,4 +755,20 @@
<string name="cable">Cavo</string> <string name="cable">Cavo</string>
<string name="tetheringBluetoothNotPossible">Il tethering Bluetooth al momento non può essere rilevato. Solo gli altri mezzi di connessione attiveranno questo trigger.</string> <string name="tetheringBluetoothNotPossible">Il tethering Bluetooth al momento non può essere rilevato. Solo gli altri mezzi di connessione attiveranno questo trigger.</string>
<string name="type">Digitare</string> <string name="type">Digitare</string>
<string name="startPhoneCall">Chiama il numero di telefono</string>
<string name="android.permission.CALL_PHONE">Chiama il numero di telefono</string>
<string name="makePhoneCallExplanation1">Qui è possibile inserire un numero di telefono che verrà chiamato senza ulteriori richieste. È possibile utilizzarlo per effettuare impostazioni come apportare modifiche al routing delle chiamate, ecc. Si prega di cercare i codici richiesti per questo da soli.</string>
<string name="android.permission.ANSWER_PHONE_CALLS">Termina telefonata</string>
<string name="endPhoneCall">Termina telefonata</string>
<string name="settingsReferringToRestrictedFeaturesInGoogle">Le tue impostazioni e/o regole fanno attualmente riferimento a funzioni che non possono essere fornite nella versione di Google Play. Tra le altre cose che include tutto ciò che riguarda le telefonate e i messaggi di testo.</string>
<string name="setVariable">Impostare una variabile</string>
<string name="deleteVariable">Elimina variabile</string>
<string name="VariableKey">Chiave variabile</string>
<string name="variableValue">Valore variabile</string>
<string name="setVariableExplanation">Se si imposta una variabile su un valore vuoto, questa verrà eliminata.</string>
<string name="enterVariableKey">Immettere una chiave per la variabile.</string>
<string name="checkVariable">Controlla variabile</string>
<string name="checkVariableExplanation">Se si lascia vuoto il valore, la variabile non deve essere impostata affinché la condizione restituisca true.</string>
<string name="variableCheckString">Se la variabile %1$s è %2$s</string>
<string name="variableCheckStringDeleted">Se la variabile %1$s non è impostata</string>
</resources> </resources>

View File

@ -268,7 +268,8 @@
<string name="phoneCall">Telefoongesprek</string> <string name="phoneCall">Telefoongesprek</string>
<string name="with">met</string> <string name="with">met</string>
<string name="phoneNumber">Telefoonnummer</string> <string name="phoneNumber">Telefoonnummer</string>
<string name="enterPhoneNumber">Voer telefoonnummer in. Laat leeg voor een willekeurig nummer.</string> <string name="enterPhoneNumberBlankForAny">Voer telefoonnummer in. Laat leeg voor een willekeurig nummer.</string>
<string name="enterPhoneNumber">Voer telefoonnummer in.</string>
<string name="phoneDirection">Selecteer gespreksrichting</string> <string name="phoneDirection">Selecteer gespreksrichting</string>
<string name="any">een willekeurig</string> <string name="any">een willekeurig</string>
<string name="incoming">binnenkomend</string> <string name="incoming">binnenkomend</string>
@ -499,7 +500,7 @@
<string name="manageLocations">Locaties maken of bewerken</string> <string name="manageLocations">Locaties maken of bewerken</string>
<string name="error">Fout</string> <string name="error">Fout</string>
<string name="featureNotInFdroidVersion">Deze functie is gebaseerd op niet-vrije software. Daarom is is niet beschikbaar in de F-Droid versie.</string> <string name="featureNotInFdroidVersion">Deze functie is gebaseerd op niet-vrije software. Daarom is is niet beschikbaar in de F-Droid versie.</string>
<string name="settingsReferringToRestrictedFeatures">Uw instellingen en of regels verwijzen momenteel naar niet-vrije functies die niet kunnen worden geleverd in de F-Droid versie. Dat omvat het detecteren van uw huidige fysieke activiteit.</string> <string name="settingsReferringToRestrictedFeaturesInFdroid">Uw instellingen en of regels verwijzen momenteel naar niet-vrije functies die niet kunnen worden geleverd in de F-Droid versie. Dat omvat het detecteren van uw huidige fysieke activiteit.</string>
<string name="publishedOn">gepubliceerd op</string> <string name="publishedOn">gepubliceerd op</string>
<string name="displayNewsOnMainScreen">Toepassingsnieuws weergeven op hoofdscherm</string> <string name="displayNewsOnMainScreen">Toepassingsnieuws weergeven op hoofdscherm</string>
<string name="displayNewsOnMainScreenDescription">Aankondigingen over deze app alleen, we hebben het waarschijnlijk over 1-2 per jaar, niet meer.</string> <string name="displayNewsOnMainScreenDescription">Aankondigingen over deze app alleen, we hebben het waarschijnlijk over 1-2 per jaar, niet meer.</string>
@ -731,7 +732,7 @@
<string name="wifiExplanation1">Apps voor Android Q of hoger kunnen helaas WIFI niet meer aan- of uitzetten. Dat is niet mijn schuld, het was een beslissing van Google om dit te beperken. U kunt deze beperking omzeilen door uw apparaat te rooten en het onderstaande selectievakje te activeren. Als alternatief kunt u deze applicatie downloaden van F-Droid of mijn website, omdat ik niet gedwongen ben om de nieuwste API-niveau in die versies te richten.</string> <string name="wifiExplanation1">Apps voor Android Q of hoger kunnen helaas WIFI niet meer aan- of uitzetten. Dat is niet mijn schuld, het was een beslissing van Google om dit te beperken. U kunt deze beperking omzeilen door uw apparaat te rooten en het onderstaande selectievakje te activeren. Als alternatief kunt u deze applicatie downloaden van F-Droid of mijn website, omdat ik niet gedwongen ben om de nieuwste API-niveau in die versies te richten.</string>
<string name="wifiExplanation2">Wanneer vliegtuigmodus is geactiveerd, kan wifi alleen worden omgeschakeld vanuit toepassingen wanneer u root-permissies voor that.</string> <string name="wifiExplanation2">Wanneer vliegtuigmodus is geactiveerd, kan wifi alleen worden omgeschakeld vanuit toepassingen wanneer u root-permissies voor that.</string>
<string name="usingRoot">gebruik Root</string> <string name="usingRoot">gebruik Root</string>
<string name="runExecutableExplanation">Je kunt hier een script of programma selecteren dat als actie wordt uitgevoerd.\n\nMaar er zijn wel een aantal vereisten waar je zelf mee aan de slag moet. Google heeft het erg moeilijk gemaakt om iets anders dan gewone Android applicaties uit te voeren.\n1.\nHet bestand moet in het bestandssysteem gemarkeerd zijn als uitvoerbaar. Op een gewoon Android systeem (zonder root) is dit eigenlijk het moeilijkste.\n2.\nDat betekent ook dat Automation het bestand moet kunnen uitvoeren, niet alleen de eigenaar of de groep.\n3.\nAls het een script is, moet een geldige shell worden opgegeven in de header van het script.</string> <string name="runExecutableExplanation">U kunt hier een script of een uitvoerbaar bestand selecteren dat als een actie wordt uitgevoerd.\n\nMaar er zijn enkele vereisten waarmee u zelf te maken krijgt. Google heeft het erg moeilijk gemaakt om iets anders dan gewone Android-applicaties uit te voeren.\n\n1. Het script moet worden gemarkeerd als uitvoerbaar. Op een gewoon Android-systeem (zonder root) is dit eigenlijk het moeilijke deel.\n\n2. Dat betekent ook dat Automation het bestand moet kunnen uitvoeren, niet alleen de eigenaar of de groep.\n\n3. Als het een script is, moet een geldige shell worden opgegeven in de header van het script.\n\nAls u niet aan de bovenstaande vereisten kunt voldoen, kunt u ook proberen een shell op te geven als het eigenlijke uitvoerbare bestand (zoals /system/bin/sh) en uw script als parameter. Dat heeft voor minstens één gebruiker gewerkt.</string>
<string name="tetheringActive">tethering is actief</string> <string name="tetheringActive">tethering is actief</string>
<string name="tetheringNotActive">tethering is niet actief</string> <string name="tetheringNotActive">tethering is niet actief</string>
<string name="tetheringState">Tethering-status</string> <string name="tetheringState">Tethering-status</string>
@ -752,5 +753,21 @@
<string name="cable">Kabel</string> <string name="cable">Kabel</string>
<string name="tetheringBluetoothNotPossible">Bluetooth-tethering kan momenteel niet worden gedetecteerd. Alleen de andere verbindingsmiddelen activeren deze trigger.</string> <string name="tetheringBluetoothNotPossible">Bluetooth-tethering kan momenteel niet worden gedetecteerd. Alleen de andere verbindingsmiddelen activeren deze trigger.</string>
<string name="type">Type</string> <string name="type">Type</string>
<string name="startPhoneCall">Telefoonnummer bellen</string>
<string name="android.permission.CALL_PHONE">Telefoonnummer bellen</string>
<string name="makePhoneCallExplanation1">Hier kunt u een telefoonnummer invoeren dat zonder verdere prompts wordt gebeld. U kunt dit gebruiken om instellingen aan te brengen, zoals het aanpassen van de gespreksroutering, enz.. Zoek zelf naar de codes die hiervoor nodig zijn.</string>
<string name="android.permission.ANSWER_PHONE_CALLS">Telefoongesprek beëindigen</string>
<string name="endPhoneCall">Telefoongesprek beëindigen</string>
<string name="settingsReferringToRestrictedFeaturesInGoogle">Uw instellingen en/of regels verwijzen momenteel naar functies die niet kunnen worden geleverd in de Google Play-versie. Dat omvat onder andere alles wat te maken heeft met telefoontjes en sms-berichten.</string>
<string name="setVariable">Een variabele instellen</string>
<string name="deleteVariable">Variabele verwijderen</string>
<string name="VariableKey">Variabele sleutel</string>
<string name="variableValue">Variabele waarde</string>
<string name="setVariableExplanation">Als u een variabele instelt op een lege waarde, wordt deze verwijderd.</string>
<string name="enterVariableKey">Voer een sleutel in voor de variabele.</string>
<string name="checkVariable">Variabele controleren</string>
<string name="checkVariableExplanation">Als u de waarde leeg laat, mag de variabele niet worden ingesteld om de voorwaarde true te laten retourneren.</string>
<string name="variableCheckString">als variabele %1$s %2$s is</string>
<string name="variableCheckStringDeleted">als variabele %1$s niet is ingesteld</string>
</resources> </resources>

View File

@ -302,7 +302,8 @@
<string name="phoneCall">Телефонный звонок</string> <string name="phoneCall">Телефонный звонок</string>
<string name="with">с</string> <string name="with">с</string>
<string name="phoneNumber">Номер телефона</string> <string name="phoneNumber">Номер телефона</string>
<string name="enterPhoneNumber">Введите номер телефона. Оставьте пустым для любого номера телефона.</string> <string name="enterPhoneNumberBlankForAny">Введите номер телефона. Оставьте пустым для любого номера телефона.</string>
<string name="enterPhoneNumber">Введите номер телефона.</string>
<string name="phoneDirection">Выберите вызов\nнаправление</string> <string name="phoneDirection">Выберите вызов\nнаправление</string>
<string name="any">Любой</string> <string name="any">Любой</string>
<string name="incoming">входящий</string> <string name="incoming">входящий</string>
@ -562,7 +563,7 @@
<string name="manageLocations">Создание или редактирование местоположений</string> <string name="manageLocations">Создание или редактирование местоположений</string>
<string name="error">Ошибка</string> <string name="error">Ошибка</string>
<string name="featureNotInFdroidVersion">Эта функция использует несвободное программное обеспечение, поэтому недоступна в версии F-Droid.</string> <string name="featureNotInFdroidVersion">Эта функция использует несвободное программное обеспечение, поэтому недоступна в версии F-Droid.</string>
<string name="settingsReferringToRestrictedFeatures">Ваши настройки и / или правила в настоящее время используют функциии, которые зависят от несвободного программного обеспечения, они не могут быть использованы в версии F-Droid. Это включает в себя определение вашей текущей физической активности.</string> <string name="settingsReferringToRestrictedFeaturesInFdroid">Ваши настройки и / или правила в настоящее время используют функциии, которые зависят от несвободного программного обеспечения, они не могут быть использованы в версии F-Droid. Это включает в себя определение вашей текущей физической активности.</string>
<string name="publishedOn">опубликовано на</string> <string name="publishedOn">опубликовано на</string>
<string name="displayNewsOnMainScreen">Отображение новостей приложения на главном экране</string> <string name="displayNewsOnMainScreen">Отображение новостей приложения на главном экране</string>
<string name="displayNewsOnMainScreenDescription">Объявления об этом приложении, 1-2 в год, не больше.</string> <string name="displayNewsOnMainScreenDescription">Объявления об этом приложении, 1-2 в год, не больше.</string>
@ -790,7 +791,7 @@
<string name="wifiExplanation1">Приложения, реализуемые совместимость с Android Q и выше больше не могут включать/выключать Wi-Fi. Пожалуйста, вините не меня, а Google за это.\n\nВы можете обойти это ограничение получив root права и активировав чекбокс ниже. Так же вы можете скачать это приложение из F-Droid или с моего сайта, потому что для этих версий приложения нет ограничения на совместимость с последним уровнем API.</string> <string name="wifiExplanation1">Приложения, реализуемые совместимость с Android Q и выше больше не могут включать/выключать Wi-Fi. Пожалуйста, вините не меня, а Google за это.\n\nВы можете обойти это ограничение получив root права и активировав чекбокс ниже. Так же вы можете скачать это приложение из F-Droid или с моего сайта, потому что для этих версий приложения нет ограничения на совместимость с последним уровнем API.</string>
<string name="wifiExplanation2">Когда активирован режим "В самолете" Wi-Fi может быть включен только приложениями с доступом к root правам.</string> <string name="wifiExplanation2">Когда активирован режим "В самолете" Wi-Fi может быть включен только приложениями с доступом к root правам.</string>
<string name="usingRoot">используя root-права</string> <string name="usingRoot">используя root-права</string>
<string name="runExecutableExplanation">Вы можете выбрать скрипт или исполняемый файл, который будет запущен.\n\nНо существуют некоторые требования, которые вам нужно выполнить. Google сделал очень сложным запускать что-либо иное, кроме обычных Android приложений.\n\n1.\nФайл должен иметь флаг "исполняемый" в файловой системе. На Android без root прав это достаточно сложно.\n\n2.\nAutomation должно иметь права выполнять этот файл, не только владелец или группа\n\n3.\nЕсли это скрипт, то в заголовке файла должен быть указан корректный shell.</string> <string name="runExecutableExplanation">Здесь вы можете выбрать сценарий или исполняемый файл, который будет выполняться как действие.\n\nНо есть некоторые предварительные условия, с которыми вам придется иметь дело самостоятельно. Google очень усложнил запуск чего-либо, кроме обычных приложений Android.\n\n1. Сценарий должен быть помечен как исполняемый. В обычной системе Android (без root) это на самом деле самая сложная часть.\n\n2. Это также означает, что автоматизация должна иметь возможность выполнять файл, а не только владельца или группу.\n\n3. Если это сценарий, в заголовке скрипта указывается допустимая оболочка.\n\nЕсли вы не можете выполнить вышеуказанные требования, можно в качестве альтернативы попытаться указать оболочку в качестве фактического исполняемого файла (например, /system/bin/sh) и скрипт в качестве параметра. Это сработало, по крайней мере, для одного пользователя.</string>
<string name="tetheringActive">раздача интернета активна</string> <string name="tetheringActive">раздача интернета активна</string>
<string name="tetheringNotActive">раздача интернета не активна</string> <string name="tetheringNotActive">раздача интернета не активна</string>
<string name="tetheringState">Раздача интернета</string> <string name="tetheringState">Раздача интернета</string>
@ -811,4 +812,20 @@
<string name="cable">Кабель</string> <string name="cable">Кабель</string>
<string name="tetheringBluetoothNotPossible">В настоящее время модем Bluetooth не может быть обнаружен. Только другие средства связи активируют этот триггер.</string> <string name="tetheringBluetoothNotPossible">В настоящее время модем Bluetooth не может быть обнаружен. Только другие средства связи активируют этот триггер.</string>
<string name="type">тип</string> <string name="type">тип</string>
<string name="startPhoneCall">Номер телефона</string>
<string name="android.permission.CALL_PHONE">Номер телефона</string>
<string name="makePhoneCallExplanation1">Здесь вы можете ввести номер телефона, который будет звонить без дальнейших запросов. Вы можете использовать это для внесения настроек, таких как внесение изменений в маршрутизацию вызовов и т. Д. Пожалуйста, найдите коды, необходимые для этого, самостоятельно.</string>
<string name="endPhoneCall">Завершение телефонного звонка</string>
<string name="android.permission.ANSWER_PHONE_CALLS">Завершение телефонного звонка</string>
<string name="settingsReferringToRestrictedFeaturesInGoogle">Ваши настройки и/или правила в настоящее время ссылаются на функции, которые не могут быть предоставлены в версии Google Play. Среди прочего, это включает в себя все, что связано с телефонными звонками и текстовыми сообщениями.</string>
<string name="setVariable">Задание переменной</string>
<string name="deleteVariable">Удалить переменную</string>
<string name="VariableKey">Клавиша переменной</string>
<string name="variableValue">Значение переменной</string>
<string name="setVariableExplanation">Если для переменной задано пустое значение, она будет удалена.</string>
<string name="enterVariableKey">Введите ключ для переменной.</string>
<string name="checkVariable">Проверить переменную</string>
<string name="checkVariableExplanation">Если оставить значение пустым, переменная не должна быть задана для того, чтобы условие возвращало значение true.</string>
<string name="variableCheckString">если переменная %1$s равно %2$s</string>
<string name="variableCheckStringDeleted">Если переменная %1$s не задана</string>
</resources> </resources>

View File

@ -341,7 +341,8 @@
<string name="phoneCall">Phone call</string> <string name="phoneCall">Phone call</string>
<string name="with">with</string> <string name="with">with</string>
<string name="phoneNumber">Phone number</string> <string name="phoneNumber">Phone number</string>
<string name="enterPhoneNumber">Enter phone number. Leave empty for any number.</string> <string name="enterPhoneNumberBlankForAny">Enter phone number. Leave empty for any number.</string>
<string name="enterPhoneNumber">Enter phone number.</string>
<string name="phoneDirection">Select call\ndirection</string> <string name="phoneDirection">Select call\ndirection</string>
<string name="any">any</string> <string name="any">any</string>
<string name="incoming">incoming</string> <string name="incoming">incoming</string>
@ -601,7 +602,8 @@
<string name="manageLocations">Create or edit locations</string> <string name="manageLocations">Create or edit locations</string>
<string name="error">Error</string> <string name="error">Error</string>
<string name="featureNotInFdroidVersion">This feature is based on non-free software. Therefore is is not available in the F-Droid version.</string> <string name="featureNotInFdroidVersion">This feature is based on non-free software. Therefore is is not available in the F-Droid version.</string>
<string name="settingsReferringToRestrictedFeatures">Your settings and or rules are currently referencing non-free features that cannot be provided in the F-Droid version. That includes detecting your current physical activity.</string> <string name="settingsReferringToRestrictedFeaturesInFdroid">Your settings and or rules are currently referencing non-free features that cannot be provided in the F-Droid version. That includes detecting your current physical activity.</string>
<string name="settingsReferringToRestrictedFeaturesInGoogle">Your settings and or rules are currently referencing features that cannot be provided in the Google Play version. Among other things that includes anything related to phone calls and text messages.</string>
<string name="publishedOn">published on</string> <string name="publishedOn">published on</string>
<string name="displayNewsOnMainScreen">Display application news on main screen</string> <string name="displayNewsOnMainScreen">Display application news on main screen</string>
<string name="displayNewsOnMainScreenDescription">Announcements about this app only, we\'re probably talking about 1-2 per year, not more.</string> <string name="displayNewsOnMainScreenDescription">Announcements about this app only, we\'re probably talking about 1-2 per year, not more.</string>
@ -830,7 +832,7 @@
<string name="wifiExplanation1">Apps targeting Android Q or higher cannot turn wifi on or off anymore. Please blame Google for this restriction, not me. You can bypass this restriction by rooting your device and activating the checkbox below. Alternatively download this application from F-Droid or my website as I am not forced to target the latest API level in those versions.</string> <string name="wifiExplanation1">Apps targeting Android Q or higher cannot turn wifi on or off anymore. Please blame Google for this restriction, not me. You can bypass this restriction by rooting your device and activating the checkbox below. Alternatively download this application from F-Droid or my website as I am not forced to target the latest API level in those versions.</string>
<string name="wifiExplanation2">While airplane mode is activated, wifi can only be toggled from applications when using root permissions for that.</string> <string name="wifiExplanation2">While airplane mode is activated, wifi can only be toggled from applications when using root permissions for that.</string>
<string name="usingRoot">using root</string> <string name="usingRoot">using root</string>
<string name="runExecutableExplanation">You can select a script or an executable file here that will be executed as an action. But there are some prerequisites which you have to deal with on your own. Google has made it very hard to run anything other than regular Android applications. 1. The file must be marked as executable in the file system. On a regular Android system (without root) this is actually the hard part. 2. That also means Automation must be able to execute the file, not just the owner or the group. 3. If it is a script, a valid shell be specified in the script\'s header.</string> <string name="runExecutableExplanation">You can select a script or an executable file here that will be executed as an action.\n\nBut there are some prerequisites which you have to deal with on your own. Google has made it very hard to run anything other than regular Android applications.\n\n1. The script needs to be marked as executable. On a regular Android system (without root) this is actually the hard part.\n\n2. That also means Automation must be able to execute the file, not just the owner or the group.\n\n3. If it is a script, a valid shell be specified in the script\'s header.\n\nIf you cannot meet the above requirements, you could alternatively try to specify a shell as the actual executable (like /system/bin/sh) and your script as parameter. That has worked for at least one user.</string>
<string name="tetheringActive">tethering is active</string> <string name="tetheringActive">tethering is active</string>
<string name="tetheringNotActive">tethering is not active</string> <string name="tetheringNotActive">tethering is not active</string>
<string name="tetheringState">Tethering state</string> <string name="tetheringState">Tethering state</string>
@ -851,4 +853,25 @@
<string name="type">Type</string> <string name="type">Type</string>
<string name="cable">Cable</string> <string name="cable">Cable</string>
<string name="tetheringBluetoothNotPossible">Bluetooth tethering can currently not be detected. Only the other means of connection will activate this trigger.</string> <string name="tetheringBluetoothNotPossible">Bluetooth tethering can currently not be detected. Only the other means of connection will activate this trigger.</string>
<string name="startPhoneCall">Call phone number</string>
<string name="android.permission.CALL_PHONE">Call phone number</string>
<string name="makePhoneCallExplanation1">Here you can enter a phone number that will be called without further prompts. You may use this to make settings like making adjustments to call routing, etc.. Please search for the codes required for this on your own.</string>
<string name="endPhoneCall">End phone call</string>
<string name="android.permission.ANSWER_PHONE_CALLS">End phone call</string>
<string name="setVariable">Set a variable</string>
<string name="deleteVariable">Delete variable</string>
<string name="VariableKey">Variable key</string>
<string name="variableValue">Variable value</string>
<string name="setVariableExplanation">If you set a variable to an empty value it will be deleted.</string>
<string name="enterVariableKey">Enter a key for the variable.</string>
<string name="checkVariable">Check variable</string>
<string name="checkVariableExplanation">If you leave the value empty the variable must not be set for the condition to return true.</string>
<string name="variableCheckString">if variable %1$s is %2$s</string>
<string name="variableCheckStringDeleted">if variable %1$s is not set</string>
<string name="messageType">Message type</string>
<string name="sms">SMS</string>
<string name="mms">MMS</string>
<string name="attachment">Attachment</string>
<string name="chooseFile">choose file</string>
<string name="startAppByStartService">by startService()</string>
</resources> </resources>

View File

@ -0,0 +1,7 @@
* Neu: Bestätigungsdialog vor dem Löschen von Orten, Regeln und Profilen
* Neue Aktion: Telefongespräch ohne weitere Bestätigung einleiten
* Neuer Auslöser/Aktion: Eigene Variablen setzen und deren Wert als Auslöser prüfen
* Behoben: Akku-Auslöser konnte die Werte unter 0% oder über 100% liefern
* Behoben: Datumsformat in Variablen korrigiert
* Behoben: Klingeltöne können nun oberhalb von Android 7.1 gesetzt werden, aber Sie müssen Ihre Profile editieren, damit das wirkt
* Französische Übersetzung aktualisiert (danke an Lejun)

View File

@ -22,6 +22,7 @@ Mögliche Auslöser:
* Geräteausrichtung (Gyroskop) * Geräteausrichtung (Gyroskop)
* Profile aktiv oder nicht * Profile aktiv oder nicht
* Broadcasts anderer Anwendungen * Broadcasts anderer Anwendungen
* Variablen, die gesetzt wurden
Mögliche Aktionen: Mögliche Aktionen:
* WLAN ein-/ausschalten * WLAN ein-/ausschalten
@ -43,6 +44,8 @@ Mögliche Aktionen:
* SMS verschicken * SMS verschicken
* Sounddatei abspielen. * Sounddatei abspielen.
* Benachrichtigungen erstellen * Benachrichtigungen erstellen
* Variablen setzen
* Telefonanrufe starten
Es ist ziemlich schwierig diese Anwendung über die vielen verschiedenen Geräte und Android Versionen am Laufen zu halten. Ich kann vieles im Emulator testen, aber eben nicht alles. Es ist ziemlich schwierig diese Anwendung über die vielen verschiedenen Geräte und Android Versionen am Laufen zu halten. Ich kann vieles im Emulator testen, aber eben nicht alles.
Wenn also eine bestimmte Funktion nicht so tut wie sie sollte - lassen Sie es mich wissen. Über die Jahre habe ich noch alle Fehler behoben, die mir vernünftig gemeldet wurden. Aber dafür bin ich auf Ihre Mithilfe angewiesen. Wenn also eine bestimmte Funktion nicht so tut wie sie sollte - lassen Sie es mich wissen. Über die Jahre habe ich noch alle Fehler behoben, die mir vernünftig gemeldet wurden. Aber dafür bin ich auf Ihre Mithilfe angewiesen.

View File

@ -0,0 +1,7 @@
* New: Confirmation dialog before deleting locations, rules and profile
* New action: Make phone call without further prompt
* New trigger/action: Set custom variables as actions and check for them in triggers
* Fixed: Battery receiver could trigger above 100% or below 0%
* Fixed: Date format when variables are used in texts
* Fixed: Changing ringtone now works after Android 7.1, but you need to edit the profile for it to apply
* French translation updated (thanks Lejun)

View File

@ -22,6 +22,7 @@ Supported triggers:
* Device orientation (gyroscope) * Device orientation (gyroscope)
* Profile active or not * Profile active or not
* Broadcasts of other apps * Broadcasts of other apps
* Variables that have been set
Supported actions: Supported actions:
* Change wifi state * Change wifi state
@ -43,6 +44,8 @@ Supported actions:
* Send text message * Send text message
* Play sound file * Play sound file
* Create notifications * Create notifications
* Set variables
* Initiate phone calls
It's quite hard to keep this app working across the many different hardwares as well as the many changes Android undergoes over the versions. I can test it in the emulator, but that cannot show all bugs. It's quite hard to keep this app working across the many different hardwares as well as the many changes Android undergoes over the versions. I can test it in the emulator, but that cannot show all bugs.
So if a certain feature is not working on your device - let me know. Over the years I have fixed almost all bugs that have been reasonably reported to me. But for that I'm dependend on your input. So if a certain feature is not working on your device - let me know. Over the years I have fixed almost all bugs that have been reasonably reported to me. But for that I'm dependend on your input.

View File

@ -0,0 +1,7 @@
* Nuevo: Cuadro de diálogo de confirmación antes de borrar ubicaciones, reglas y perfiles
* Nueva acción: Hacer llamada telefónica sin más avisos
* Nuevo disparador / acción: establezca variables personalizadas como acciones y verifíquelas en disparadores
* Corregido: el receptor de la batería podría dispararse por encima del 100% o por debajo del 0%
* Corregido: Formato de fecha cuando se utilizan variables en textos
* Corregido: cambiar el tono de llamada ahora funciona después de Android 7.1, pero debe editar el perfil para que se aplique
* Traducción al francés actualizada (gracias Lejun)

View File

@ -22,6 +22,7 @@ Disparadores:
* Orientación del dispositivo (giroscopio) * Orientación del dispositivo (giroscopio)
* Perfil activado o no * Perfil activado o no
* Broadcasts de otras apps * Broadcasts de otras apps
* Variables que se han establecido
Aciónes: Aciónes:
* Pasar de wifi * Pasar de wifi
@ -43,6 +44,8 @@ Aciónes:
* Enviar mensaje * Enviar mensaje
* Tocar archivo sonido * Tocar archivo sonido
* Crear notificaciones * Crear notificaciones
* Establecer variables
* Iniciar llamadas telefónicas
Es muy dificil mantener esta applicación functionando en todos los hardwares y versiónes de Android. Puedo probrar mucho en el emulator, pero no puedo enviar todos los errores. Es muy dificil mantener esta applicación functionando en todos los hardwares y versiónes de Android. Puedo probrar mucho en el emulator, pero no puedo enviar todos los errores.
Si una función no funcióna - digame. En muchos años resolvaba la mayoria de los errores que los halladores me informaron bien. Pero dependo en su ayuda. Si una función no funcióna - digame. En muchos años resolvaba la mayoria de los errores que los halladores me informaron bien. Pero dependo en su ayuda.

View File

@ -0,0 +1,7 @@
* Nouveau: Boîte de dialogue de confirmation avant de supprimer des emplacements, des règles et un profil
* Nouvelle action: Passer un appel téléphonique sans autre invite
* Nouveau déclencheur / action: Définissez des variables personnalisées en tant qu'actions et vérifiez-les dans les déclencheurs
* Corrigé: Le récepteur de batterie pouvait déclencher plus de 100% ou moins de 0%
* Correction : Format de date lorsque les variables sont utilisées dans les textes
* Corrigé: Changer la sonnerie fonctionne maintenant après Android 7.1, mais vous devez modifier le profil pour qu'il s'applique
* Français traduction mise à jour (merci Lejun)

View File

@ -1,15 +1,14 @@
Ce programme peut vous aider à automatiser des choses sur votre appareil. Spécifiez des règles qui déclenchent des événements dans certaines conditions. Il existe d'autres applications qui le font déjà, mais celui-ci a des caractéristiques différentes. Ce programme peut vous aider à automatiser votre téléphone. Spécifiez des règles qui déclenchent des événements sous certaines conditions. Il existe d'autres applications qui le font déjà, mais celui-ci a des caractéristiques différentes.
Si vous avez des demandes de fonctionnalités, des problèmes ou des questions, veuillez m'envoyer un e-mail. Si vous trouvez un bogue, veuillez utiliser la fonction de rapport d'erreurs et me donner une chance de corriger le bogue avant de publier une mauvaise critique. Si vous avez des demandes de fonctionnalités, des problèmes ou des questions, veuillez m'envoyer un e-mail. Si vous trouvez un bogue, veuillez utiliser la fonction de rapport d'erreurs et me donner la possibilité de corriger le bogue avant de publier une mauvaise critique.
En raison des restrictions de Google, j'ai dû supprimer de plus en plus de fonctionnalités de l'application. Si vous n'aimez pas cela, jetez un coup d'œil à mon site Web. Déclencheurs :
* Emplacement (supprimé des appareils plus récents en raison des restrictions Google)
Déclenche: * Heure
* Emplacement (en raison des restrictions Google supprimées pour les appareils plus récents) * Vitesse (supprimé des appareils plus récents en raison des restrictions Google)
* Heure * Vitesse (en raison des restrictions Google supprimées pour les appareils plus récents) * Niveau de bruit (à quel point votre environnement est bruyant) (supprimé des appareils plus récents en raison des restrictions Google)
* Niveau de bruit (à quel point votre environnement est fort) (en raison des restrictions Google supprimées pour les appareils plus récents)
* État de charge de l'appareil * État de charge de l'appareil
* Connexion USB à l'ordinateur * Connexion USB à un ordinateur
* Connexion Wifi connectée / déconnectée * Connexion Wifi connectée / déconnectée
* Autre application démarrée/arrêtée * Autre application démarrée/arrêtée
* Mode avion * Mode avion
@ -26,18 +25,19 @@ Déclenche:
* Musique en cours de lecture ou non * Musique en cours de lecture ou non
* Appareil démarré * Appareil démarré
* Service démarré * Service démarré
* Variables qui ont été définies
Actions: Actions :
* ToggleWifi (en raison des restrictions Google supprimées pour les appareils plus récents) * Basculer Wifi (supprimé des appareils plus récents en raison des restrictions Google)
* Basculer Bluetooth * Basculer Bluetooth
* Basculer le partage de connexion Wifi ou le partage de connexion USB * Basculer le partage de connexion Wifi ou le partage de connexion USB
* URL de déclenchement (n'ouvre pas le navigateur, mais émet une opération d'obtention sur un serveur Web; Je l'utilise pour la maison automatisation) * URL de déclenchement (n'ouvre pas le navigateur, mais émet une opération d'obtention sur un serveur Web; je l'utilise pour la maison automatisation)
* Modifier les paramètres sonores * Modifier les paramètres audio
* Basculer la rotation de l'écran * Basculer la rotation de l'écran
* Démarrer une autre application (et éventuellement fournir des intentions) * Démarrer une autre application (et éventuellement fournir des intentions)
* Appareil de réveil * Réveil
* Attendre (a du sens avant certaines autres actions) * Attendre (a du sens avant certaines autres actions)
* Basculer AirplaneMode (uniquement jusqu'à Android 4.1) * Basculer en mode avion (uniquement jusqu'à Android 4.1)
* Démarrer le lecteur de musique * Démarrer le lecteur de musique
* Synthèse vocale * Synthèse vocale
* Changer la luminosité de l'écran * Changer la luminosité de l'écran
@ -45,6 +45,8 @@ Actions:
* Lire le fichier audio * Lire le fichier audio
* Créer une notification * Créer une notification
* Fermer les notifications * Fermer les notifications
* Définir des variables
* Initier des appels téléphoniques
Explications sur l'utilisation des autorisations : Explications sur l'utilisation des autorisations :
https://server47.de/automation/permissions.php https://server47.de/automation/permissions.php

View File

@ -1 +1 @@
Automate stuff on your device by creating rules. Automatiser votre téléphone grâce à des règles.

View File

@ -0,0 +1,7 @@
* Novità: finestra di dialogo di conferma prima di eliminare posizioni, regole e profilo
* Nuova azione: effettuare una telefonata senza ulteriori richieste
* Nuovo trigger / azione: imposta variabili personalizzate come azioni e controllale nei trigger
* Risolto: il ricevitore della batteria potrebbe attivarsi sopra il 100% o al di sotto dello 0%
* Risolto: formato della data quando le variabili vengono utilizzate nei testi
* Risolto: la modifica della suoneria ora funziona dopo Android 7.1, ma è necessario modificare il profilo per applicarlo
* Traduzione francese aggiornata (grazie Lejun)

View File

@ -22,6 +22,7 @@ Eventi supportati:
* Orientamento del dispositivo (giroscopio) * Orientamento del dispositivo (giroscopio)
* Profilo attivo o meno * Profilo attivo o meno
* Broadcasts di altre app * Broadcasts di altre app
* Variabili che sono state impostate
Azioni supportate: Azioni supportate:
* Cambia lo stato del wifi * Cambia lo stato del wifi
@ -43,6 +44,8 @@ Azioni supportate:
* Manda un messaggio di testo * Manda un messaggio di testo
* Esegui un file musicale * Esegui un file musicale
* Creare notifiche * Creare notifiche
* Imposta variabili
* Avviare telefonate
È piuttosto difficile mantere questa applicazione funzionante su tutti gli hardware esistenti ed includendo tutti i cambi che Android riceve fra una versione e l'altra. Posso effettuare tests nell'emulatore, ma non sarà possibile trovare tutti gli errori. È piuttosto difficile mantere questa applicazione funzionante su tutti gli hardware esistenti ed includendo tutti i cambi che Android riceve fra una versione e l'altra. Posso effettuare tests nell'emulatore, ma non sarà possibile trovare tutti gli errori.
Pertanto, se una certa funzione non funziona sul tuo dispositivo - fammelo sapere. Nel corso degli anni ho potuto risolvere tutti gli errori che sono stati riportati in maniera ragionevole. Infatti, per questo, dipendo dalle informazioni condivise. Pertanto, se una certa funzione non funziona sul tuo dispositivo - fammelo sapere. Nel corso degli anni ho potuto risolvere tutti gli errori che sono stati riportati in maniera ragionevole. Infatti, per questo, dipendo dalle informazioni condivise.

View File

@ -0,0 +1,7 @@
* Nieuw: Bevestigingsdialoogvenster voordat u locaties, regels en profiel verwijdert
* Nieuwe actie: Maak telefoongesprek zonder verdere prompt
* Nieuwe trigger / actie: Stel aangepaste variabelen in als acties en controleer ze in triggers
* Opgelost: batterij-ontvanger kan boven 100% of minder dan 0% activeren
* Vast: Datumnotatie wanneer variabelen in teksten worden gebruikt
* Opgelost: het wijzigen van de beltoon werkt nu na Android 7.1, maar u moet het profiel bewerken om het toe te passen
* Franse vertaling bijgewerkt (bedankt Lejun)

View File

@ -24,6 +24,7 @@ Ondersteunde triggers:
* Apparaat oriëntatie (gyroscoop) * Apparaat oriëntatie (gyroscoop)
* Profiel actief of niet * Profiel actief of niet
* Broadcasts van andere apps * Broadcasts van andere apps
* Variabelen die zijn ingesteld
Ondersteunde acties: Ondersteunde acties:
* Wijzig wifi status * Wijzig wifi status
@ -45,6 +46,8 @@ Ondersteunde acties:
* Verstuur tekstbericht * Verstuur tekstbericht
* Geluidsbestand afspelen * Geluidsbestand afspelen
* Meldingen maken * Meldingen maken
* Stel variabelen in
* Start telefoongesprekken
Het is lastig om deze App werkend te houden over de vele verschillende hardware en de vele veranderingen die Android ondergaat in de loop der versies. Het is lastig om deze App werkend te houden over de vele verschillende hardware en de vele veranderingen die Android ondergaat in de loop der versies.
Ik test het in een emulator, maar dat kan niet alle bugs laten zien. Ik test het in een emulator, maar dat kan niet alle bugs laten zien.

View File

@ -0,0 +1,7 @@
* Новое: диалоговое окно подтверждения перед удалением местоположений, правил и профиля
* Новое действие: Сделайте телефонный звонок без дополнительного запроса
* Новый триггер/действие: установите пользовательские переменные в качестве действий и проверьте их в триггерах
* Исправлено: приемник батареи может срабатывать выше 100% или ниже 0%
* Исправлено: формат даты, когда переменные используются в текстах
* Исправлено: Изменение мелодии звонка теперь работает после Android 7.1, но вам нужно отредактировать профиль, чтобы он применялся
* Французский перевод обновлен (спасибо Lejun)

View File

@ -22,6 +22,7 @@
* Ориентация устройства (гироскоп) * Ориентация устройства (гироскоп)
* Состояние профиля * Состояние профиля
* Broadcast от других приложений * Broadcast от других приложений
* Переменные, которые были установлены
Действия: Действия:
* Вкл/Выкл Wi-Fi * Вкл/Выкл Wi-Fi
@ -42,6 +43,8 @@
* Отправить СМС * Отправить СМС
* Воспроизвести звуковой файл * Воспроизвести звуковой файл
* Создать уведомление * Создать уведомление
* Установка переменных
* Инициирование телефонных звонков
Достаточно сложно поддерживать работоспособность этого приложения на всех версиях устройств и Android. Я проверяю его в эмуляторе, но это не может обнаружить все ошибки. Достаточно сложно поддерживать работоспособность этого приложения на всех версиях устройств и Android. Я проверяю его в эмуляторе, но это не может обнаружить все ошибки.
Поэтому если какая-то функция не рабоатет на вашем устройстве- дайте мне знать. Я постоянно устраняю ошибки, полученные от пользователей, но для этого мне нужна обратная связь. Поэтому если какая-то функция не рабоатет на вашем устройстве- дайте мне знать. Я постоянно устраняю ошибки, полученные от пользователей, но для этого мне нужна обратная связь.