Battery charging type differentiation

This commit is contained in:
jens 2024-01-25 14:03:39 +01:00
parent f7ff8a38e1
commit 04fe674cf6
18 changed files with 357 additions and 29 deletions

View File

@ -233,7 +233,6 @@
<activity android:name=".ActivityManageActionStartActivity" />
<activity android:name=".ActivityManageTriggerNfc" />
<activity android:name=".ActivityManageActionSpeakText" />
<activity android:name=".ActivityManageActionPlaySound" />
<activity android:name=".ActivityManageTriggerBluetooth" />
<activity android:name=".ActivityMainProfiles" />
<activity android:name=".ActivityManageProfile" />
@ -242,6 +241,7 @@
<activity android:name=".ActivityPermissions"></activity>
<activity android:name=".ActivityManageTriggerNotification" />
<activity android:name=".ActivityManageTriggerCalendar" />
<activity android:name=".ActivityManageTriggerCharging" />
<service
android:name=".receivers.NotificationListener"

View File

@ -189,6 +189,7 @@
<activity android:name=".ActivityManageTriggerCheckVariable" />
<activity android:name=".ActivityManageActionCopyToClipboard" />
<activity android:name=".ActivityManageActionLocationService" />
<activity android:name=".ActivityManageTriggerCharging" />
<activity
android:name=".ActivityMainTabLayout"

View File

@ -172,6 +172,7 @@
<activity android:name=".ActivityManageTriggerCheckVariable" />
<activity android:name=".ActivityManageActionCopyToClipboard" />
<activity android:name=".ActivityManageActionLocationService" />
<activity android:name=".ActivityManageTriggerCharging" />
<activity
android:name=".ActivityMainTabLayout"

View File

