To Add an Alarm

(skipUI doesn't seem to work, so it always shows the user the Alarm in the clock app).

function  butalarm_OnTouch() {
    app.AddAlarmToClock(17, 11, "Alarm!", true)
}
 
app.AddAlarmToClock = function(hours, minutes, message, skipUI) {
    const extras = [
        {name: "android.intent.extra.alarm.HOUR", type: "int", value: hours || 0},
        {name: "android.intent.extra.alarm.MINUTES", type: "int", value: minutes || 0}
    ]
 
    if(message)
        extras.push({name: "android.intent.extra.alarm.MESSAGE", type: "string", value: message})
 
    if(skipUI) // Maybe.
        extras.push({name: "android.intent.extra.alarm.SKIP_UI", type: "boolean", value: true})
 
    app.SendIntent(null, null, "android.intent.action.SET_ALARM", null, null, null, JSON.stringify(extras))
}