diff --git a/clients/android/.idea/gradle.xml b/clients/android/.idea/gradle.xml
index 2b0e6ba..6fa7204 100644
--- a/clients/android/.idea/gradle.xml
+++ b/clients/android/.idea/gradle.xml
@@ -5,16 +5,16 @@
diff --git a/clients/android/.idea/misc.xml b/clients/android/.idea/misc.xml
index 37a7509..6199cc2 100644
--- a/clients/android/.idea/misc.xml
+++ b/clients/android/.idea/misc.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/clients/android/.idea/modules.xml b/clients/android/.idea/modules.xml
deleted file mode 100644
index d39a0fc..0000000
--- a/clients/android/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/clients/android/.idea/runConfigurations.xml b/clients/android/.idea/runConfigurations.xml
deleted file mode 100644
index 7f68460..0000000
--- a/clients/android/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/clients/android/app/build.gradle b/clients/android/app/build.gradle
index 4dbcc71..0db8124 100644
--- a/clients/android/app/build.gradle
+++ b/clients/android/app/build.gradle
@@ -1,14 +1,13 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion 29
- buildToolsVersion '29.0.2'
+ compileSdkVersion 33
defaultConfig {
applicationId "com.stuffaboutcode.bluedot"
minSdkVersion 14
- targetSdkVersion 29
- versionCode 8
- versionName "2.1.0"
+ targetSdkVersion 33
+ versionCode 10
+ versionName "2.2.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -21,11 +20,21 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.preference:preference:1.1.0-alpha05'
+ implementation 'androidx.preference:preference:1.2.0'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
- implementation 'androidx.appcompat:appcompat:1.0.0'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+ implementation 'androidx.appcompat:appcompat:1.5.1'
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.12'
}
+
+configurations {
+
+ all {
+
+ exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
+
+ }
+
+}
\ No newline at end of file
diff --git a/clients/android/app/release/app-release.aab b/clients/android/app/release/app-release.aab
index bb0363b..0dda386 100644
Binary files a/clients/android/app/release/app-release.aab and b/clients/android/app/release/app-release.aab differ
diff --git a/clients/android/app/release/app-release.apk b/clients/android/app/release/app-release.apk
index 9dea6a5..e1e74e7 100644
Binary files a/clients/android/app/release/app-release.apk and b/clients/android/app/release/app-release.apk differ
diff --git a/clients/android/app/release/output-metadata.json b/clients/android/app/release/output-metadata.json
new file mode 100644
index 0000000..592ce0f
--- /dev/null
+++ b/clients/android/app/release/output-metadata.json
@@ -0,0 +1,20 @@
+{
+ "version": 3,
+ "artifactType": {
+ "type": "APK",
+ "kind": "Directory"
+ },
+ "applicationId": "com.stuffaboutcode.bluedot",
+ "variantName": "release",
+ "elements": [
+ {
+ "type": "SINGLE",
+ "filters": [],
+ "attributes": [],
+ "versionCode": 10,
+ "versionName": "2.2.1",
+ "outputFile": "app-release.apk"
+ }
+ ],
+ "elementType": "File"
+}
\ No newline at end of file
diff --git a/clients/android/app/release/output.json b/clients/android/app/release/output.json
deleted file mode 100644
index 3640b0f..0000000
--- a/clients/android/app/release/output.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":8,"versionName":"2.1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
diff --git a/clients/android/app/src/main/AndroidManifest.xml b/clients/android/app/src/main/AndroidManifest.xml
index f3d9d26..6967196 100644
--- a/clients/android/app/src/main/AndroidManifest.xml
+++ b/clients/android/app/src/main/AndroidManifest.xml
@@ -2,8 +2,12 @@
-
-
+ />
+ />
+
+
@@ -21,6 +26,7 @@
android:value="com.stuffaboutcode.bluedot.Devices" />
diff --git a/clients/android/app/src/main/java/com/stuffaboutcode/bluedot/Devices.java b/clients/android/app/src/main/java/com/stuffaboutcode/bluedot/Devices.java
index d27722c..12d4be6 100644
--- a/clients/android/app/src/main/java/com/stuffaboutcode/bluedot/Devices.java
+++ b/clients/android/app/src/main/java/com/stuffaboutcode/bluedot/Devices.java
@@ -1,6 +1,8 @@
package com.stuffaboutcode.bluedot;
import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.pm.PackageManager;
import android.os.Bundle;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
@@ -16,8 +18,11 @@
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
+
+import androidx.core.app.ActivityCompat;
import androidx.preference.PreferenceManager;
import android.content.SharedPreferences;
+import android.Manifest;
import java.util.Set;
import java.util.ArrayList;
@@ -34,6 +39,24 @@ public class Devices
public static String EXTRA_ADDRESS = "device_address";
public static String EXTRA_NAME = "device_name";
+ private static String[] PERMISSIONS = {
+ Manifest.permission.BLUETOOTH_SCAN,
+ Manifest.permission.BLUETOOTH_CONNECT,
+
+ };
+
+ private void checkPermissions(){
+ int permission = ActivityCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH_CONNECT);
+ if (permission != PackageManager.PERMISSION_GRANTED) {
+ // We don't have permission so prompt the user
+ ActivityCompat.requestPermissions(
+ this,
+ PERMISSIONS,
+ 1
+ );
+ }
+ }
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -41,6 +64,8 @@ protected void onCreate(Bundle savedInstanceState) {
devicelist = (ListView)findViewById(R.id.listView);
+ checkPermissions();
+
//if the device has bluetooth
myBluetooth = BluetoothAdapter.getDefaultAdapter();
diff --git a/clients/android/build.gradle b/clients/android/build.gradle
index 36f158f..bb953ea 100644
--- a/clients/android/build.gradle
+++ b/clients/android/build.gradle
@@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.5.1'
+ classpath 'com.android.tools.build:gradle:7.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
diff --git a/clients/android/gradle/wrapper/gradle-wrapper.properties b/clients/android/gradle/wrapper/gradle-wrapper.properties
index fef2893..905d1b6 100644
--- a/clients/android/gradle/wrapper/gradle-wrapper.properties
+++ b/clients/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Fri Dec 27 12:07:06 GMT 2019
+#Fri Dec 23 09:57:24 GMT 2022
distributionBase=GRADLE_USER_HOME
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
+zipStoreBase=GRADLE_USER_HOME
diff --git a/docs/changelog.rst b/docs/changelog.rst
index 54369d8..8c5dd93 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -171,6 +171,16 @@ Alpha - initial testing
Android app
-----------
+10 (2.2.1) - 2022-01-03
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+ * Android 12+ fixes
+
+9 (2.2) - 2022-12-23
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+ * Android SDK and API version uplift (due to google play store minimum requirements change)
+
8 (2.1) - 2020-12-28
~~~~~~~~~~~~~~~~~~~~~~~~