Skip to content

Update channel name and description #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class OSFirebaseCloudMessaging : CordovaImplementation() {
private var notificationPermission = OSNotificationPermissions()

companion object {
private const val CHANNEL_NAME_KEY = "notification_channel_name"
private const val CHANNEL_DESCRIPTION_KEY = "notification_channel_description"
private const val CHANNEL_NAME_KEY = "default_notification_channel_name"
private const val CHANNEL_DESCRIPTION_KEY = "default_notification_channel_description"
private const val ERROR_FORMAT_PREFIX = "OS-PLUG-FCMS-"
private const val NOTIFICATION_PERMISSION_REQUEST_CODE = 123123
private const val NOTIFICATION_PERMISSION_SEND_LOCAL_REQUEST_CODE = 987987
Expand Down Expand Up @@ -213,8 +213,8 @@ class OSFirebaseCloudMessaging : CordovaImplementation() {
}

private fun setupChannelNameAndDescription(){
val channelName = getActivity().getString(getStringResourceId("notification_channel_name"))
val channelDescription = getActivity().getString(getStringResourceId("notification_channel_description"))
val channelName = getActivity().getString(getStringResourceId("default_notification_channel_name"))
val channelDescription = getActivity().getString(getStringResourceId("default_notification_channel_description"))

if(!channelName.isNullOrEmpty()){
val editorName = getActivity().getSharedPreferences(CHANNEL_NAME_KEY, Context.MODE_PRIVATE).edit()
Expand All @@ -236,4 +236,4 @@ class OSFirebaseCloudMessaging : CordovaImplementation() {
return ERROR_FORMAT_PREFIX + code.toString().padStart(4, '0')
}

}
}