Sound full volume alarm on receiving SMS

Rating: No reviews yet
Downloads: 95
Change Set: 20099
Released: Jul 8, 2012
Updated: Jul 8, 2012 by gauravnandwani
Dev status: Beta Help Icon

Recommended Download

Source Code LoudAlarmOnSMS.js
source code, 4K, uploaded Jul 8, 2012 - 73 downloads

Other Available Downloads

Source Code LoudAlarmOnSMS-SetOn{x}.js
source code, 3K, uploaded Jul 8, 2012 - 22 downloads

Release Notes

Sound alarm on full volume on receiving specific SMS - Updated to use On{X} new API

Formerly this used used SetOn{x}

This rule monitors for incoming SMS from particular number(s) and checks for defined text (case-insensitive). On receiving desired SMS the script increases the device music volume to 100% (or a defined value). Then it plays the defined alarm (audio) file using the default audio player.
If the media volume is changed then it notifies the user and gives option to rollback to previous media volume. (This rollback option was not available with SetOn{X}).

Usage:

Change following variables as needed:
  • phoneNumbers - Array of phone numbers which can trigger the alarm.
    • Note: I used array insted of a single number as I was getting input number different format from different SMS applications. E.g. I was getting my number with country code starting with '+' or sometimes without country code & startingwith '0'.
    • So keeping this in mind, you'd want to put the trigger phone number in all possible formats you expect or change the phone number condition such that it matches the phone number(s) you desire.
  • messageText - Message text which will trigger the alarm if coming from 'phoneNumbers'
  • musicVolume - Desired music volume for the media play alert
  • alarmFilePath - Audio file which should be played when alarm is triggered.
    • The file path should be in URL format. If local path (SDCard or Phone Memory) then it should start with 'file://', as in example value)

Old script which used SetOn{x} to change the volume is still available for download.
Usage of the old script is slightly different (volume is not configurable), but that can be easily adapted. Reverting back to old volume is not possible as we cannot check volume using SetOn{x}.

Reviews for this release

No reviews yet for this release.