@ -145,6 +145,8 @@ public class ActivityManageRule extends Activity
final static int requestCodeActionSetLocationServiceEdit = 832;
final static int requestCodeTriggerCalendarEventAdd = 833;
final static int requestCodeTriggerCalendarEventEdit = 834;
final static int requestCodeTriggerChargingAdd = 835;
final static int requestCodeTriggerChargingEdit = 836;
public static ActivityManageRule getInstance()
{
@ -355,6 +357,12 @@ public class ActivityManageRule extends Activity
calendarStateEditor.putExtra(intentNameTriggerParameter2, selectedTrigger.getTriggerParameter2());
startActivityForResult(calendarStateEditor, requestCodeTriggerCalendarEventEdit);
break;
case charging:
Intent chargingStateEditor = new Intent(ActivityManageRule.this, ActivityManageTriggerCharging.class);
chargingStateEditor.putExtra(intentNameTriggerParameter1, selectedTrigger.getTriggerParameter());
chargingStateEditor.putExtra(intentNameTriggerParameter2, selectedTrigger.getTriggerParameter2());
startActivityForResult(chargingStateEditor, requestCodeTriggerChargingEdit);
break;
default:
break;
}
@ -396,9 +404,6 @@ public class ActivityManageRule extends Activity
break;
case triggerUrl:
Intent activityEditTriggerUrlIntent = new Intent(ActivityManageRule.this, ActivityManageActionTriggerUrl.class);
// ActivityManageActionTriggerUrl.resultingAction = a;
// ActivityManageActionTriggerUrl.resultingAction.setParentRule(ruleToEdit);
// activityEditTriggerUrlIntent.putExtra("edit", true);
activityEditTriggerUrlIntent.putExtra(intentNameActionParameter1, a.getParameter1());
activityEditTriggerUrlIntent.putExtra(intentNameActionParameter2, a.getParameter2());
startActivityForResult(activityEditTriggerUrlIntent, requestCodeActionTriggerUrlEdit);
@ -710,7 +715,14 @@ public class ActivityManageRule extends Activity
startActivityForResult(timeFrameEditor, requestCodeTriggerTimeframeAdd);
return;
}
else if(triggerType == Trigger_Enum.charging || triggerType == Trigger_Enum.musicPlaying)
else if(triggerType == Trigger_Enum.charging)
{
newTrigger.setTriggerType(Trigger_Enum.charging);
Intent triggerChargingIntent = new Intent(myContext, ActivityManageTriggerCharging.class);
startActivityForResult(triggerChargingIntent, requestCodeTriggerChargingAdd);
return;
}
else if(triggerType == Trigger_Enum.musicPlaying)
booleanChoices = new String[]{getResources().getString(R.string.started), getResources().getString(R.string.stopped)};
else if(triggerType == Trigger_Enum.usb_host_connection)
booleanChoices = new String[]{getResources().getString(R.string.connected), getResources().getString(R.string.disconnected)};
@ -1460,6 +1472,30 @@ public class ActivityManageRule extends Activity
this.refreshTriggerList();
}
}
else if(requestCode == requestCodeTriggerChargingAdd)
{
if(resultCode == RESULT_OK)
{
newTrigger.setTriggerParameter(data.getBooleanExtra(ActivityManageRule.intentNameTriggerParameter1, false));
newTrigger.setTriggerParameter2(data.getStringExtra(ActivityManageRule.intentNameTriggerParameter2));
newTrigger.setParentRule(ruleToEdit);
ruleToEdit.getTriggerSet().add(newTrigger);
this.refreshTriggerList();
}
}
else if(requestCode == requestCodeTriggerChargingEdit)
{
if(resultCode == RESULT_OK)
{
Trigger responseTimeFrame = new Trigger();
responseTimeFrame.setTriggerType(Trigger_Enum.charging);
responseTimeFrame.setTriggerParameter(data.getBooleanExtra(intentNameTriggerParameter1, true));
responseTimeFrame.setTriggerParameter2(data.getStringExtra(intentNameTriggerParameter2));
responseTimeFrame.setParentRule(ruleToEdit);
ruleToEdit.getTriggerSet().set(editIndex, responseTimeFrame);
this.refreshTriggerList();
}
}
else if(requestCode == requestCodeActionStartActivityAdd)
{
// manage start of other activity

View File

@ -0,0 +1,87 @@
package com.jens.automation2;
import android.app.Activity;
import android.content.Intent;
import android.os.BatteryManager;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import androidx.annotation.Nullable;
import com.jens.automation2.ActivityManageRule;
import com.jens.automation2.Miscellaneous;
import com.jens.automation2.R;
import com.jens.automation2.Trigger;
import org.apache.commons.lang3.StringUtils;
public class ActivityManageTriggerCharging extends Activity
{
RadioButton rbChargingOn, rbChargingOff, rbChargingTypeAny, rbChargingTypeAc, rbChargingTypeUsb, rbChargingTypeWireless;
Button bTriggerChargingSave;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
Miscellaneous.setDisplayLanguage(this);
setContentView(R.layout.activity_manage_trigger_charging);
rbChargingOn = (RadioButton) findViewById(R.id.rbChargingOn);
rbChargingOff = (RadioButton) findViewById(R.id.rbChargingOff);
rbChargingTypeAny = (RadioButton) findViewById(R.id.rbChargingTypeAny);
rbChargingTypeAc = (RadioButton) findViewById(R.id.rbChargingTypeAc);
rbChargingTypeUsb = (RadioButton) findViewById(R.id.rbChargingTypeUsb);
rbChargingTypeWireless = (RadioButton) findViewById(R.id.rbChargingTypeWireless);
bTriggerChargingSave = (Button) findViewById(R.id.bTriggerChargingSave);
Intent input = getIntent();
if(input.hasExtra(ActivityManageRule.intentNameTriggerParameter1))
{
rbChargingOn.setChecked(input.getBooleanExtra(ActivityManageRule.intentNameTriggerParameter1, true));
rbChargingOff.setChecked(!input.getBooleanExtra(ActivityManageRule.intentNameTriggerParameter1, false));
if(input.hasExtra(ActivityManageRule.intentNameTriggerParameter2))
{
String[] params2 = input.getStringExtra(ActivityManageRule.intentNameTriggerParameter2).split(Trigger.triggerParameter2Split);
int chargingType = Integer.parseInt(params2[0]);
rbChargingTypeAny.setChecked(chargingType == 0);
rbChargingTypeAc.setChecked(chargingType == BatteryManager.BATTERY_PLUGGED_AC);
rbChargingTypeUsb.setChecked(chargingType == BatteryManager.BATTERY_PLUGGED_USB);
rbChargingTypeWireless.setChecked(chargingType == BatteryManager.BATTERY_PLUGGED_WIRELESS);
}
}
bTriggerChargingSave.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view)
{
Intent response = new Intent();
response.putExtra(ActivityManageRule.intentNameTriggerParameter1, rbChargingOn.isChecked());
String param2 = "";
if(rbChargingTypeAny.isChecked())
param2 = "0";
else if(rbChargingTypeAc.isChecked())
param2 = String.valueOf(BatteryManager.BATTERY_PLUGGED_AC);
else if(rbChargingTypeUsb.isChecked())
param2 = String.valueOf(BatteryManager.BATTERY_PLUGGED_USB);
else if(rbChargingTypeWireless.isChecked())
param2 = String.valueOf(BatteryManager.BATTERY_PLUGGED_WIRELESS);
response.putExtra(ActivityManageRule.intentNameTriggerParameter2, param2);
setResult(RESULT_OK, response);
finish();
}
});
}
}

