I like to use a quiet, unobtrusive notification sound for texting, since conversations tend to include a lot of messages. However, this quiet notification isn't enough to get my attention if my phone is in my pocket. My solution is to have Tasker give me a short period of time after the text is received to turn the screen on. If the screen is not turned on, Tasker will make a louder noise and announce the name of the person texting to me.
For this I use two tasks. The first is a reusable task "Wait For Screen" which can be used in many situations.
- Return Value 1 [IF %SCREEN ~ on] [LABEL LOOP]
- Variable Subtract Name %par1 Value 1
- If %par1 > 0
- Wait Seconds 1
- Goto Action Label LOOP
- End If
- Return Value 0 Stop On
For this action, the parameter passed will be the number of seconds to wait (checking the screen once per second) and the return value will be 1 if the screen was turned on and 0 if not (though you can just check the screen in your action after the subtask finishes).
The profile which calls it uses the following conditions
- Received Text Any *,*
- Display State Off
- Variable Value %SILENT Doesn't Match on
And performs the following task
- Perform Task Name [Wait For Screen] Parameter 5
- If %SCREEN ~ off
- Play Ringtone Notification Sound (choose your preferred sound)
- Variable Split %SMSRN
- Say Text from %SMSRN1 (say the sender's first name)
- Else
- Load App Messagine
- End If
If the screen is turned on within 5 seconds, the messaging app is automatically started. If not, the extra notification sound is played and the sender's name is announced.