Compare commits
7 Commits
6f1f112d98
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
| 7e72dfd19a | |||
| 23223480e5 | |||
| e3e2a87b5e | |||
| 4cea4391eb | |||
| 63150ed8f6 | |||
| d986fcdf4d | |||
| ea57dd01e5 |
@@ -3,16 +3,16 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 34
|
||||
compileSdkVersion 36
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.jens.automation2"
|
||||
minSdkVersion 16
|
||||
compileSdkVersion 34
|
||||
buildToolsVersion '34.0.0'
|
||||
minSdkVersion 19
|
||||
compileSdkVersion 36
|
||||
buildToolsVersion '36.0.0'
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
versionCode 146
|
||||
versionName "1.8.5"
|
||||
versionCode 148
|
||||
versionName "1.8.7"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@@ -36,7 +36,7 @@ android {
|
||||
{
|
||||
dimension "version"
|
||||
versionNameSuffix "-googlePlay"
|
||||
targetSdkVersion 35
|
||||
targetSdkVersion 36
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -63,25 +63,25 @@ android {
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
namespace 'com.jens.automation2'
|
||||
buildToolsVersion '34.0.0'
|
||||
buildToolsVersion '36.0.0'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.jetbrains:annotations:15.0'
|
||||
implementation 'org.jetbrains:annotations:26.1.0'
|
||||
googlePlayFlavorImplementation 'com.google.firebase:firebase-appindexing:20.0.0'
|
||||
googlePlayFlavorImplementation 'com.google.android.gms:play-services-location:18.0.0'
|
||||
googlePlayFlavorImplementation 'com.google.android.gms:play-services-location:20.0.0'
|
||||
|
||||
apkFlavorImplementation 'com.google.firebase:firebase-appindexing:20.0.0'
|
||||
apkFlavorImplementation 'com.google.android.gms:play-services-location:18.0.0'
|
||||
apkFlavorImplementation 'com.google.android.gms:play-services-location:20.0.0'
|
||||
|
||||
implementation 'com.linkedin.dexmaker:dexmaker:2.28.1'
|
||||
implementation 'org.apache.commons:commons-lang3:3.0'
|
||||
implementation 'com.linkedin.dexmaker:dexmaker:2.28.6'
|
||||
implementation 'org.apache.commons:commons-lang3:3.20.0'
|
||||
|
||||
//implementation "androidx.security:security-crypto:1.0.0"
|
||||
//implementation "androidx.security:security-identity-credential:1.0.0-alpha02"
|
||||
implementation 'androidx.appcompat:appcompat:1.4.2'
|
||||
implementation 'com.google.android.material:material:1.6.1'
|
||||
testImplementation 'junit:junit:4'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
}
|
||||
@@ -769,10 +769,10 @@ public class Action
|
||||
Miscellaneous.logEvent("i", "HTTP Request", "Attempt " + String.valueOf(attempts++) + " of " + String.valueOf(Settings.httpAttempts), 3);
|
||||
|
||||
// Either thorough checking or no encryption
|
||||
if(!Settings.httpAcceptAllCertificates || !urlString.toLowerCase(Locale.getDefault()).contains("https"))
|
||||
// if(!Settings.httpAcceptAllCertificates || !urlString.toLowerCase(Locale.getDefault()).contains("https"))
|
||||
response = Miscellaneous.downloadURL(urlString, urlUsername, urlPassword, method, httpParams);
|
||||
else
|
||||
response = Miscellaneous.downloadUrlWithoutCertificateChecking(urlString, urlUsername, urlPassword, method, httpParams);
|
||||
// else
|
||||
// response = Miscellaneous.downloadUrlWithoutCertificateChecking(urlString, urlUsername, urlPassword, method, httpParams);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -92,6 +92,7 @@ import java.security.KeyManagementException;
|
||||
import java.security.KeyStore;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.text.DateFormat;
|
||||
@@ -135,6 +136,27 @@ public class Miscellaneous extends Service
|
||||
|
||||
public static final String lineSeparator = System.getProperty("line.separator");
|
||||
|
||||
public static class TrustAllCertificates implements X509TrustManager
|
||||
{
|
||||
@Override
|
||||
public void checkClientTrusted(X509Certificate[] chain, String authType)
|
||||
{
|
||||
// Do nothing (trust all clients)
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkServerTrusted(X509Certificate[] chain, String authType)
|
||||
{
|
||||
// Do nothing (trust all servers)
|
||||
}
|
||||
|
||||
@Override
|
||||
public X509Certificate[] getAcceptedIssuers()
|
||||
{
|
||||
return new X509Certificate[0]; // No accepted issuers
|
||||
}
|
||||
}
|
||||
|
||||
public static String downloadURL(String url, String username, String password, String method, Map<String, String> httpParams)
|
||||
{
|
||||
HttpClient httpclient = new DefaultHttpClient();
|
||||
@@ -149,12 +171,24 @@ public class Miscellaneous extends Service
|
||||
HttpURLConnection connection;
|
||||
|
||||
if(url.toLowerCase().contains("https"))
|
||||
{
|
||||
connection = (HttpsURLConnection) urlObject.openConnection();
|
||||
}
|
||||
{
|
||||
connection = (HttpsURLConnection) urlObject.openConnection();
|
||||
if(Settings.httpAcceptAllCertificates)
|
||||
{
|
||||
SSLContext sslContext = SSLContext.getInstance("TLS"); // Use "TLS" (not "SSL" which is outdated)
|
||||
sslContext.init(
|
||||
null, // No KeyManager (client authentication not needed)
|
||||
new TrustManager[]{new TrustAllCertificates()}, // Use our trust manager
|
||||
new SecureRandom() // Secure random number generator
|
||||
);
|
||||
((HttpsURLConnection)connection).setSSLSocketFactory(sslContext.getSocketFactory());
|
||||
((HttpsURLConnection)connection).setHostnameVerifier((hostname, session) -> true); // Trust all hostnames
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
connection = (HttpURLConnection) urlObject.openConnection();
|
||||
|
||||
|
||||
// Add http simple authentication if specified
|
||||
if(username != null && password != null)
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ public class NfcReceiver
|
||||
{
|
||||
Miscellaneous.logEvent("i", "NFC", "ACTION_NDEF_DISCOVERED", 4);
|
||||
|
||||
getNfcAdapter(context);
|
||||
getNfcAdapter(context);
|
||||
|
||||
if(nfcAdapter == null) // if it's still null the device doesn't support NFC
|
||||
{
|
||||
|
||||
@@ -887,4 +887,5 @@
|
||||
<string name="enterAvalue">Geben Sie einen Wert ein.</string>
|
||||
<string name="setSystemSettingCapital">Systemeinstellung setzen</string>
|
||||
<string name="examplesWriteSecureSettings">Ich führe keine Liste möglicher Einstellungen. Bitte finden Sie diese Einstellungen selbst. Siehe <a href="https://developer.android.com/reference/android/provider/Settings.Secure">hier</a> für einige (unvollständige) Beispiele.</string>
|
||||
<string name="httpParametersExplanation">Beginnt ein Parametername mit %1$s, während die Methode POST ist, wird er nicht wie die anderen Parameter (mit Schlüssel=Wert) übertragen, sondern als Hauptdaten übertragen. Wenn der Parameter mit 2 % endet, wird keine Codierung durchgeführt.</string>
|
||||
</resources>
|
||||
@@ -886,4 +886,5 @@
|
||||
<string name="enterAvalue">Introduce un valor.</string>
|
||||
<string name="setSystemSettingCapital">Establecer configuración del sistema</string>
|
||||
<string name="examplesWriteSecureSettings">No llevo una lista de posibles configuraciones. Por favor, busca <a href="https://developer.android.com/reference/android/provider/Settings.Secure">esas</a> configuraciones por tu cuenta. Véase aquí algunos ejemplos (incompletos).</string>
|
||||
<string name="httpParametersExplanation">Si el nombre de algún parámetro comienza por %1$s mientras el método es POST, no se transmitirá como los otros parámetros (con clave=valor), sino que se transferirá como datos principales. Si el parámetro termina en %2$s, no se realizará ninguna codificación.</string>
|
||||
</resources>
|
||||
@@ -886,4 +886,5 @@
|
||||
<string name="far">loin</string>
|
||||
<string name="proximityText">La proximité se situe entre \"%1$s\" et \"%2$s\"</string>
|
||||
<string name="examplesWriteSecureSettings">Je ne tiens pas de liste des réglages possibles. Veuillez trouver ces réglages vous-même. Voir <a href="https://developer.android.com/reference/android/provider/Settings.Secure">ici</a> pour quelques exemples (incomplets).</string>
|
||||
<string name="httpParametersExplanation">Si un nom de paramètre commence par %1$s alors que la méthode est POST, il ne sera pas transmis comme les autres paramètres (avec clé=valeur), mais transféré comme données principales. Si le paramètre se termine par %2$s, aucun codage ne sera effectué.</string>
|
||||
</resources>
|
||||
|
||||
@@ -887,4 +887,5 @@
|
||||
<string name="uiThemeSummary">Il tema dell\'interfaccia grafica utente. Domanda necessaria.</string>
|
||||
<string name="proximity">Vicinanza</string>
|
||||
<string name="examplesWriteSecureSettings">Non tengo una lista di possibili impostazioni. Per favore, trova queste impostazioni da solo. Vedi <a href="https://developer.android.com/reference/android/provider/Settings.Secure">qui</a> per alcuni esempi (incompleti).</string>
|
||||
<string name="httpParametersExplanation">Se un nome di parametro inizia con %1$s mentre il metodo è POST, non verrà trasmesso come gli altri parametri (con chiave=valore), ma trasferito come dato principale. Se il parametro termina con %2$s, non verrà eseguita alcuna codifica.</string>
|
||||
</resources>
|
||||
|
||||
@@ -885,4 +885,5 @@
|
||||
<string name="enterAvalue">Voer een waarde in.</string>
|
||||
<string name="setSystemSettingCapital">Setsysteeminstelling</string>
|
||||
<string name="examplesWriteSecureSettings">Ik houd geen lijst bij met mogelijke instellingen. Zoek die instellingen zelf op. Zie <a href="https://developer.android.com/reference/android/provider/Settings.Secure">hier</a> voor enkele (onvolledige) voorbeelden.</string>
|
||||
<string name="httpParametersExplanation">Als een parameternaam begint met %1$s terwijl de methode POST is, wordt deze niet verzonden zoals de andere parameters (met sleutel=waarde), maar als hoofddata overgedragen. Als de parameter eindigt op %2 s, wordt er geen codering uitgevoerd.</string>
|
||||
</resources>
|
||||
|
||||
@@ -984,4 +984,5 @@
|
||||
<string name="enterAvalue">Wprowadź wartość.</string>
|
||||
<string name="setSystemSettingCapital">Ustawienia systemu zbiorów</string>
|
||||
<string name="examplesWriteSecureSettings">Nie prowadzę listy możliwych ustawień wyboru. Proszę, znajdź te ustawienia samodzielnie. Zobacz <a href="https://developer.android.com/reference/android/provider/Settings.Secure">tutaj</a> dla niektórych (niepełnych) przykładów.</string>
|
||||
<string name="httpParametersExplanation">Jeśli nazwa parametru zaczyna się od %1$s, a metoda to POST, nie zostanie przesłana jak pozostałe parametry (z klucz=wartością), lecz przeniesiona jako dane główne. Jeśli parametr kończy się na %2$s, nie zostanie wykonane kodowanie.</string>
|
||||
</resources>
|
||||
|
||||
@@ -944,4 +944,5 @@
|
||||
<string name="enterAvalue">Введите значение.</string>
|
||||
<string name="setSystemSettingCapital">Настройка системы множества</string>
|
||||
<string name="examplesWriteSecureSettings">Я не веду список возможных настроек. Пожалуйста, найдите эти настройки сами. См. <a href="https://developer.android.com/reference/android/provider/Settings.Secure">здесь</a> некоторые (неполные) примеры.</string>
|
||||
<string name="httpParametersExplanation">Если имя любого параметра начинается с %1$s, а метод — POST, оно не будет передаваться как другие параметры (с ключом =значением), а передаваться как основные данные. Если параметр заканчивается на %2$s, кодирование не выполняется.</string>
|
||||
</resources>
|
||||
|
||||
@@ -885,4 +885,5 @@
|
||||
<string name="enterAvalue">输入一个数值。</string>
|
||||
<string name="setSystemSettingCapital">集合系统设置</string>
|
||||
<string name="examplesWriteSecureSettings">我没有列出可能的设置。请自己找到这些设置。请参见(此处)一些 <a href="https://developer.android.com/reference/android/provider/Settings.Secure">不完整的</a> 示例。</string>
|
||||
<string name="httpParametersExplanation">如果参数名以 %1$s 开头且方法为 POST,则不会像其他参数(key=value)那样传输,而是作为主数据传输。如果参数以 %2$s 结尾,则不会进行编码。</string>
|
||||
</resources>
|
||||
@@ -977,5 +977,5 @@
|
||||
<string name="enterAvalue">Enter a value.</string>
|
||||
<string name="setSystemSettingCapital">Set system setting</string>
|
||||
<string name="examplesWriteSecureSettings">I do not keep a list of possible settings. Please find those settings on your own. See <a href="https://developer.android.com/reference/android/provider/Settings.Secure">here</a> for some (incomplete) examples.</string>
|
||||
<string name="httpParametersExplanation">If any parameter name starts with %1$s while method is POST, it will not be transmitted like the other parameters (with key=value), but transferred as main data.\nIf the parameter ends with %2$s, no encoding will be performed.</string>
|
||||
<string name="httpParametersExplanation">If any parameter name starts with %1$s while method is POST, it will not be transmitted like the other parameters (with key=value), but transferred as main data. If the parameter ends with %2$s, no encoding will be performed.</string>
|
||||
</resources>
|
||||
@@ -2,10 +2,10 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.2.2'
|
||||
classpath 'com.android.tools.build:gradle:8.13.2'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
@@ -15,7 +15,7 @@ buildscript {
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
fastlane/metadata/android/de-DE/changelogs/147.txt
Normal file
2
fastlane/metadata/android/de-DE/changelogs/147.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
* Hinzugefügt: Weitere Optionen für die Trigger-URL-Aktion hinzugefügt.
|
||||
* Hinzugefügt: Gradle und Bibliotheken aktualisiert.
|
||||
1
fastlane/metadata/android/de-DE/changelogs/148.txt
Normal file
1
fastlane/metadata/android/de-DE/changelogs/148.txt
Normal file
@@ -0,0 +1 @@
|
||||
* Geändert: MinSdk auf 19 erhöht, benötigt mindestens Android 4.4
|
||||
@@ -1 +1,2 @@
|
||||
* Added: Added further options to the trigger url action.
|
||||
* Added: Added further options to the trigger url action.
|
||||
* Added: Gradle and libraries updated.
|
||||
1
fastlane/metadata/android/en-US/changelogs/148.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/148.txt
Normal file
@@ -0,0 +1 @@
|
||||
* Changed: Raised minSdk to 19, requiring at minimum Android 4.4
|
||||
2
fastlane/metadata/android/es-ES/changelogs/147.txt
Normal file
2
fastlane/metadata/android/es-ES/changelogs/147.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
* Añadido: Se añadieron más opciones a la acción de disparar URL.
|
||||
* Añadido: Gradle y bibliotecas actualizadas.
|
||||
1
fastlane/metadata/android/es-ES/changelogs/148.txt
Normal file
1
fastlane/metadata/android/es-ES/changelogs/148.txt
Normal file
@@ -0,0 +1 @@
|
||||
* Cambiado: Subido minSdk a 19, requiriendo al mínimo Android 4.4
|
||||
2
fastlane/metadata/android/fr-FR/changelogs/147.txt
Normal file
2
fastlane/metadata/android/fr-FR/changelogs/147.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
* Ajouté : Ajout d'options supplémentaires à l'action de déclenchement de l'URL.
|
||||
* Ajouté : Gradle et bibliothèques mises à jour.
|
||||
1
fastlane/metadata/android/fr-FR/changelogs/148.txt
Normal file
1
fastlane/metadata/android/fr-FR/changelogs/148.txt
Normal file
@@ -0,0 +1 @@
|
||||
* Modifié : Portée du minSdk à 19, nécessitant au minimum Android 4.4
|
||||
2
fastlane/metadata/android/it-IT/changelogs/147.txt
Normal file
2
fastlane/metadata/android/it-IT/changelogs/147.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
* Aggiunto: Aggiunte ulteriori opzioni all'azione di trigger URL.
|
||||
* Aggiunto: Gradle e biblioteche aggiornate.
|
||||
1
fastlane/metadata/android/it-IT/changelogs/148.txt
Normal file
1
fastlane/metadata/android/it-IT/changelogs/148.txt
Normal file
@@ -0,0 +1 @@
|
||||
* Modificato: Aumentato il minSdk a 19, richiedendo almeno Android 4.4
|
||||
2
fastlane/metadata/android/nl-NL/changelogs/147.txt
Normal file
2
fastlane/metadata/android/nl-NL/changelogs/147.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
* Toegevoegd: Extra opties toegevoegd aan de trigger-urlactie.
|
||||
* Toegevoegd: Gradle en bibliotheken bijgewerkt.
|
||||
1
fastlane/metadata/android/nl-NL/changelogs/148.txt
Normal file
1
fastlane/metadata/android/nl-NL/changelogs/148.txt
Normal file
@@ -0,0 +1 @@
|
||||
* Gewijzigd: minSdk verhoogd naar 19, minimaal Android 4.4 vereist
|
||||
2
fastlane/metadata/android/pl-PL/changelogs/147.txt
Normal file
2
fastlane/metadata/android/pl-PL/changelogs/147.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
* Dodano: Dodano dodatkowe opcje akcji trigger url.
|
||||
* Dodano: Zaktualizowano Gradle i biblioteki.
|
||||
1
fastlane/metadata/android/pl-PL/changelogs/148.txt
Normal file
1
fastlane/metadata/android/pl-PL/changelogs/148.txt
Normal file
@@ -0,0 +1 @@
|
||||
* Zmieniono: Podniesiono minSdk do 19, wymagając co najmniej Androida 4.4
|
||||
2
fastlane/metadata/android/ru-RU/changelogs/147.txt
Normal file
2
fastlane/metadata/android/ru-RU/changelogs/147.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
* Добавлено: добавлены дополнительные опции к действию триггера URL.
|
||||
* Добавлено: обновлены Gradle и библиотеки.
|
||||
1
fastlane/metadata/android/ru-RU/changelogs/148.txt
Normal file
1
fastlane/metadata/android/ru-RU/changelogs/148.txt
Normal file
@@ -0,0 +1 @@
|
||||
* Изменено: minSdk повышен до 19, требуется минимум Android 4.4
|
||||
2
fastlane/metadata/android/zh-CN/changelogs/147.txt
Normal file
2
fastlane/metadata/android/zh-CN/changelogs/147.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
* 新增:为触发URL动作增加了更多选项。
|
||||
* 新增:Gradle及图书馆更新。
|
||||
1
fastlane/metadata/android/zh-CN/changelogs/148.txt
Normal file
1
fastlane/metadata/android/zh-CN/changelogs/148.txt
Normal file
@@ -0,0 +1 @@
|
||||
* 更改:将 minSDK 提升至 19,至少要求 Android 4.4
|
||||
@@ -16,4 +16,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
android.enableJetifier=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonTransitiveRClass=false
|
||||
android.nonFinalResIds=false
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
|
||||
Reference in New Issue
Block a user