View File

@ -2,6 +2,7 @@ package com.jens.automation2;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
import android.os.BatteryManager;
import android.os.Build;
import android.service.notification.StatusBarNotification;
import android.telephony.TelephonyManager;
@ -1171,22 +1172,34 @@ public class Trigger
boolean checkCharging()
{
if(BatteryReceiver.isDeviceCharging(Miscellaneous.getAnyContext()) == 0)
if(BatteryReceiver.isDeviceCharging(Miscellaneous.getAnyContext()) == 0) // unknown state
{
return false; // unknown charging state, can't activate rule under these conditions
}
else if(BatteryReceiver.isDeviceCharging(Miscellaneous.getAnyContext()) == 1)
else if(BatteryReceiver.isDeviceCharging(Miscellaneous.getAnyContext()) == 1) // we are discharging
{
if(this.getTriggerParameter()) //rule says when charging, but we're currently discharging
return false;
if(!this.getTriggerParameter()) // rule says when charging, but we're currently discharging
return true;
}
else if(BatteryReceiver.isDeviceCharging(Miscellaneous.getAnyContext()) == 2)
else if(BatteryReceiver.isDeviceCharging(Miscellaneous.getAnyContext()) == 2) // we are charging
{
if(!this.getTriggerParameter()) //rule says when discharging, but we're currently charging
return false;
if(this.getTriggerParameter()) // rule says when discharging, but we're currently charging
{
// check charging type
if(StringUtils.isEmpty(getTriggerParameter2()))
return true;
else
{
int desiredType;
String[] typeParams = getTriggerParameter2().split(triggerParameter2Split, -1);
desiredType = Integer.parseInt(typeParams[0]);
if(desiredType == BatteryReceiver.getCurrentChargingType())
return true;
}
}
}
return true;
return false;
}
boolean checkTetheringActive()
@ -1625,6 +1638,20 @@ public class Trigger
else
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.stopping) + " ");
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.triggerCharging));
returnString.append(" (");
if(!StringUtils.isEmpty(getTriggerParameter2()))
{
String[] pieces = getTriggerParameter2().split(triggerParameter2Split, -1);
if(pieces[0].equals("0"))
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.any));
else if(pieces[0].equals(String.valueOf(BatteryManager.BATTERY_PLUGGED_AC)))
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.charging_AC));
else if(pieces[0].equals(String.valueOf(BatteryManager.BATTERY_PLUGGED_USB)))
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.usb));
else if(pieces[0].equals(String.valueOf(BatteryManager.BATTERY_PLUGGED_WIRELESS)))
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.charging_wireless));
}
returnString.append(")");
break;
case batteryLevel:
returnString.append(Miscellaneous.getAnyContext().getResources().getString(R.string.batteryLevel));

View File

@ -7,7 +7,6 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.os.BatteryManager;
import android.util.Log;
import android.widget.Toast;
import com.jens.automation2.ActivityPermissions;
import com.jens.automation2.AutomationService;
@ -25,6 +24,9 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
static boolean batteryReceiverActive = false;
static IntentFilter batteryIntentFilter = null;
static Intent batteryStatus = null;
private static int currentChargingState = 0; //0=unknown, 1=no, 2=yes
private static int currentChargingType = 0; //AC, wireless, USB
static BroadcastReceiver batteryInfoReceiverInstance = null;
public static void startBatteryReceiver(final AutomationService automationServiceRef)
@ -41,8 +43,6 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
batteryIntentFilter = new IntentFilter();
batteryIntentFilter.addAction(Intent.ACTION_BATTERY_CHANGED);
batteryIntentFilter.addAction(Intent.ACTION_BATTERY_LOW);
// batteryIntentFilter.addAction(Intent.ACTION_POWER_CONNECTED);
// batteryIntentFilter.addAction(Intent.ACTION_POWER_DISCONNECTED);
}
batteryStatus = automationServiceRef.registerReceiver(batteryInfoReceiverInstance, batteryIntentFilter);
@ -79,8 +79,6 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
return batteryLevel;
}
private static int currentChargingState = 0; //0=unknown, 1=no, 2=yes
public static int getCurrentChargingState()
{
return currentChargingState;
@ -123,7 +121,12 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
case BatteryManager.BATTERY_PLUGGED_AC:
// Toast.makeText(context, "Regular charging", Toast.LENGTH_LONG).show();
Miscellaneous.logEvent("i", "BatteryReceiver", "Regular charging.", 5);
this.actionCharging(context);
this.actionCharging(context, statusPlugged);
break;
case BatteryManager.BATTERY_PLUGGED_WIRELESS:
// Toast.makeText(context, "Regular charging", Toast.LENGTH_LONG).show();
Miscellaneous.logEvent("i", "BatteryReceiver", "Wireless charging.", 5);
this.actionCharging(context, statusPlugged);
break;
case BatteryManager.BATTERY_PLUGGED_USB:
this.actionUsbConnected(context);
@ -135,7 +138,7 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
case BatteryManager.BATTERY_STATUS_CHARGING:
case BatteryManager.BATTERY_STATUS_FULL:
// Miscellaneous.logEvent("i", "BatteryReceiver", "Device has been fully charged.", 5);
this.actionCharging(context);
this.actionCharging(context, statusPlugged);
break;
case BatteryManager.BATTERY_STATUS_DISCHARGING:
case BatteryManager.BATTERY_STATUS_NOT_CHARGING:
@ -155,28 +158,33 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
switch(currentChargingState)
{
case 0:
Miscellaneous.logEvent("w", "ChargingInfo", "Status of device charging was requested. Information isn't available, yet.", 4);
Miscellaneous.logEvent("w", "ChargingInfo", "Information isn't available, yet.", 4);
break;
case 1:
Miscellaneous.logEvent("i", "ChargingInfo", "Status of device charging was requested. Device is discharging.", 3);
Miscellaneous.logEvent("i", "ChargingInfo", "Device is discharging.", 3);
break;
case BatteryManager.BATTERY_STATUS_CHARGING:
Miscellaneous.logEvent("i", "ChargingInfo", "Status of device charging was requested. Device is charging.", 3);
Miscellaneous.logEvent("i", "ChargingInfo", "Device is charging.", 3);
break;
}
return currentChargingState;
}
private void actionCharging(Context context)
public static int getCurrentChargingType()
{
return currentChargingType;
}
private void actionCharging(Context context, int statusPlugged)
{
if(currentChargingState != BatteryManager.BATTERY_STATUS_CHARGING) // Avoid flooding the log. This event will occur on a regular basis even though charging state wasn't changed.
{
Miscellaneous.logEvent("i", "BatteryReceiver", "Battery is charging or full.", 3);
currentChargingState = BatteryManager.BATTERY_STATUS_CHARGING;
//activate rule(s)
currentChargingType = statusPlugged;
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.charging);
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByCharging(true);
for(int i=0; i<ruleCandidates.size(); i++)
{
if(ruleCandidates.get(i).getsGreenLight(context))
@ -229,14 +237,13 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
// Toast.makeText(context, "Connected to computer.", Toast.LENGTH_LONG).show();
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger_Enum.usb_host_connection);
// ArrayList<Rule> ruleCandidates = Rule.findRuleCandidatesByUsbHost(true);
for(Rule oneRule : ruleCandidates)
{
if(oneRule.getsGreenLight(context))
oneRule.activate(automationServiceRef, false);
}
this.actionCharging(context);
this.actionCharging(context, BatteryManager.BATTERY_PLUGGED_USB);
}
}

