diff --git a/app/build.gradle b/app/build.gradle
index d988842d1..485ac0a7f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -16,8 +16,8 @@ android {
applicationId "com.geeksville.mesh"
minSdkVersion 22 // The oldest emulator image I have tried is 22 (though 21 probably works)
targetSdkVersion 29
- versionCode 136
- versionName "0.3.6"
+ versionCode 137
+ versionName "0.3.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
diff --git a/app/src/main/java/com/geeksville/mesh/MainActivity.kt b/app/src/main/java/com/geeksville/mesh/MainActivity.kt
index 1f5e96fcf..1876f3b14 100644
--- a/app/src/main/java/com/geeksville/mesh/MainActivity.kt
+++ b/app/src/main/java/com/geeksville/mesh/MainActivity.kt
@@ -216,6 +216,14 @@ class MainActivity : AppCompatActivity(), Logging,
grantResults: IntArray
) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
+
+ if (grantResults.contains(PackageManager.PERMISSION_DENIED)) {
+ Toast.makeText(
+ this,
+ getString(R.string.permission_missing),
+ Toast.LENGTH_LONG
+ ).show()
+ }
}
@@ -271,7 +279,7 @@ class MainActivity : AppCompatActivity(), Logging,
model.ownerName.value = prefs.getString("owner", "")!!
val isInTestLab = (application as GeeksvilleApplication).isInTestLab
-
+
// Ensures Bluetooth is available on the device and it is enabled. If not,
// displays a dialog requesting user permission to enable Bluetooth.
if (bluetoothAdapter != null && !isInTestLab) {
@@ -288,7 +296,7 @@ class MainActivity : AppCompatActivity(), Logging,
.show()
}
- if (isInTestLab)
+ if (!isInTestLab)
requestPermission() // permissions don't work there
/* not yet working
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index ab88e9f8d..04630e796 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -35,4 +35,5 @@
You have analytics disabled. Unfortunately our map provider (mapbox) requires analytics to be allowed for their \'free\' plan. So we have turned off the map view.\n\n
If you would like to see the map, you\'ll need to turn on analytics in the Settings pane (also, for the time being you might need to force restart the application).\n\n
If you are interested in us paying for mapbox (or switching to a different map provider), please post in our forum.
+ A required permission is missing, Meshtastic won\'t be able to work properly. Please enable in application settings.