File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
android/src/main/java/com/dieam/reactnativepushnotification/modules Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ public RNPushNotificationConfig(Context context) {
31
31
32
32
public String getChannelName () {
33
33
try {
34
- return metadata .getString (KEY_CHANNEL_NAME );
34
+ final String name = metadata .getString (KEY_CHANNEL_NAME );
35
+ if (name != null && name .length () > 0 ) {
36
+ return name ;
37
+ }
35
38
} catch (Exception e ) {
36
39
Log .w (RNPushNotification .LOG_TAG , "Unable to find " + KEY_CHANNEL_NAME + " in manifest. Falling back to default" );
37
40
}
@@ -40,7 +43,10 @@ public String getChannelName() {
40
43
}
41
44
public String getChannelDescription () {
42
45
try {
43
- return metadata .getString (KEY_CHANNEL_DESCRIPTION );
46
+ final String description = metadata .getString (KEY_CHANNEL_DESCRIPTION );
47
+ if (description != null ) {
48
+ return description ;
49
+ }
44
50
} catch (Exception e ) {
45
51
Log .w (RNPushNotification .LOG_TAG , "Unable to find " + KEY_CHANNEL_DESCRIPTION + " in manifest. Falling back to default" );
46
52
}
You can’t perform that action at this time.
0 commit comments