View File

@ -0,0 +1,123 @@
<?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/triggerCharging"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/triggerChargingComment" />
<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/state" />
<RadioGroup
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<RadioButton
android:id="@+id/rbChargingOn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/charging" />
<RadioButton
android:id="@+id/rbChargingOff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/notCharging" />
</RadioGroup>
</TableRow>
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="10dp"
android:background="#aa000000" />
<TableRow>
<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/type" />
<RadioGroup>
<RadioButton
android:id="@+id/rbChargingTypeAny"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/any" />
<RadioButton
android:id="@+id/rbChargingTypeAc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/charging_AC" />
<RadioButton
android:id="@+id/rbChargingTypeUsb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/usb" />
<RadioButton
android:id="@+id/rbChargingTypeWireless"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/charging_wireless" />
</RadioGroup>
</TableRow>
</TableLayout>
<Button
android:id="@+id/bTriggerChargingSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/default_margin"
android:text="@string/save" />
</LinearLayout>
</ScrollView>

View File

@ -848,4 +848,9 @@
<string name="reoccurringTrue">Ereignis ist wiederkehrend</string>
<string name="reoccurring">wiederkehrend</string>
<string name="calendarTriggerExecutionHints">Wenn Ihr Kalender mehrere parallele, überlappende oder direkt aufeinanderfolgende Ereignisse enthält, wird eine Regel so oft ausgeführt, wie es Ereignisse gibt, die den Kriterien der Regel entsprechen. Falls eine Regel mehrere Kalenderauslöser hat und mehrere übereinstimmende Ereignisse parallel vorhanden sind, wird die Regel nur einmal ausgeführt.</string>
<string name="charging_AC">Ladegerät</string>
<string name="charging_wireless">drahtlos</string>
<string name="charging">laden</string>
<string name="notCharging">nicht laden</string>
<string name="triggerChargingComment">Der Typ wird nur ausgewertet, wenn das Gerät aufgeladen wird. Wenn \"Nicht laden\" ausgewählt ist, wird es bei jedem vorherigen Ladetyp ausgelöst. Wenn Sie dies auswerten möchten, sollten Sie die Verwendung der Variablen trigger/action in Betracht ziehen.</string>
</resources>

View File

