-
Notifications
You must be signed in to change notification settings - Fork 424
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
[android] Change request: Don't recreate TSLocationManager channel if exists #808
Comments
I can do that |
That would be great. Thank you very much. |
Show me the Config you’re using with your channel. |
Oh, I don't have that code handy anymore. I deleted it since it wasn't working due to the plugin overwriting it. But I wanted to give the channel a different name. Maybe also add a description? |
As in ... all I was doing was create a channel object with our desired configuration, and then calling createNotificationChannel(). The code was called from the main activity's onCreate() function so it was being called at every app startup. |
See the docs for Config.notification, as well as the interface Notification. You can configure the name. |
How about this ... I'll reconstruct my code and then post it to you. Then you can reproduce what I saw. But gimme a day or two to get around to it. |
I’m not surprised the plugin would override your channel. I’m just interested in the specific channel options You were interested in, there are many. If you’re only concerned with the name, you can easily configure that with the plugin’s Notification config. |
Oh, I didn't even see the Since that exists, it makes sense to use/extend it rather than have a separate thing. I'd like to configure the channel name and importance. (Maybe channel description in the future, but it's in the future so I don't want to make a fuss about it now.) The name can be configured via Re: The channel importance ... I think you're setting it to IMPORTANCE_LOW? I'd like to configure it to IMPORTANCE_MIN. Ideas:
|
Show me the docs links that prove |
It's not a proof. It's just a shortcut instead of creating a map/table lookup. https://developer.android.com/reference/androidx/core/app/NotificationCompat.html#PRIORITY_DEFAULT PRIORITY_MIN = -2 https://developer.android.com/reference/android/app/NotificationManager.html#IMPORTANCE_DEFAULT IMPORTANCE_MIN = 1 If you don't want to use '+3', I'm fine with that. |
My existing So it'll be I'll re-use the existing |
This is a wishlist request, so no rush. It will happen when it happens.
Huh? I don't really understand this. You want me to submit a documentation PR? |
Yes. Here's |
And also use |
See #818 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open. |
Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you. |
Your Environment
react-native -v
): 0.59.2Context
On Android 8.0+, our app has an Android notification channel named TSLocationManager. This channel is created by the plugin.
We'd like to be able to rename/configure this channel.
I added code to Android's mainActivity.onCreate() to create a notification channel with the same id (and our desired configuration) and this successfully configured the channel.
However, a few app starts later, it had changed back to the name/configuration that the plugin sets.
I presume the plugin is repeatedly
notificationManager.createNotificationChannel()
-ing it?.I'd like to request the following change please:
Instead of recreating the channel unconditionally, please change the plugin to check whether the channel exists. If it exists, don't recreate it.
The text was updated successfully, but these errors were encountered: