mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-01 21:30:16 +02:00
Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2ed2c2c5f9 | ||
|
7f35589d49 | ||
|
09f1f27fa8 | ||
|
ea239ffa3a | ||
|
07ef86ae75 | ||
|
c670fce652 | ||
|
ba8ef7e5b0 | ||
|
0ec3fb0064 | ||
|
d121463bad | ||
|
862e85f882 | ||
|
efb75afb9b | ||
|
b4510e10a7 | ||
|
25233f3259 | ||
|
cff6b86997 | ||
|
e4103c8352 | ||
|
87c66b4d09 |
@@ -81,6 +81,10 @@ android {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
debug {
|
||||
applicationIdSuffix = ".debug"
|
||||
versionNameSuffix = "-debug"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
4
android/app/src/debug/res/values/string.xml
Normal file
4
android/app/src/debug/res/values/string.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="label">Obtainium Debug</string>
|
||||
</resources>
|
@@ -2,7 +2,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="dev.imranr.obtainium">
|
||||
<application
|
||||
android:label="Obtainium"
|
||||
android:label="@string/label"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
|
4
android/app/src/main/res/values/string.xml
Normal file
4
android/app/src/main/res/values/string.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="label">Obtainium</string>
|
||||
</resources>
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Intermediate veza",
|
||||
"exemptFromBackgroundUpdates": "Izuzmi iz ažuriranja u pozadini (ako su uključeni)",
|
||||
"bgUpdatesOnWiFiOnly": "Isključite ažuriranje u pozadini kada niste na WiFi-ju",
|
||||
"bgUpdatesWhileChargingOnly": "Disable background updates when not charging",
|
||||
"autoSelectHighestVersionCode": "Automatski izaberite najveću (verziju) versionCode APK-a",
|
||||
"versionExtractionRegEx": "RegEx ekstrakcija verzije",
|
||||
"trimVersionString": "Trim Version String With RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Připojený odkaz",
|
||||
"exemptFromBackgroundUpdates": "Vyloučit z aktualizací na pozadí (je-li povoleno)",
|
||||
"bgUpdatesOnWiFiOnly": "Deaktivovat aktualizace na pozadí, pokud není k dispozici Wi-Fi",
|
||||
"bgUpdatesWhileChargingOnly": "Zakázat aktualizace na pozadí, když se nenabíjí",
|
||||
"autoSelectHighestVersionCode": "Automaticky vybrat nejvyšší verzi APK",
|
||||
"versionExtractionRegEx": "Extrakce verze pomocí RegEx",
|
||||
"trimVersionString": "Oříznutí řetězce verze pomocí příkazu RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Mellemliggende link",
|
||||
"exemptFromBackgroundUpdates": "Undtag fra baggrundsopdateringer (hvis aktiveret)",
|
||||
"bgUpdatesOnWiFiOnly": "Deaktivér baggrundsopdateringer, når du ikke er på WiFi",
|
||||
"bgUpdatesWhileChargingOnly": "Deaktiver baggrundsopdateringer, når der ikke oplades",
|
||||
"autoSelectHighestVersionCode": "Auto-vælg højeste versionKode af APK",
|
||||
"versionExtractionRegEx": "RegEx for versionsstrengsudtrækning",
|
||||
"trimVersionString": "Trim versionsstrengen med RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "„Zwischen“-Link",
|
||||
"exemptFromBackgroundUpdates": "Ausschluss von Hintergrundaktualisierungen (falls aktiviert)",
|
||||
"bgUpdatesOnWiFiOnly": "Hintergrundaktualisierungen deaktivieren, wenn kein WLAN vorhanden ist",
|
||||
"bgUpdatesWhileChargingOnly": "Hintergrundaktualisierungen deaktivieren, wenn nicht geladen wird",
|
||||
"autoSelectHighestVersionCode": "Automatisch höchste APK-Version auswählen",
|
||||
"versionExtractionRegEx": "Versionsextraktion per RegEx",
|
||||
"trimVersionString": "Versionszeichenfolge mit RegEx kürzen",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Pera ligilo",
|
||||
"exemptFromBackgroundUpdates": "Escepti el la fonaj ĝisdatigoj (se aktiva)",
|
||||
"bgUpdatesOnWiFiOnly": "Malaktivigi fonajn ĝisdatigojn se sen vifio",
|
||||
"bgUpdatesWhileChargingOnly": "Disable background updates when not charging",
|
||||
"autoSelectHighestVersionCode": "Aŭtomate selekti la plej ĵusan version de la APK-kodo",
|
||||
"versionExtractionRegEx": "Ekstrakti la versioĉenon per regula esprimo",
|
||||
"trimVersionString": "Mallongigi la versioĉenon per regula esprimo",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Intermediate link",
|
||||
"exemptFromBackgroundUpdates": "Exempt from background updates (if enabled)",
|
||||
"bgUpdatesOnWiFiOnly": "Disable background updates when not on WiFi",
|
||||
"bgUpdatesWhileChargingOnly": "Disable background updates when not charging",
|
||||
"autoSelectHighestVersionCode": "Auto-select highest versionCode APK",
|
||||
"versionExtractionRegEx": "Version String Extraction RegEx",
|
||||
"trimVersionString": "Trim Version String With RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Enlace intermedio",
|
||||
"exemptFromBackgroundUpdates": "Exenta de actualizciones en segundo plano (si están habilitadas)",
|
||||
"bgUpdatesOnWiFiOnly": "Deshabilitar las actualizaciones en segundo plano sin WiFi",
|
||||
"bgUpdatesWhileChargingOnly": "Desactiva las actualizaciones en segundo plano cuando no estés cargando",
|
||||
"autoSelectHighestVersionCode": "Auto selección del paquete APK con versión más reciente",
|
||||
"versionExtractionRegEx": "Versión de extracción regex",
|
||||
"trimVersionString": "Recortar cadena de versión con RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "پیوند میانی",
|
||||
"exemptFromBackgroundUpdates": "معاف از بهروزرسانیهای پسزمینه (در صورت فعال بودن)",
|
||||
"bgUpdatesOnWiFiOnly": "بهروزرسانیهای پسزمینه را در صورت عدم اتصال به WiFi غیرفعال کنید",
|
||||
"bgUpdatesWhileChargingOnly": "Disable background updates when not charging",
|
||||
"autoSelectHighestVersionCode": "انتخاب خودکار بالاترین نسخه کد APK",
|
||||
"versionExtractionRegEx": "نسخه استخراج RegEx",
|
||||
"trimVersionString": "برش رشته نسخه با RegEx",
|
||||
|
@@ -37,7 +37,7 @@
|
||||
"cancelled": "Annulé",
|
||||
"appAlreadyAdded": "Application déjà ajoutée",
|
||||
"alreadyUpToDateQuestion": "L'application est à jour?",
|
||||
"addApp": "Ajouter Appli",
|
||||
"addApp": "Ajouter appli",
|
||||
"appSourceURL": "URL source de l'application",
|
||||
"error": "Erreur",
|
||||
"add": "Ajouter",
|
||||
@@ -88,7 +88,7 @@
|
||||
"author": "Auteur",
|
||||
"upToDateApps": "Applications à jour",
|
||||
"nonInstalledApps": "Applications non installées",
|
||||
"importExport": "Importer/Exporter",
|
||||
"importExport": "Importer/exporter",
|
||||
"settings": "Paramètres",
|
||||
"exportedTo": "Exporté vers {}",
|
||||
"obtainiumExport": "Exporter Obtainium",
|
||||
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Lien intermédiaire",
|
||||
"exemptFromBackgroundUpdates": "Exclure de la mise à jour en arrière-plan (si activé)",
|
||||
"bgUpdatesOnWiFiOnly": "Désactiver les mises à jour en arrière-plan lorsque vous n'êtes pas en WiFi",
|
||||
"bgUpdatesWhileChargingOnly": "Désactiver les mises à jour en arrière-plan lorsque le véhicule n'est pas en charge",
|
||||
"autoSelectHighestVersionCode": "Sélectionner automatiquement la version la plus récente du code APK",
|
||||
"versionExtractionRegEx": "Extraire la version par Expression régulière",
|
||||
"trimVersionString": "Découper la version par Expression régulière",
|
||||
@@ -315,7 +316,7 @@
|
||||
"appVerifierInstructionToast": "Partagez avec AppVerifier, puis revenez ici lorsque tout est prêt.",
|
||||
"wiki": "Aide/Wiki",
|
||||
"crowdsourcedConfigsLabel": "Configurations d'applications par la communauté (à utiliser à vos risques et périls)",
|
||||
"crowdsourcedConfigsShort": "Configurations d'applications par la foule",
|
||||
"crowdsourcedConfigsShort": "Configurations d'applications par la communauté",
|
||||
"allowInsecure": "Autoriser les requêtes HTTP non sécurisées",
|
||||
"stayOneVersionBehind": "Rester à une version de la dernière",
|
||||
"removeAppQuestion": {
|
||||
|
@@ -257,7 +257,8 @@
|
||||
"intermediateLinkNotFound": "Köztes hivatkozás nem található",
|
||||
"intermediateLink": "Köztes hivatkozás",
|
||||
"exemptFromBackgroundUpdates": "Mentes a háttérben történő frissítések alól (ha engedélyezett)",
|
||||
"bgUpdatesOnWiFiOnly": "A háttérben történő frissítések letiltása, ha nincs Wi-Fi",
|
||||
"bgUpdatesOnWiFiOnly": "Háttérfrissítések letiltása, amikor az eszköz nem csatlakozik a Wi-Fi-hez",
|
||||
"bgUpdatesWhileChargingOnly": "Háttérfrissítések letiltása, amikor az eszköz nincs a töltőn",
|
||||
"autoSelectHighestVersionCode": "A legmagasabb verziókódú APK automatikus kiválasztása",
|
||||
"versionExtractionRegEx": "Verzió-karakterlánc kivonatolása reguláris kifejezéssel",
|
||||
"trimVersionString": "Verzió-karakterlánc levágása reguláris kifejezéssel",
|
||||
@@ -265,10 +266,10 @@
|
||||
"matchGroupToUse": "Verziókarakterlánc-kivonatoláshoz használandó csoport reguláris kifejezéssel való egyeztetése",
|
||||
"highlightTouchTargets": "A kevésbé nyilvánvaló érintési pontok kiemelése",
|
||||
"pickExportDir": "Válassza ki a könyvtárat, ahová exportálni szeretne",
|
||||
"autoExportOnChanges": "Automatikus exportálás a változások után",
|
||||
"autoExportOnChanges": "Automatikus exportálás a változtatások után",
|
||||
"includeSettings": "Tartalmazza a beállításokat",
|
||||
"filterVersionsByRegEx": "Verziók szűrése reguláris kifejezéssel",
|
||||
"trySelectingSuggestedVersionCode": "Próbálja ki a javasolt verziókódú APK-t",
|
||||
"trySelectingSuggestedVersionCode": "Próbálja kiválasztani a „Javasolt” verziókódú APK-t",
|
||||
"dontSortReleasesList": "Az API-ból származó kiadási sorrend megőrzése",
|
||||
"reverseSort": "Fordított rendezés",
|
||||
"takeFirstLink": "Vegye az első hivatkozást",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Tautan perantara",
|
||||
"exemptFromBackgroundUpdates": "Dikecualikan dari pembaruan latar belakang (jika diaktifkan)",
|
||||
"bgUpdatesOnWiFiOnly": "Nonaktifkan pembaruan latar belakang saat tidak menggunakan WiFi",
|
||||
"bgUpdatesWhileChargingOnly": "Menonaktifkan pembaruan latar belakang saat tidak mengisi daya",
|
||||
"autoSelectHighestVersionCode": "Pilih otomatis APK dengan versi kode tertinggi",
|
||||
"versionExtractionRegEx": "Reguler ekspresi terkait ekstraksi versi string",
|
||||
"trimVersionString": "Potong versi string dengan reguler ekspresi",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Collegamento intermedio",
|
||||
"exemptFromBackgroundUpdates": "Esente da aggiornamenti in secondo piano (se attivo)",
|
||||
"bgUpdatesOnWiFiOnly": "Disattiva aggiornamenti in secondo piano quando non si usa il WiFi",
|
||||
"bgUpdatesWhileChargingOnly": "Disabilita gli aggiornamenti in background quando non è in carica",
|
||||
"autoSelectHighestVersionCode": "Auto-seleziona APK con versionCode più alto",
|
||||
"versionExtractionRegEx": "RegEx di estrazione versione",
|
||||
"trimVersionString": "Tagliare la stringa della versione con RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "中間リンク",
|
||||
"exemptFromBackgroundUpdates": "バックグラウンドアップデートを行わない (有効な場合)",
|
||||
"bgUpdatesOnWiFiOnly": "WiFiを使用していない場合、バックグラウンドアップデートを無効にする",
|
||||
"bgUpdatesWhileChargingOnly": "非充電時にバックグラウンド更新を無効にする",
|
||||
"autoSelectHighestVersionCode": "最も高いバージョンコードのAPKを自動で選択する",
|
||||
"versionExtractionRegEx": "バージョン抽出の正規表現",
|
||||
"trimVersionString": "正規表現でバージョン文字列をトリムする",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Intermediaire link",
|
||||
"exemptFromBackgroundUpdates": "Vrijgesteld van achtergrond-updates (indien ingeschakeld)",
|
||||
"bgUpdatesOnWiFiOnly": "Achtergrond-updates uitschakelen wanneer niet verbonden met WiFi",
|
||||
"bgUpdatesWhileChargingOnly": "Achtergrondupdates uitschakelen als er niet wordt opgeladen",
|
||||
"autoSelectHighestVersionCode": "De APK met de hoogste versiecode automatisch selecteren",
|
||||
"versionExtractionRegEx": "Reguliere expressie voor versie-extractie",
|
||||
"trimVersionString": "Versie string trimmen met RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Łącze pośrednie",
|
||||
"exemptFromBackgroundUpdates": "Wyklucz z uaktualnień w tle (jeśli są włączone)",
|
||||
"bgUpdatesOnWiFiOnly": "Wyłącz aktualizacje w tle, gdy nie ma połączenia z Wi-Fi",
|
||||
"bgUpdatesWhileChargingOnly": "Wyłącz aktualizacje w tle, gdy urządzenie nie jest ładowane",
|
||||
"autoSelectHighestVersionCode": "Automatycznie wybierz najwyższy kod wersji APK",
|
||||
"versionExtractionRegEx": "Wyrażenie regularne wyodrębniające wersję",
|
||||
"trimVersionString": "Przycinanie łańcucha wersji za pomocą RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Link intermediário",
|
||||
"exemptFromBackgroundUpdates": "Isento de atualizações em segundo-plano (se ativadas)",
|
||||
"bgUpdatesOnWiFiOnly": "Desative as atualizações em segundo-plano quando não estiver conectado no Wi-Fi",
|
||||
"bgUpdatesWhileChargingOnly": "Desativar actualizações em segundo plano quando não estiver a carregar",
|
||||
"autoSelectHighestVersionCode": "Auto-selecionar a versão mais recente",
|
||||
"versionExtractionRegEx": "Regex de extração de versão",
|
||||
"trimVersionString": "Cortar a cadeia de caracteres da versão com RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Промежуточная ссылка",
|
||||
"exemptFromBackgroundUpdates": "Исключить из фоновых обновлений (если включено)",
|
||||
"bgUpdatesOnWiFiOnly": "Отключить фоновые обновления, если нет соединения с Wi-Fi",
|
||||
"bgUpdatesWhileChargingOnly": "Отключение фоновых обновлений при отсутствии зарядки",
|
||||
"autoSelectHighestVersionCode": "Автоматически выбирать APK с актуальной версией кода",
|
||||
"versionExtractionRegEx": "Регулярное выражение для извлечения версии",
|
||||
"trimVersionString": "Обрезка строки версии с помощью RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Mellanlänk",
|
||||
"exemptFromBackgroundUpdates": "Undta från bakgrundsuppdateringar (om aktiverad)",
|
||||
"bgUpdatesOnWiFiOnly": "Inaktivera Bakgrundsuppdateringar utan WiFi",
|
||||
"bgUpdatesWhileChargingOnly": "Inaktivera bakgrundsuppdateringar när du inte laddar",
|
||||
"autoSelectHighestVersionCode": "Välj automatiskt högsta versionskod APK",
|
||||
"versionExtractionRegEx": "Version Extraction RegEx",
|
||||
"trimVersionString": "Trimma versionssträng med RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Ara bağlantı",
|
||||
"exemptFromBackgroundUpdates": "Arka plan güncellemelerinden muaf tut (etkinse)",
|
||||
"bgUpdatesOnWiFiOnly": "WiFi olmadığında arka plan güncellemelerini devre dışı bırak",
|
||||
"bgUpdatesWhileChargingOnly": "Şarj olmadığında arka plan güncellemelerini devre dışı bırakma",
|
||||
"autoSelectHighestVersionCode": "Otomatik olarak en yüksek sürüm kodunu seç",
|
||||
"versionExtractionRegEx": "Sürüm Çıkarma Düzenli İfade",
|
||||
"trimVersionString": "RegEx ile Sürüm Dizesini Kırpma",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Проміжне посилання",
|
||||
"exemptFromBackgroundUpdates": "Виключено з фонових оновлень (якщо ввімкнено)",
|
||||
"bgUpdatesOnWiFiOnly": "Вимкнути фонові оновлення поза Wi-Fi",
|
||||
"bgUpdatesWhileChargingOnly": "Вимкнути фонові оновлення, коли не заряджається",
|
||||
"autoSelectHighestVersionCode": "Автоматичний вибір APK з найвищим кодом версії",
|
||||
"versionExtractionRegEx": "Регулярний вираз для вилучення рядка версії",
|
||||
"trimVersionString": "Обрізати рядок версії за допомогою RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "Liên kết trung gian",
|
||||
"exemptFromBackgroundUpdates": "Miễn cập nhật nền (nếu được bật)",
|
||||
"bgUpdatesOnWiFiOnly": "Tắt cập nhật nền khi không có WiFi",
|
||||
"bgUpdatesWhileChargingOnly": "Disable background updates when not charging",
|
||||
"autoSelectHighestVersionCode": "Tự động chọn APK mã phiên bản cao nhất",
|
||||
"versionExtractionRegEx": "Trích xuất phiên bản RegEx",
|
||||
"trimVersionString": "Trim Version String With RegEx",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "中間連結",
|
||||
"exemptFromBackgroundUpdates": "免除背景更新(若已啟用)",
|
||||
"bgUpdatesOnWiFiOnly": "停用非 WiFi 的背景更新",
|
||||
"bgUpdatesWhileChargingOnly": "Disable background updates when not charging",
|
||||
"autoSelectHighestVersionCode": "自動選擇最高 versionCode 的 APK",
|
||||
"versionExtractionRegEx": "版本字串提取正則表達式",
|
||||
"trimVersionString": "用正則表達式修剪版本字串",
|
||||
|
@@ -258,6 +258,7 @@
|
||||
"intermediateLink": "中转链接",
|
||||
"exemptFromBackgroundUpdates": "禁用后台更新(仅此应用生效,即使已启用全局后台更新)",
|
||||
"bgUpdatesOnWiFiOnly": "未连接 Wi-Fi 时禁用后台更新",
|
||||
"bgUpdatesWhileChargingOnly": "不充电时禁用后台更新",
|
||||
"autoSelectHighestVersionCode": "自动选择内部版本号最高的 APK 文件",
|
||||
"versionExtractionRegEx": "提取版本号的正则表达式",
|
||||
"trimVersionString": "使用 RegEx 修剪版本字符串",
|
||||
|
@@ -95,10 +95,9 @@ class APKPure extends AppSource {
|
||||
// Unclear why there can even be multiple APKs for the same version and arch
|
||||
var apkInfo = e.nextElementSibling?.querySelector('div.info');
|
||||
String? versionCode = RegExp('[0-9]+')
|
||||
.firstMatch(apkInfo
|
||||
?.querySelector('div.info-top span.code')
|
||||
?.text ??
|
||||
'')
|
||||
.firstMatch(
|
||||
apkInfo?.querySelector('div.info-top .code')?.text ??
|
||||
'')
|
||||
?.group(0)
|
||||
?.trim();
|
||||
var types = apkInfo
|
||||
@@ -167,7 +166,7 @@ class APKPure extends AppSource {
|
||||
var res0 = await sourceRequest('$standardUrl/versions', additionalSettings);
|
||||
var versionLinks = await grabLinksCommon(res0, {
|
||||
'skipSort': true,
|
||||
'customLinkFilterRegex': '$standardUrl/download/[^/]+\$'
|
||||
'customLinkFilterRegex': '${Uri.decodeFull(standardUrl)}/download/[^/]+\$'
|
||||
});
|
||||
|
||||
var supportedArchs = (await DeviceInfoPlugin().androidInfo).supportedAbis;
|
||||
|
@@ -419,6 +419,25 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
})
|
||||
],
|
||||
),
|
||||
height16,
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(tr(
|
||||
'bgUpdatesWhileChargingOnly'))),
|
||||
Switch(
|
||||
value: settingsProvider
|
||||
.bgUpdatesWhileChargingOnly,
|
||||
onChanged: (value) {
|
||||
settingsProvider
|
||||
.bgUpdatesWhileChargingOnly =
|
||||
value;
|
||||
})
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
@@ -5,6 +5,7 @@ import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
import 'package:battery_plus/battery_plus.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:crypto/crypto.dart';
|
||||
@@ -1885,10 +1886,20 @@ Future<void> bgUpdateCheck(String taskId, Map<String, dynamic>? params) async {
|
||||
(<List<MapEntry<String, int>>>[]))
|
||||
];
|
||||
|
||||
var networkRestricted = false;
|
||||
if (appsProvider.settingsProvider.bgUpdatesOnWiFiOnly) {
|
||||
networkRestricted = !netResult.contains(ConnectivityResult.wifi) &&
|
||||
!netResult.contains(ConnectivityResult.ethernet);
|
||||
var networkRestricted = appsProvider.settingsProvider.bgUpdatesOnWiFiOnly &&
|
||||
!netResult.contains(ConnectivityResult.wifi) &&
|
||||
!netResult.contains(ConnectivityResult.ethernet);
|
||||
|
||||
var chargingRestricted =
|
||||
appsProvider.settingsProvider.bgUpdatesWhileChargingOnly &&
|
||||
(await Battery().batteryState) != BatteryState.charging;
|
||||
|
||||
if (networkRestricted) {
|
||||
logs.add('BG update task: Network restriction in effect.');
|
||||
}
|
||||
|
||||
if (chargingRestricted) {
|
||||
logs.add('BG update task: Charging restriction in effect.');
|
||||
}
|
||||
|
||||
if (toCheck.isNotEmpty) {
|
||||
@@ -1928,14 +1939,6 @@ Future<void> bgUpdateCheck(String taskId, Map<String, dynamic>? params) async {
|
||||
CheckingUpdatesNotification notif = CheckingUpdatesNotification(
|
||||
plural('apps', toCheck.length)); // The notif. to show while checking
|
||||
|
||||
// Set a bool for when we're no on wifi/wired and the user doesn't want to download apps in that state
|
||||
var networkRestricted = false;
|
||||
if (appsProvider.settingsProvider.bgUpdatesOnWiFiOnly) {
|
||||
var netResult = await (Connectivity().checkConnectivity());
|
||||
networkRestricted = !netResult.contains(ConnectivityResult.wifi) &&
|
||||
!netResult.contains(ConnectivityResult.ethernet);
|
||||
}
|
||||
|
||||
try {
|
||||
// Check for updates
|
||||
notificationsProvider.notify(notif, cancelExisting: true);
|
||||
@@ -1983,6 +1986,7 @@ Future<void> bgUpdateCheck(String taskId, Map<String, dynamic>? params) async {
|
||||
// Filter out updates that will be installed silently (the rest go into toNotify)
|
||||
for (var i = 0; i < updates.length; i++) {
|
||||
if (networkRestricted ||
|
||||
chargingRestricted ||
|
||||
!(await appsProvider.canInstallSilently(updates[i]))) {
|
||||
if (updates[i].additionalSettings['skipUpdateNotifications'] != true) {
|
||||
toNotify.add(updates[i]);
|
||||
@@ -2029,7 +2033,7 @@ Future<void> bgUpdateCheck(String taskId, Map<String, dynamic>? params) async {
|
||||
} else {
|
||||
// In install mode...
|
||||
// If you haven't explicitly been given updates to install, grab all available silent updates
|
||||
if (toInstall.isEmpty && !networkRestricted) {
|
||||
if (toInstall.isEmpty && !networkRestricted && !chargingRestricted) {
|
||||
var temp = appsProvider.findExistingUpdates(installedOnly: true);
|
||||
for (var i = 0; i < temp.length; i++) {
|
||||
if (await appsProvider
|
||||
|
@@ -349,6 +349,15 @@ class SettingsProvider with ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool get bgUpdatesWhileChargingOnly {
|
||||
return prefs?.getBool('bgUpdatesWhileChargingOnly') ?? false;
|
||||
}
|
||||
|
||||
set bgUpdatesWhileChargingOnly(bool val) {
|
||||
prefs?.setBool('bgUpdatesWhileChargingOnly', val);
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
DateTime get lastCompletedBGCheckTime {
|
||||
int? temp = prefs?.getInt('lastCompletedBGCheckTime');
|
||||
return temp != null
|
||||
|
76
pubspec.lock
76
pubspec.lock
@@ -5,10 +5,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: android_intent_plus
|
||||
sha256: "007703c1b2cac7ca98add3336b98cffa4baa11d5133cc463293dba9daa39cdf6"
|
||||
sha256: "38921ec22ebb3b9a7eb678792cf6fab0b6f458b61b9d327688573449c9b47db3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.1.0"
|
||||
version: "5.2.0"
|
||||
android_package_installer:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -107,6 +107,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.7"
|
||||
battery_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: battery_plus
|
||||
sha256: "4b6dc87ffa72f8d1e63ae17c8700ee374a462e521f0152e2c76cfff484610764"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.0"
|
||||
battery_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: battery_plus_platform_interface
|
||||
sha256: e8342c0f32de4b1dfd0223114b6785e48e579bfc398da9471c9179b907fa4910
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -159,10 +175,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: connectivity_plus
|
||||
sha256: "2056db5241f96cdc0126bd94459fc4cdc13876753768fc7a31c425e50a7177d0"
|
||||
sha256: "876849631b0c7dc20f8b471a2a03142841b482438e3b707955464f5ffca3e4c3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.5"
|
||||
version: "6.1.0"
|
||||
connectivity_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -183,10 +199,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: crypto
|
||||
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27
|
||||
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.5"
|
||||
version: "3.0.6"
|
||||
csslib:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -215,10 +231,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: device_info_plus
|
||||
sha256: db03b2d2a3fa466a4627709e1db58692c3f7f658e36a5942d342d86efedc4091
|
||||
sha256: c4af09051b4f0508f6c1dc0a5c085bf014d5c9a4a0678ce1799c2b4d716387a0
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.0.0"
|
||||
version: "11.1.0"
|
||||
device_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -287,18 +303,18 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: file_picker
|
||||
sha256: "167bb619cdddaa10ef2907609feb8a79c16dfa479d3afaf960f8e223f754bf12"
|
||||
sha256: aac85f20436608e01a6ffd1fdd4e746a7f33c93a2c83752e626bdfaea139b877
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.1.2"
|
||||
version: "8.1.3"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fixnum
|
||||
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
|
||||
sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.1.1"
|
||||
flex_color_picker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -523,10 +539,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image
|
||||
sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8"
|
||||
sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.2.0"
|
||||
version: "4.3.0"
|
||||
intl:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -699,10 +715,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: permission_handler_android
|
||||
sha256: "76e4ab092c1b240d31177bb64d2b0bea43f43d0e23541ec866151b9f7b2490fa"
|
||||
sha256: "71bbecfee799e65aff7c744761a57e817e73b738fedf62ab7afd5593da21f9f1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "12.0.12"
|
||||
version: "12.0.13"
|
||||
permission_handler_apple:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -747,10 +763,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: platform
|
||||
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
|
||||
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.5"
|
||||
version: "3.1.6"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -803,10 +819,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: share_plus
|
||||
sha256: fec12c3c39f01e4df1ec6ad92b6e85503c5ca64ffd6e28d18c9ffe53fcc4cb11
|
||||
sha256: "334fcdf0ef9c0df0e3b428faebcac9568f35c747d59831474b2fc56e156d244e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.3"
|
||||
version: "10.1.0"
|
||||
share_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1009,10 +1025,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.2"
|
||||
version: "1.4.0"
|
||||
upower:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: upower
|
||||
sha256: cf042403154751180affa1d15614db7fa50234bc2373cd21c3db666c38543ebf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.0"
|
||||
url_launcher:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -1073,10 +1097,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_windows
|
||||
sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185"
|
||||
sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
version: "3.1.3"
|
||||
uuid:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1145,10 +1169,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: e5c39a90447e7c81cfec14b041cdbd0d0916bd9ebbc7fe02ab69568be703b9bd
|
||||
sha256: "2735daae5150e8b1dfeb3eb0544b4d3af0061e9e82cef063adcd583bdae4306a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.6.0"
|
||||
version: "5.7.0"
|
||||
win32_registry:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.1.27+2284
|
||||
version: 1.1.28+2285
|
||||
|
||||
environment:
|
||||
sdk: '>=3.0.0 <4.0.0'
|
||||
@@ -81,6 +81,7 @@ dependencies:
|
||||
|
||||
markdown: any
|
||||
flutter_typeahead: ^5.2.0
|
||||
battery_plus: ^6.1.0
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
Reference in New Issue
Block a user