Wish to play notification tone on android based on payload state MQTT Dash

313 views
Skip to first unread message

Charles Patterson

unread,
Apr 10, 2017, 12:19:04 AM4/10/17
to Routix
I think my problem is pretty simple I just can not figure it out any help would be greatly appreciated.
I wish to play the ringtone or notification sound based on payload state. My Java is nonexistent. 

I think I need something like this

Uri notification = RingtoneManager.getDefault(RingtoneManager.TYPE_NOTIFICATION);

Ringtone r = RingtoneManager.getRingtone(getApplicationContex(), notification);

r.play();


Thank you

CRPatterson

Routix.net

unread,
Nov 17, 2017, 3:26:58 AM11/17/17
to Routix
Hi, you can't play sounds with JS, sorry.
Reply all
Reply to author
Forward
0 new messages