Vibrate then Ring tasker profile

114 views
Skip to first unread message

BJW

unread,
Aug 22, 2016, 11:35:17 PM8/22/16
to Tasker
Many years ago I had a phone that had a ringer mode which would vibrate for a while before ringing, so as not to be disturbing if it was already in my pocket.  I created a tasker profile and task to accomplish this.  Since it turned out to be non-trivial and non-intuitive, I decided I'd post it.

Profile: Vibrate then Ring (6)
Event: Phone Ringing [ Caller:* ]
Enter: Vibe then Ring (7)
Abort Existing Task
A1: Ringer Volume [ Level:0 Display:Off Sound:Off ]
A2: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
A3: Ringer Volume [ Level:4 Display:Off Sound:Off ]
A4: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
A5: Play Ringtone [ Type:Ringer Sound:Atria Stream:2 ]
A6: Wait [ MS:0 Seconds:20 Minutes:0 Hours:0 Days:0 ]
A7: Ringer Volume [ Level:4 Display:Off Sound:Off ]

Notes:
This waits 4 seconds of vibration before starting a ring.
The selected ringtone will only play once, so select a ringtone that plays long enough.
The ringtone will stop playing if the caller hangs up (need to select 'Ringer' type and Stream as shown).
After the ring, the sound went back off (don't know why), so the last wait and volume set will restore the normal volume.
The volume settings didn't seem to work without waits in between them.

shykitten55

unread,
Aug 23, 2016, 5:51:39 PM8/23/16
to Tasker
Yes, that is/was a nice thing to have on some of the early phones.

I don't understand (quite) how to read that, but I am guessing the A(x) lines are the "Vibrate then Ring (7)" function.

Couple of thoughts - and don't take this as me having a go at you, you are probably better than me at Tasker - to "improve" the functionality:
Most phones (of the ilk which support Tasker) probably can do these things, so including them or changing how your program is, may help.
Turn the ring volume to ZERO - as you have done.
Enable vibration - just to be sure.
Detect incoming call.
(Phone vibrates but doesn't ring.)
Delay 'n' seconds (as preferred by user).
Turn up volume to 'x' level (again, as preferred by user).

This has problems in that to adjust the ring volume, you have to edit the program.

Another way of doing it is this way:
(Phone is idle.)
Enable vibration.
If phone is (RINGING)
Turn OFF ring volume/Set it to ZERO
(Yes, there may be a short sound played......   Nothing is perfect.)
Delay 'n' seconds (yes, I know, this still needs to be edited.  See above.)
EXIT the "turn off ring tone" part and this restores the volume to the "previous" level.
(That would be what ever the user sets via the usual preferences.)

As I said, I am not expert but I am sure someone who knows their way around Tasker could probably do one of those ways.
You are free to use either.   I am not laying claim to them.  They are only suggestions on alternate ways of doing it, which I can't do.

Good luck and thanks for sharing.

BJW

unread,
Aug 25, 2016, 12:49:03 AM8/25/16
to Tasker
@shykitten55, the A(x) text is how tasker exports profiles as text.  I like your idea of not hardcoding the ringer volume but I think it would be a problem if you actually tried it, especially with newer android versions.

After further testing, the original task did not work every time, it seems to have problems in the lock screen.  I figured out the crux of the problem is to convince android it is supposed to play something for the ringer, and I do that now by very briefly having the sound on.  I also added an 'if' statement to make sure it didn't make noise when the ringer was off, and a louder ring after 5 seconds of quiet ring.  The revised profile is below, and I've also attached the profile xml file you can import into tasker by long pressing the 'Profiles' tab -> Import.


Profile: Vibrate then Ring (6)
Event: Phone Ringing [ Caller:* ]
Enter: Vibe then Ring (7)
Abort Existing Task
A1: If [ %SILENT ~ off ]
A2: Ringer Volume [ Level:1 Display:Off Sound:Off ]
A3: Wait [ MS:500 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A4: Ringer Volume [ Level:0 Display:Off Sound:Off ]
A5: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A6: Ringer Volume [ Level:3 Display:Off Sound:Off ]
A7: Wait [ MS:0 Seconds:6 Minutes:0 Hours:0 Days:0 ]
A8: Ringer Volume [ Level:6 Display:Off Sound:Off ]
A9: End If


Vibrate_then_Ring.prf.xml
Reply all
Reply to author
Forward
0 new messages