Simple-SMS-Messenger
Simple-SMS-Messenger copied to clipboard
Added custom notifications
Hi,
I've added an ability to set custom notifications for specific conversations:
- It's based on Android notification channels, so it's available for at least Android 8.0. For older Androids, the option is invisible.
- Channel ID is conversation's
threadId. This way it's easy to set proper notification channel sincethreadIdis always provided to places where notifications are created. - Channel name is either contact name or number. Name is provided only for public contacts. In case of private contacts, in system settings only number will be visible.
- It supports also group conversations. In case if conversation is between public and private contacts, channel name will respect the privacy setting.
- Closes #135 because now it will be possible to silence notifications from system notification options.
- When conversation is removed, custom notification channel is also removed to not leave any garbage behind (since it's not possible to remove them in system).
- It's possible to remove custom notification channel for conversation by unchecking the checkbox (not possible in some SMS messaging apps).
- I don't know if UI is proper for this case, but I'm open for any suggestions if it can be done better.
https://user-images.githubusercontent.com/85929121/151228416-6d23e159-67f6-44b1-b210-8f5fa6ea5d6a.mp4
Oh cmon, that top menu for Notifications looks really weird, we should change it like in the gallery -> Change cover image (Select photo / Use default)
I can change it, but (unlike changing a cover image in the gallery that shows its effect immediately) if we do it this way, the user won't know if he has custom notifications set or not.
well, not sure how to solve it now, but this UX is just really weird
I've checked how it works in other apps, and in general it's done in two ways:
- From conversation's top menu one can enter Contact Details, there are Notification Settings and there are settings for notifications (e.g. Signal has something like this).
- From conversation's top menu one can enter Options and there are Notifications which lead to channel settings (e.g. built-in SMS app has it like this). Worth noting: it's impossible to revert to default notifications.
So conversation's top menu is rather a natural place where this option should be. What I can think of is not using the popup and use submenu instead, like it is for cover image in Simple Gallery. I thought about something like this:
- We have Notifications position in a top menu that opens submenu.
- When user has default notifications, in submenu there is only one option: "Use custom" that creates new notification channel and brings to its settings.
- When user has custom notifications, in submenu there are two options: "Customize" (opens channel settings) and "Use default" (removes notification channel).
What do you think about it?
Im not sure, will have to take a look at it. I dont feel that great about this feature in general, not many people requested it at all.
If you'd find a way for a better UX, I can fix it; I will also try to find some way.
I also think that this feature would be useful for people - I'd use it myself. It's standard in other apps, and also it's not forced anyway, and it would be possible to easily turn it off (unlike standard SMS app). I think that many people would appreciate it.
I would really like this feature. It's incredibly useful and available in most SMS apps.
Now that Signal drops SMS messaging, I need this badly, just implement this already please!
there is now a "ConversationDetailsActivity" which shows some basic info, maybe thats where this could be moved?
@tibbi I've moved the setting to ConversationDetailsActivity. Now it looks like this:
I dont really like it, that bordered Customize Notifications doesnt fit there. Lets use some label and a value under it, like we have some items in the app settings like font size.
I've removed the button border. However, I don't understand what value do you mean, if it's just a button opening the system setting.
I added a new string "Notification sound", use that as the label and "Default" as the value, if not customized. Do it like "settings_font_size_holder" in the app settings.
Why display sound value if there are more options to be set, like disable notifications, vibration, silent etc.?
right ok, lets just make it work then, Ill think of some clearer UI
very excited about custom notifications per contact. happy to see that Simple SMS Messenger grows into more serious application and it's few steps before replacing my current SMS application.
I haven't checked this yet, but why can't we implement it similar to Google Messages? Just a full-width Notifications button that points to custom notification settings, instead of using a switch.
Even if a switch is necessary, the "Customize notifications" button should still be a full-width item like other options (e.g. Conversation name) in the interface.
I haven't checked this yet, but why can't we implement it similar to Google Messages? Just a full-width Notifications button that points to custom notification settings, instead of using a switch.
I've implemented the switch because it's the feature that I think is missing in built-in messengers - the ability to remove the custom notification. Currently, in stock SMS apps once I set custom notification there is no way to remove it. That's why there's a switch. It can be done differently if the UI is misleading, but I'd leave this feature since it may be useful also for others.
in some systems you cannot change anything in Customize Notifications device settings, thats the feedback I get in the calendar too. They can just enable or disable them, not change the audio, vibrations or anything.
@Aga-C is this going to be applied system wide with android option so tibbi can merge? if i understand correctly this is the show–stopper.
@alekksander It is system wide.
@Aga-C hm… then do You happen to know if there's something else stopping from pull? Pozdrawiam
@Aga-C hm… then do You happen to know if there's something else stopping from pull?
I've just resolved half a year of merge conflicts, so IMHO nothing stops from pulling, everything's up to @tibbi. I think it would be better to have it as it is and later refine this functionality, than not having it at all. Problems with custom and older OS versions can be resolved later, just let people customize their notifications.
and later refine this functionality
this might be an issue. perhaps @tibbi could suggest how to visualize this option before pulling. my two cents is that qksms has done it pretty nicely (submenu with wake–up screen toggle and option to select whether show only sender name or content in notification too). the proposed button (as seen on post from feb. 8th) is indeed a little improvised.
simple gallery pro has unfolding menu once given checkbox is selected (see Allow deep zooming images). analogically in simple sms it could reveal android custom notification entry once custom notification checkbox is selected. this way it's consistent along simple apps. @Aga-C do You think it's doable?
simple gallery pro has unfolding menu once given checkbox is selected (see Allow deep zooming images). analogically in simple sms it could reveal android custom notification entry once custom notification checkbox is selected. this way it's consistent along simple apps. @Aga-C do You think it's doable?
IMHO, conversation details are the best place for it. Earlier it was in the menu and I had to move it. As I understand, the whole problem here was that not every OS has all notification settings, and it was a show-stopper here, not where exactly the setting is. Still, I think it's better to add it like it is and refine it later, because, as we can see, for half a year there wasn't any idea for different UI.
IMHO, conversation details are the best place for it.
Yes ,totally agree. I was reffering to the look and structure of it, as the preview once attached here had some sort of box. Unfolded menus in gallery pro are not "boxed". Gut tells me tibbi won't accept until it looks like in his other apps.
what i mean:
https://github.com/SimpleMobileTools/Simple-SMS-Messenger/assets/3148302/ea6ef31d-c250-49e4-81ad-f08905874dc5
@alekksander I don't know what you mean with boxes, have you checked what's on the branch?
Yea, looks good. Sorry i was referring to previously posted preview.
"This branch has conflicts that must be resolved" appeared, but since there is no current reaction from dev, likely it doesn't matter.