I’ve been working on this project all day. All I need to figure out now is how to delete an alarm set in Sleep as Android. If possible, all alarms at the same time.
I’ve been using the android intents to try this, and can successfully create alarms.
https://developer.android.com/reference/android/provider/AlarmClock
I’ve tried several variations of
service: notify.mobile_app_pro23_ultra
data:
message: command_broadcast_intent
data:
intent_package_name: "com.urbandroid.sleep"
intent_action: "com.urbandroid.sleep.alarmclock.ALARM_STATE_CHANGE"
intent_extras: >
{% set messagetext = message | default('Test') %}
android.intent.extra.alarm.MESSAGE:{{ messagetext }}
I feel like I’m close.
edit:
service: notify.mobile_app_pro23_ultra
data:
message: command_broadcast_intent
data:
intent_package_name: "com.urbandroid.sleep"
intent_action: "com.urbandroid.sleep.alarmclock.ALARM_STATE_CHANGE"
intent_extras: >
alarm_label:"Test"
If I use alarm_label
and put anything in quotation marks, then it crashes Sleep as Android… I feel like it’s trying.
Doesn’t delete, but disables. I’m cool with that.
service: notify.mobile_app_pro23_ultra
data:
message: command_broadcast_intent
data:
intent_package_name: "com.urbandroid.sleep"
intent_action: "com.urbandroid.sleep.alarmclock.ALARM_STATE_CHANGE"
intent_extras: "alarm_label:Sunday Wake Up,alarm_enabled:false"