Skip to content

Commit

Permalink
update to 0.9.1.8 (another possible crash fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
marq24 committed Sep 11, 2020
1 parent e72877c commit 93c9962
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DOWNLOAD.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion README_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion README_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
20 changes: 18 additions & 2 deletions app/src/main/java/com/emacberry/uuid0xfd6fscan/ScannerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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<ScanFilter> f = new ArrayList<>();
switch (mScanMode){
case "ENF_FRA":
Expand Down Expand Up @@ -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){
Expand Down Expand Up @@ -640,6 +655,7 @@ public void run(){
}

public int[] getBeaconCountByType() {
ensureScanModeSet();
switch (mScanMode){
default:
case "ENF":
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/de-DE/changelogs/918.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix wenn Einstellungen/Preferences nicht gelesen werden können
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/918.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix if Preferences could not be read and the scan-mode is null

0 comments on commit 93c9962

Please sign in to comment.