Compare commits
No commits in common. "14655fe55dca158cb6eb08f8dc3d735faeab3f5b" and "6593f6c9238d56bb8138eb8252f61f6783c5b62c" have entirely different histories.
14655fe55d
...
6593f6c923
17
.idea/deploymentTargetDropDown.xml
generated
17
.idea/deploymentTargetDropDown.xml
generated
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<targetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="C:\Users\jens\.android\avd\Android_11.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2021-08-14T11:41:28.444891400Z" />
|
||||
</component>
|
||||
</project>
|
@ -11,8 +11,8 @@ android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.2'
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
versionCode 109
|
||||
versionName "1.6.39"
|
||||
versionCode 108
|
||||
versionName "1.6.38"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
@ -10,8 +10,8 @@
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 107,
|
||||
"versionName": "1.6.36-googlePlay",
|
||||
"versionCode": 106,
|
||||
"versionName": "1.6.35-googlePlay",
|
||||
"outputFile": "app-googlePlayFlavor-release.apk"
|
||||
}
|
||||
]
|
||||
|
@ -75,7 +75,6 @@
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:usesClearTextTraffic="true"
|
||||
android:allowClearUserData="true"
|
||||
android:icon="@drawable/gears"
|
||||
android:label="@string/app_name"
|
||||
|
@ -34,8 +34,6 @@ import static com.jens.automation2.Trigger.triggerParameter2Split;
|
||||
import static com.jens.automation2.receivers.NotificationListener.EXTRA_TEXT;
|
||||
import static com.jens.automation2.receivers.NotificationListener.EXTRA_TITLE;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
|
||||
public class Rule implements Comparable<Rule>
|
||||
{
|
||||
@ -814,42 +812,38 @@ public class Rule implements Comparable<Rule>
|
||||
{
|
||||
if(getLastExecution() == null || sbn.getPostTime() > this.lastExecution.getTimeInMillis())
|
||||
{
|
||||
String notificationApp = sbn.getPackageName();
|
||||
String notificationTitle = sbn.getNotification().extras.getString(EXTRA_TITLE);
|
||||
String notificationText = sbn.getNotification().extras.getString(EXTRA_TEXT);
|
||||
String app = sbn.getPackageName();
|
||||
String title = sbn.getNotification().extras.getString(EXTRA_TITLE);
|
||||
String text = sbn.getNotification().extras.getString(EXTRA_TEXT);
|
||||
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "Checking if this notification matches our rule " + this.getName() + ". App: " + notificationApp + ", title: " + notificationTitle + ", text: " + notificationText, 5);
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "Checking if this notification matches our rule " + this.getName() + ". App: " + app + ", title: " + title + ", text: " + text, 5);
|
||||
|
||||
if (!myApp.equals("-1"))
|
||||
{
|
||||
if (!notificationApp.equalsIgnoreCase(myApp))
|
||||
if (!app.equalsIgnoreCase(myApp))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "Notification app name does not match rule.", 5);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(myTitle))
|
||||
if (myTitle.length() > 0)
|
||||
{
|
||||
if (!Miscellaneous.compare(myTitleDir, myTitle, notificationTitle))
|
||||
if (!Miscellaneous.compare(myTitleDir, myTitle, title))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "Notification title does not match rule.", 5);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "A required title for a notification trigger was not specified.", 5);
|
||||
|
||||
if (!StringUtils.isEmpty(myText))
|
||||
if (myText.length() > 0)
|
||||
{
|
||||
if (!Miscellaneous.compare(myTextDir, myText, notificationText))
|
||||
if (!Miscellaneous.compare(myTextDir, myText, text))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "Notification text does not match rule.", 5);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
Miscellaneous.logEvent("i", "NotificationCheck", "A required text for a notification trigger was not specified.", 5);
|
||||
|
||||
foundMatch = true;
|
||||
break;
|
||||
|
@ -72,7 +72,6 @@
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:usesClearTextTraffic="true"
|
||||
android:allowClearUserData="true"
|
||||
android:icon="@drawable/gears"
|
||||
android:label="@string/app_name"
|
||||
|
@ -66,7 +66,6 @@
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:usesClearTextTraffic="true"
|
||||
android:allowClearUserData="true"
|
||||
android:icon="@drawable/gears"
|
||||
android:label="@string/app_name"
|
||||
|
@ -7,12 +7,9 @@ import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.wifi.ScanResult;
|
||||
import android.net.wifi.WifiConfiguration;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
@ -58,7 +55,6 @@ public class ActivityManageTriggerWifi extends Activity
|
||||
|
||||
wifiSpinnerAdapter = new ArrayAdapter<String>(this, R.layout.text_view_for_poi_listview_mediumtextsize, wifiList);
|
||||
spinnerWifiList.setAdapter(wifiSpinnerAdapter);
|
||||
spinnerWifiList.setEnabled(false); // bug in Android; this only works when done in code, not in xml
|
||||
|
||||
if (getIntent().hasExtra("edit"))
|
||||
{
|
||||
@ -132,20 +128,12 @@ public class ActivityManageTriggerWifi extends Activity
|
||||
|
||||
void reallyLoadWifiList()
|
||||
{
|
||||
if(Build.VERSION.SDK_INT >= 30)
|
||||
{
|
||||
Miscellaneous.messageBox(getResources().getString(R.string.hint), getResources().getString(R.string.wifiApi30), ActivityManageTriggerWifi.this).show();
|
||||
loadListOfVisibleWifis();
|
||||
}
|
||||
else
|
||||
{
|
||||
WifiManager myWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
|
||||
WifiManager myWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
|
||||
|
||||
for (WifiConfiguration wifi : myWifiManager.getConfiguredNetworks())
|
||||
wifiList.add(wifi.SSID.replaceAll("\"+$", "").replaceAll("^\"+", ""));
|
||||
}
|
||||
for (WifiConfiguration wifi : myWifiManager.getConfiguredNetworks())
|
||||
wifiList.add(wifi.SSID.replaceAll("\"+$", "").replaceAll("^\"+", ""));
|
||||
|
||||
if (wifiList.size() > 0)
|
||||
if(wifiList.size() > 0)
|
||||
{
|
||||
spinnerWifiList.setEnabled(true);
|
||||
Collections.sort(wifiList);
|
||||
@ -159,24 +147,6 @@ public class ActivityManageTriggerWifi extends Activity
|
||||
wifiSpinnerAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
void loadListOfVisibleWifis()
|
||||
{
|
||||
List<ScanResult> results = null;
|
||||
|
||||
try
|
||||
{
|
||||
WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService(WIFI_SERVICE);
|
||||
results = wifiManager.getScanResults();
|
||||
|
||||
for (ScanResult wifi : results)
|
||||
wifiList.add(wifi.SSID.replaceAll("\"+$", "").replaceAll("^\"+", ""));
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "loadListOfVisibleWifis()", Log.getStackTraceString(e), 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)
|
||||
{
|
||||
|
@ -244,7 +244,7 @@
|
||||
<string name="volumeRingtoneNotifications">Sonido polifónico ý notificaciónes</string>
|
||||
<string name="notificationRingtone">Sonido polifónico para notificaciónes</string>
|
||||
<string name="incomingCallsRingtone">Sonido de llamadas</string>
|
||||
<string name="batteryLevel">Nivel de la bateria</string>
|
||||
<string name="batteryLevel">NIvel de la bateria</string>
|
||||
<string name="selectBattery">Elija nivel de la bateria</string>
|
||||
<string name="triggerNoiseLevel">Nivel del ruido fondo</string>
|
||||
<string name="anotherAppIsRunning">Otra app esta encendida/terminada</string>
|
||||
|
@ -670,7 +670,7 @@
|
||||
<string name="matching">matching</string>
|
||||
<string name="urlRegex" translatable="false">https://regex101.com/</string>
|
||||
<string name="loadWifiList">Load wifi list</string>
|
||||
<string name="needLocationPermForWifiList">The list of wifis your device has been connected to could be used to determine which places you have been to. That\'s why the location permission is required to load the list of wifis. If you want to be able to pick one from the list you need to grant that permission. If you do not want that, you can still enter your wifi name manually.</string>
|
||||
<string name="needLocationPermForWifiList">The list of wifis your device has been connected to could be used to determine which places you have been to. That\'s why the location permission is required to load the list of wifis. If you want to be able to pick one from the list you need to grant that permission. If not you can still enter your wifi name manually.</string>
|
||||
<string name="noKnownWifis">There are no known wifis on your device.</string>
|
||||
<string name="urlToTriggerExplanation">This feature does NOT open a browser, but triggers a URL in the background. You can use this e.g. to send commands to your home automation.</string>
|
||||
<string name="automaticUpdateCheck">Check for updates</string>
|
||||
@ -690,5 +690,4 @@
|
||||
<string name="bottom">Bottom</string>
|
||||
<string name="tabsPlacement">Position of tab bar</string>
|
||||
<string name="tabsPlacementSummary">Choose where the tabs bar should be placed.</string>
|
||||
<string name="wifiApi30">Because Google screwd up yet another part of Android, starting with API 30 only the currently visible wifis can be displayed. Not all the ones your device knows.</string>
|
||||
</resources>
|
@ -1 +0,0 @@
|
||||
* Klartext HTTP Datenverkehr für URL-Auslösen-Aktionen ermöglicht.
|
@ -1,4 +1,4 @@
|
||||
* Translations updated.
|
||||
* New action: Vibrate
|
||||
* Improved speed calculation
|
||||
* Position of tab-bar can be chosen (top/bottom)
|
||||
* Position of tabbar can be chosen (top/bottom)
|
@ -1 +0,0 @@
|
||||
* Allowed cleartext HTTP traffic for rules using triggerUrl action
|
Loading…
Reference in New Issue
Block a user