Play ringer on SMS

42 views
Skip to first unread message

Ness Blackbird

unread,
Jun 4, 2022, 2:01:52 PMJun 4
to Tasker
When I get a text, my phone only plays the notification on the bluetooth speaker (I have an earpiece which is always connected, but not always in my ear). 

Shouldn't Tasker be able to play a sound when an SMS comes in?  
  1. Created task: Default Ringtone / Type: Ringer / Sound: yasmin aly. Name: "Text sound."
  2. Created profile: *Received Text Any -> Text sound.
When I receive a text, I hear my ordinary text notification in the bluetooth. My phone doesn't ring. 

What am I missing? Thanks for your help!

RSF

unread,
Jun 4, 2022, 11:51:24 PMJun 4
to Tasker
The "Default Ringtone" action sets the ringtone to be used when the phone rings, after the action runs.

You might want the "Play Ringtone" action, which plays a ringtone immediately. You can try different audio streams for that action, to try to play through the phone speaker vs. its Bluetooth connection; the "Alarm" channel works for that, for me.

There's also a "Play Music" action, for non-ringtone music files.

Ness Blackbird

unread,
Jun 5, 2022, 1:51:59 AMJun 5
to Tasker
That certainly sounds better, but it still does not work. I replaced "Default ringtone" with "Play ringtone". No change. 
I tried several variations that don't work either, including using Alarm instead of Ringer, using various sounds, and trying to play a notification.
I also tried triggering it from the *Notification profile event instead. No good. This because I read somewhere that Android no longer allows third-party apps to watch the SMS inbox.
Thanks for your help -- I don't know if it's possible?

Ness Blackbird

unread,
Jun 5, 2022, 2:00:33 AMJun 5
to Tasker
Wait, I'm making progress. It wasn't working because I hadn't left the app or something like that. When I closed it and received a text, it worked. It doesn't do nice things like stop playing when I pull down from the top of the display, but I guess beggars can't be choosers. Also, it only works with "Ringer" type notifications, which are mostly really long. But I guess I can move a shorter notification into Ringer storage? But how?

Anyway, making progress.

RSF

unread,
Jun 5, 2022, 9:55:20 AMJun 5
to Tasker
To add a ringtone/alarmtone/etc., scroll to the bottom of the list of options in Tasker; there should be an "Add xxx tone" link like so:
Screenshot_20220605-064822_2.png

You might also be able to just copy a music file into the Android folders "/Alarms", "/Ringtones", etc., but I'm not sure if Tasker would automatically recognize them.

Re: getting a ringtone to stop playing, I don't think there's a good way. You might try "Play Music" instead (playing it on the Ringer stream). "Play Music" has an option to stop playing what was previously started via that same action.

RSF

unread,
Jun 5, 2022, 9:59:55 AMJun 5
to Tasker
[Edit:] To stop playing music started by the "Music Play" action, there's a separate action: "Music Stop". It's not an option of the "Music Play" action.
You could also try the "Beep" action; there you can control how long it beeps for ... 

Ness Blackbird

unread,
Jun 7, 2022, 2:23:13 PMJun 7
to Tasker
Well, it can't be interrupted by pulling down the top menu, but I can live with that, I've hooked up a short notification tone. The problem now is that it's overriding my silence settings from Silence Premium -- which is a great program. Like it has a nice icon I've put on my main screen that I can click to add 30 minutes of silence. I can set the profile to not operate during the night, but I don't suppose there's any way for it to know that I've told Silence to turn off the ringer for half an hour. Oh well.

RSF

unread,
Jun 7, 2022, 7:21:18 PMJun 7
to Tasker
Maybe there's a way to configure Silence Premium to silence whatever stream you've selected for the notification tone, or conversely change the Tasker action to use a stream like Notification, which Silence Premium already silences? Generally those do-not-disturb schemes leave the alarm stream alone, since people want to have their alarm go off in the morning even if in general they don't want the phone to ring, etc.

Failing that, there might be two ways for Tasker to detect that Silence Premium has a do-not-disturb state activated:
  1. If Silence Premium posts an Android notification when it silences the phone, Tasker could detect that, and avoid playing your notification; or
  2. Tasker could look at the current notification (or ringer) volume setting, and if it's 0, avoid playing your notification (I assume Silence Premium effects the do-not-disturb state by changing Android's volume level(s) to 0)

e6p76...@snkmail.com

unread,
Jun 19, 2022, 4:03:07 PM (5 days ago) Jun 19
to Tasker
Pardon me for jumping in. This thread caught my eye because I have a Project that already incorporates parts of this.
My application is common - my wife or I will set down our phone somewhere in the house and then we can't find it. "Call the phone and listen for the ring!" That doesn't help when the phone is on DND, silent, or vibrate.
So my Project monitors SMS for inbound texts from specific numbers, hers or mine, and that begin with an exclamation. On receipt of a command like !hey, the tasks disable DND if it's on, set all volume levels to high, and then Beep tasks loop with a brief but annoying pattern. This also returns back to me an SMS that confirms the phone's previous and new volume settings, so that I know if it actually made changes. I'm going to add %BATTERY in the return message, as well as the current location ... in case we can't hear the phone even with the volume up because it's outside somewhere.

It seems the OP here wants to do something similar, but adding tasks to:
1) disable bluetooth, or perhaps to play through speaker when a headset is plugged in.
2) play a ringtone or audio media with a pre-defined pattern ... not my Beeps.

I might be wrong, but I'm thinking the Silence app is simply toggling the phone's DND just like we can with Tasker. So you should be able to add that into your own Project.
In summary, I think the tools are here to meet this challenge. I dunno about stopping/continuing current audio or otherwise overriding settings from another app. That might require Intents.
I hope some of this is helpful as a confirmation that yeah, you can do that.

I'd publish my Project but I can't at the moment because I have too many hard-coded details in the actions. But I plan to publish after I abstract that stuff outside of the Project, and add actions that read in the data for the current device.

HTH

Reply all
Reply to author
Forward
0 new messages