Play a specific ringtone type based on the users device settings for ringtones.
Example - Play Notification Sound
function OnStart()
{
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
btn = app.CreateButton( "Press Me", 0.3, 0.1 );
btn.SetOnTouch( btn_OnTouch );
lay.AddChild( btn );
app.AddLayout( lay );
}
function btn_OnTouch()
{
app.PlayRingtone("Notification");
}
from native import app
def OnStart():
lay = app.CreateLayout("linear", "VCenter,FillXY")
btn = app.CreateButton("Press Me", 0.3, 0.1)
btn.SetOnTouch(btn_OnTouch)
lay.AddChild(btn)
app.AddLayout(lay)
def btn_OnTouch():
app.PlayRingtone("Notification")