@ -847,4 +847,9 @@
<string name="reoccurringTrue">El evento se repite</string>
<string name="reoccurring">Recurrente</string>
<string name="calendarTriggerExecutionHints">Si su calendario contiene varios eventos paralelos, superpuestos o directamente posteriores, una regla se ejecutará tantas veces como eventos coincidan con los criterios de la regla. En caso de que una regla tenga varios activadores de calendario y haya varios eventos coincidentes en paralelo, la regla se ejecutará solo una vez.</string>
<string name="charging_AC">cargador</string>
<string name="charging_wireless">inalámbrico</string>
<string name="charging">cargando</string>
<string name="notCharging">no cargando</string>
<string name="triggerChargingComment">El tipo solo se evaluará si el dispositivo se está cargando. Si se elige no cargar, se disparará en cualquier tipo de carga anterior. Si desea evaluar eso, considere la posibilidad de usar las variables trigger/action.</string>
</resources>

View File

@ -847,4 +847,9 @@
<string name="reoccurringTrue">l\'événement se reproduit</string>
<string name="reoccurring">Récurrents</string>
<string name="calendarTriggerExecutionHints">Si votre calendrier contient plusieurs événements parallèles, qui se chevauchent ou qui se suivent directement, une règle sera exécutée autant de fois qu\'il y a d\'événements correspondant aux critères de la règle. Dans le cas où une règle a plusieurs déclencheurs de calendrier et qu\'il y a plusieurs événements correspondants en parallèle, la règle ne sera exécutée qu\'une seule fois.</string>
<string name="charging_AC">chargeur</string>
<string name="charging_wireless">sans fil</string>
<string name="charging">Charge</string>
<string name="notCharging">Ne charge pas</string>
<string name="triggerChargingComment">Le type ne sera évalué que si l\'appareil est en charge. Si l\'option Ne pas charger est sélectionnée, elle se déclenchera à n\'importe quel type de charge précédent. Si vous souhaitez évaluer cela, envisagez d\'utiliser les variables déclencheur/action.</string>
</resources>

View File

@ -848,4 +848,9 @@
<string name="reoccurringTrue">l\'evento si ripete</string>
<string name="reoccurring">Reoccurring</string>
<string name="calendarTriggerExecutionHints">Se il calendario contiene più eventi paralleli, sovrapposti o direttamente successivi, una regola verrà eseguita tante volte quanti sono gli eventi che corrispondono ai criteri della regola. Nel caso in cui una regola disponga di più trigger di calendario e siano presenti più eventi corrispondenti in parallelo, la regola verrà eseguita una sola volta.</string>
<string name="charging_AC">caricatore</string>
<string name="charging_wireless">wireless</string>
<string name="charging">caricamento</string>
<string name="notCharging">non in carica</string>
<string name="triggerChargingComment">Il tipo verrà valutato solo se il dispositivo è in carica. Se si sceglie di non caricare, si attiverà a qualsiasi tipo di ricarica precedente. Se si desidera valutarlo, prendere in considerazione l\'utilizzo delle variabili trigger/action.</string>
</resources>

View File

@ -846,5 +846,10 @@
<string name="reoccurringTrue">gebeurtenis zich opnieuw voordoet</string>
<string name="reoccurring">Terugkerende</string>
<string name="calendarTriggerExecutionHints">Als uw agenda meerdere parallelle, overlappende of direct volgende gebeurtenissen bevat, wordt een regel net zo vaak uitgevoerd als er afspraken zijn die voldoen aan de criteria van de regel. Als een regel meerdere agendatriggers heeft en er meerdere overeenkomende gebeurtenissen parallel zijn, wordt de regel slechts één keer uitgevoerd.</string>
<string name="charging_AC">lader</string>
<string name="charging_wireless">draadloos</string>
<string name="charging">Opladen</string>
<string name="notCharging">laadt niet op</string>
<string name="triggerChargingComment">Het type wordt alleen geëvalueerd als het apparaat wordt opgeladen. Als er niet wordt gekozen voor opladen, wordt het geactiveerd bij elk eerder oplaadtype. Als je dat wilt evalueren, overweeg dan om de variabelen trigger/actie te gebruiken.</string>
</resources>

View File

