diff --git a/DOWNLOAD.md b/DOWNLOAD.md index c866bd9..1cc248b 100644 --- a/DOWNLOAD.md +++ b/DOWNLOAD.md @@ -1,4 +1,4 @@ ## Download APK Please download the APK here from GitHub: -[Download current UUID0xFD6FTracer.apk](https://github.com/marq24/UUID0xFD6FTracer/releases/tag/0.9.1.7) +[Download current UUID0xFD6FTracer.apk](https://github.com/marq24/UUID0xFD6FTracer/releases/tag/0.9.1.8) diff --git a/README_de.md b/README_de.md index c1540a8..8b69736 100644 --- a/README_de.md +++ b/README_de.md @@ -21,7 +21,7 @@ https://f-droid.org/app/com.emacberry.uuid0xfd6fscan https://www.amazon.de/gp/product/B08CY7JY1P #### Installation auch als Sideload möglich (erfordert 'Installation von unsicheren Quellen zulassen') -[Download des aktuellen UUID0xFD6FTracer.apk direkt hier von GitHub](https://github.com/marq24/UUID0xFD6FTracer/releases/download/0.9.1.7/UUID0xFD6F_v0.9.1.7.apk) +[Download des aktuellen UUID0xFD6FTracer.apk direkt hier von GitHub](https://github.com/marq24/UUID0xFD6FTracer/releases/download/0.9.1.8/UUID0xFD6F_v0.9.1.8.apk) ##### Kein Download via GooglePlay? Google hat ein zweites Mal entschieden die App aus dem Store zu entfernen, diesmal mit dem Hinweis darauf, dass der App diff --git a/README_en.md b/README_en.md index a41baed..13fc70d 100644 --- a/README_en.md +++ b/README_en.md @@ -18,7 +18,7 @@ https://f-droid.org/app/com.emacberry.uuid0xfd6fscan https://www.amazon.com/gp/product/B08CY7JY1P ### Sideload the APK (requires 'allow insecure apps' setting) -[Download Latest from UUID0xFD6FTracer.apk](https://github.com/marq24/UUID0xFD6FTracer/releases/download/0.9.1.7/UUID0xFD6F_v0.9.1.7.apk) +[Download Latest from UUID0xFD6FTracer.apk](https://github.com/marq24/UUID0xFD6FTracer/releases/download/0.9.1.8/UUID0xFD6F_v0.9.1.8.apk) ## Settings & Configuration Additional information about the settings and options can be found on the separate [SETTINGS.md](./SETTINGS.md). diff --git a/README_fr.md b/README_fr.md index f9783bf..d0e42ff 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ https://f-droid.org/app/com.emacberry.uuid0xfd6fscan https://www.amazon.com/gp/product/B08CY7JY1P ### Charger le fichier APK (nécessite le paramètre "Autoriser les applications non sécurisées") -[Télécharger la dernière à partir de UUID0xFD6FTracer.apk](https://github.com/marq24/UUID0xFD6FTracer/releases/download/0.9.1.7/UUID0xFD6F_v0.9.1.7.apk) +[Télécharger la dernière à partir de UUID0xFD6FTracer.apk](https://github.com/marq24/UUID0xFD6FTracer/releases/download/0.9.1.8/UUID0xFD6F_v0.9.1.8.apk) --- #### Cette application ne sera pas disponible via le PlayStore de Google diff --git a/app/build.gradle b/app/build.gradle index cddf479..5e27d72 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.emacberry.uuid0xfd6fscan" minSdkVersion 23 targetSdkVersion 29 - versionCode 917 - versionName "0.9.1.7" + versionCode 918 + versionName "0.9.1.8" //testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/com/emacberry/uuid0xfd6fscan/ScannerService.java b/app/src/main/java/com/emacberry/uuid0xfd6fscan/ScannerService.java index fb733c8..79fc572 100644 --- a/app/src/main/java/com/emacberry/uuid0xfd6fscan/ScannerService.java +++ b/app/src/main/java/com/emacberry/uuid0xfd6fscan/ScannerService.java @@ -70,7 +70,7 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin //Log.d(LOG_TAG, "onSharedPreferenceChanged "+key); if(key.equals(getString(R.string.PKEY_SCANMODE))){ String newScanMode = sharedPreferences.getString(getString(R.string.PKEY_SCANMODE), null); - if(!mScanMode.equals(newScanMode)){ + if(mScanMode== null || !mScanMode.equals(newScanMode)){ mScanMode = newScanMode; restartScan(); } @@ -307,7 +307,7 @@ public void startScan(boolean viaGui) { if(checkScanPermissions()) { if (mBluetoothLeScanner != null && mBluetoothAdapter != null && mBluetoothAdapter.isEnabled() && !mScannIsRunning) { Log.d(LOG_TAG, "mBluetoothLeScanner.startScan() called"); - + ensureScanModeSet(); ArrayList f = new ArrayList<>(); switch (mScanMode){ case "ENF_FRA": @@ -345,6 +345,21 @@ public void startScan(boolean viaGui) { } } + private void ensureScanModeSet() { + // for what ever reason the init of the Prefs was not successful?! + if(mScanMode == null){ + try { + mScanMode = Preferences.getInstance(getBaseContext()).getString(R.string.PKEY_SCANMODE, R.string.DVAL_SCANMODE); + }catch(Throwable t){ + Log.d(LOG_TAG, ""+t.getMessage()); + } finally { + if(mScanMode == null){ + mScanMode = "ENF"; + } + } + } + } + private AppOpsManager mAppOps; private boolean checkScanPermissions() { if(mAppOps==null){ @@ -640,6 +655,7 @@ public void run(){ } public int[] getBeaconCountByType() { + ensureScanModeSet(); switch (mScanMode){ default: case "ENF": diff --git a/fastlane/metadata/android/de-DE/changelogs/918.txt b/fastlane/metadata/android/de-DE/changelogs/918.txt new file mode 100644 index 0000000..355c327 --- /dev/null +++ b/fastlane/metadata/android/de-DE/changelogs/918.txt @@ -0,0 +1 @@ +Fix wenn Einstellungen/Preferences nicht gelesen werden können \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/918.txt b/fastlane/metadata/android/en-US/changelogs/918.txt new file mode 100644 index 0000000..04467dc --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/918.txt @@ -0,0 +1 @@ +Fix if Preferences could not be read and the scan-mode is null \ No newline at end of file