diff --git a/app/build.gradle b/app/build.gradle --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,8 @@ minSdkVersion 21 targetSdkVersion 34 buildToolsVersion = '34.0.0' - versionCode 58 - versionName "2.2.1" + versionCode 59 + versionName "2.2.2" vectorDrawables.useSupportLibrary = true multiDexEnabled true javaCompileOptions { @@ -105,8 +105,7 @@ implementation 'com.google.protobuf:protobuf-java:3.19.6' // mqtt library implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5' - implementation 'com.github.hannesa2:paho.mqtt.android:4.2.4' - //implementation 'com.github.fabmazz:paho.mqtt.android:v0.0.1' + implementation 'com.github.fabmazz:paho.mqtt.android:v1.0.0' // ViewModel implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,7 +11,8 @@ + android:name="android.permission.POST_NOTIFICATIONS"/> + + \ No newline at end of file diff --git a/app/src/main/java/it/reyboz/bustorino/backend/mato/MQTTMatoClient.kt b/app/src/main/java/it/reyboz/bustorino/backend/mato/MQTTMatoClient.kt --- a/app/src/main/java/it/reyboz/bustorino/backend/mato/MQTTMatoClient.kt +++ b/app/src/main/java/it/reyboz/bustorino/backend/mato/MQTTMatoClient.kt @@ -50,13 +50,13 @@ // (and the positions need to be downloaded only when the app is shown) // update, 2024-04: Google Play doesn't understand our needs, so we put back the notification // and add a video of it working as Google wants - if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){ + /*if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){ //we need a notification Notifications.createLivePositionsChannel(context) val notific = Notifications.makeMQTTServiceNotification(context) client!!.setForegroundService(notific) notification=notific - } + }*/ val options = MqttConnectOptions()