@ -945,4 +945,9 @@
<string name="reoccurringTrue">zdarzenie powtarza się</string>
<string name="reoccurring">Cyklicznych</string>
<string name="calendarTriggerExecutionHints">Jeśli Twój kalendarz zawiera wiele równoległych, nakładających się na siebie lub bezpośrednio następujących wydarzeń, reguła zostanie wykonana tyle razy, ile jest wydarzeń spełniających kryteria reguły. Jeśli reguła ma wiele wyzwalaczy kalendarza i równolegle występuje wiele pasujących zdarzeń, reguła zostanie wykonana tylko raz.</string>
<string name="charging_AC">Ładowarka</string>
<string name="charging_wireless">bezprzewodowy</string>
<string name="charging">Ładowania</string>
<string name="notCharging">Nie ładuje się</string>
<string name="triggerChargingComment">Typ zostanie oceniony tylko wtedy, gdy urządzenie się ładuje. Jeśli nie zostanie wybrane ładowanie, zostanie uruchomione przy dowolnym poprzednim typie ładowania. Jeśli chcesz to ocenić, rozważ użycie zmiennych trigger/action.</string>
</resources>

View File

@ -905,4 +905,9 @@
<string name="reoccurringTrue">Событие повторяется</string>
<string name="reoccurring">Повторяющиеся</string>
<string name="calendarTriggerExecutionHints">Если календарь содержит несколько параллельных, перекрывающихся или непосредственно следующих событий, правило будет выполняться столько раз, сколько событий соответствует критериям правила. В случае, если правило имеет несколько календарных триггеров и параллельно существует несколько совпадающих событий, то правило будет выполнено только один раз.</string>
<string name="charging_AC">обвинитель</string>
<string name="charging_wireless">беспроволочный</string>
<string name="charging">зарядка</string>
<string name="notCharging">не заряжается</string>
<string name="triggerChargingComment">Тип будет оцениваться только в том случае, если устройство заряжается. Если зарядка не выбрана, он будет срабатывать при любом предыдущем типе зарядки. Если вы хотите это оценить, подумайте об использовании переменных trigger/action.</string>
</resources>

View File

@ -846,4 +846,9 @@
<string name="reoccurringTrue">事件再次发生</string>
<string name="reoccurring">重复发生</string>
<string name="calendarTriggerExecutionHints">如果您的日历包含多个平行、重叠或直接跟随的事件,则规则的执行次数将与规则条件匹配的事件次数相同。如果规则具有多个日历触发器,并且并行有多个匹配事件,则该规则将仅执行一次。</string>
<string name="charging_AC">充电器</string>
<string name="charging_wireless">无线电</string>
<string name="charging">充电</string>
<string name="notCharging">不充电</string>
<string name="triggerChargingComment">仅当设备正在充电时,才会评估类型。如果未选择充电,它将以任何以前的充电类型点火。如果要对此进行评估,请考虑使用变量 trigger/action。</string>
</resources>

View File

@ -940,4 +940,9 @@
<string name="reoccurringTrue">event is reoccurring</string>
<string name="reoccurring">reoccurring</string>
<string name="calendarTriggerExecutionHints">If your calendar holds multiple parallel, overlapping or directly following events, a rule will get executed as many times as there are events matching the rule\'s criteria. In case a rule has multiple calendar triggers and there are multiple matching events in parallel, then the rule will get executed only once.</string>
<string name="charging_AC">AC</string>
<string name="charging_wireless">wireless</string>
<string name="charging">charging</string>
<string name="notCharging">not charging</string>
<string name="triggerChargingComment">The type will only be evaluated if the device is charging. If not charging is chosen, it will fire at any previous charging type. If you want to evaluate that, consider using the variables trigger/action.</string>
</resources>

View File

@ -11,3 +11,4 @@
* Added: Result of triggerUrl action is now stored in a variable if you wish to check it
* Added: New trigger: Calendar events
* Added: Result of runExecutable action is now stored in a variable if you wish to check it
* Added: Charging trigger can now differentiate between types (AC, USB, wirelessly)