Skip to content

Commit 184c596

Browse files
committed
Improvements and bug fixes:
- Added fix for alert type notification description text for node with multi device case. - Added fix for device name issue for matter device. - Added fix for ocpp device crash. - Other minor improvements.
1 parent 41f19d6 commit 184c596

30 files changed

+855
-844
lines changed

app/build.gradle

+2-3
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ android {
7070
applicationId "com.espressif.rainmaker"
7171
minSdkVersion 27
7272
targetSdkVersion 35
73-
versionCode 143
74-
versionName "3.5.3 - ${getGitHash()}"
73+
versionCode 145
74+
versionName "3.5.4 - ${getGitHash()}"
7575
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
7676

7777
buildConfigField "String", "GitHash", "\"${getGitHash()}\""
@@ -298,7 +298,6 @@ dependencies {
298298
implementation libs.eventbus
299299
implementation libs.jnanoid
300300
implementation libs.jwtdecode
301-
implementation libs.commons.codec
302301

303302
//crypto
304303
implementation libs.bcpkix.jdk15to18

app/src/main/AndroidManifest.xml

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools">
44

5+
<uses-feature
6+
android:name="android.hardware.camera"
7+
android:required="false" />
8+
59
<uses-permission android:name="android.permission.CAMERA" />
610
<uses-permission android:name="android.permission.VIBRATE" />
711
<uses-permission android:name="android.permission.INTERNET" />

app/src/main/java/com/espressif/AppConstants.kt

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class AppConstants {
102102
const val PARAM_TYPE_SPEED = "esp.param.speed"
103103

104104
// Param names
105+
const val PARAM_NAME = "Name"
105106
const val PARAM_POWER = "Power"
106107
const val PARAM_BRIGHTNESS = "Brightness"
107108
const val PARAM_HUE = "Hue"

app/src/main/java/com/espressif/EspApplication.java

+28-31
Original file line numberDiff line numberDiff line change
@@ -1201,46 +1201,43 @@ public void onNetworkFailure(Exception exception) {
12011201
};
12021202

12031203
private void setupNotificationChannels() {
1204-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
1204+
NotificationChannel nodeConnectedChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_ONLINE_ID,
1205+
getString(R.string.channel_node_connected), NotificationManager.IMPORTANCE_HIGH);
12051206

1206-
NotificationChannel nodeConnectedChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_ONLINE_ID,
1207-
getString(R.string.channel_node_connected), NotificationManager.IMPORTANCE_HIGH);
1207+
NotificationChannel nodeDisconnectedChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_OFFLINE_ID,
1208+
getString(R.string.channel_node_disconnected), NotificationManager.IMPORTANCE_HIGH);
12081209

1209-
NotificationChannel nodeDisconnectedChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_OFFLINE_ID,
1210-
getString(R.string.channel_node_disconnected), NotificationManager.IMPORTANCE_HIGH);
1210+
NotificationChannel nodeAddedChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_ADDED,
1211+
getString(R.string.channel_node_added), NotificationManager.IMPORTANCE_HIGH);
12111212

1212-
NotificationChannel nodeAddedChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_ADDED,
1213-
getString(R.string.channel_node_added), NotificationManager.IMPORTANCE_HIGH);
1213+
NotificationChannel nodeRemovedChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_REMOVED,
1214+
getString(R.string.channel_node_removed), NotificationManager.IMPORTANCE_HIGH);
12141215

1215-
NotificationChannel nodeRemovedChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_REMOVED,
1216-
getString(R.string.channel_node_removed), NotificationManager.IMPORTANCE_HIGH);
1216+
NotificationChannel nodeSharingChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_SHARING,
1217+
getString(R.string.channel_node_sharing), NotificationManager.IMPORTANCE_HIGH);
12171218

1218-
NotificationChannel nodeSharingChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_SHARING,
1219-
getString(R.string.channel_node_sharing), NotificationManager.IMPORTANCE_HIGH);
1219+
NotificationChannel alertChannel = new NotificationChannel(AppConstants.CHANNEL_ALERT,
1220+
getString(R.string.channel_node_alert), NotificationManager.IMPORTANCE_HIGH);
12201221

1221-
NotificationChannel alertChannel = new NotificationChannel(AppConstants.CHANNEL_ALERT,
1222-
getString(R.string.channel_node_alert), NotificationManager.IMPORTANCE_HIGH);
1222+
NotificationChannel automationChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_AUTOMATION_TRIGGER,
1223+
getString(R.string.channel_node_automation_trigger), NotificationManager.IMPORTANCE_HIGH);
12231224

1224-
NotificationChannel automationChannel = new NotificationChannel(AppConstants.CHANNEL_NODE_AUTOMATION_TRIGGER,
1225-
getString(R.string.channel_node_automation_trigger), NotificationManager.IMPORTANCE_HIGH);
1225+
NotificationChannel groupSharingChannel = new NotificationChannel(AppConstants.CHANNEL_GROUP_SHARING,
1226+
getString(R.string.channel_node_group_sharing), NotificationManager.IMPORTANCE_HIGH);
12261227

1227-
NotificationChannel groupSharingChannel = new NotificationChannel(AppConstants.CHANNEL_GROUP_SHARING,
1228-
getString(R.string.channel_node_group_sharing), NotificationManager.IMPORTANCE_HIGH);
1228+
NotificationChannel adminChannel = new NotificationChannel(AppConstants.CHANNEL_ADMIN,
1229+
getString(R.string.channel_admin), NotificationManager.IMPORTANCE_HIGH);
12291230

1230-
NotificationChannel adminChannel = new NotificationChannel(AppConstants.CHANNEL_ADMIN,
1231-
getString(R.string.channel_admin), NotificationManager.IMPORTANCE_HIGH);
1232-
1233-
NotificationManager notificationManager = getSystemService(NotificationManager.class);
1234-
notificationManager.createNotificationChannel(nodeConnectedChannel);
1235-
notificationManager.createNotificationChannel(nodeDisconnectedChannel);
1236-
notificationManager.createNotificationChannel(nodeAddedChannel);
1237-
notificationManager.createNotificationChannel(nodeRemovedChannel);
1238-
notificationManager.createNotificationChannel(nodeSharingChannel);
1239-
notificationManager.createNotificationChannel(alertChannel);
1240-
notificationManager.createNotificationChannel(automationChannel);
1241-
notificationManager.createNotificationChannel(groupSharingChannel);
1242-
notificationManager.createNotificationChannel(adminChannel);
1243-
}
1231+
NotificationManager notificationManager = getSystemService(NotificationManager.class);
1232+
notificationManager.createNotificationChannel(nodeConnectedChannel);
1233+
notificationManager.createNotificationChannel(nodeDisconnectedChannel);
1234+
notificationManager.createNotificationChannel(nodeAddedChannel);
1235+
notificationManager.createNotificationChannel(nodeRemovedChannel);
1236+
notificationManager.createNotificationChannel(nodeSharingChannel);
1237+
notificationManager.createNotificationChannel(alertChannel);
1238+
notificationManager.createNotificationChannel(automationChannel);
1239+
notificationManager.createNotificationChannel(groupSharingChannel);
1240+
notificationManager.createNotificationChannel(adminChannel);
12441241
}
12451242

12461243
public void removeNodeInformation(String nodeId) {

0 commit comments

Comments
 (0)