termux-api icon indicating copy to clipboard operation
termux-api copied to clipboard

AlarmClock: ability to list/search/show/set/delete/edit alarms on the default clock app

Open iwconfig opened this issue 5 years ago • 1 comments

Feature description

I very much need and want the ability to list/search/show/set/delete/edit alarms on the default clock app.

My work schedule varies greatly each day so I want to automate my alarm clock with greater control. While I know some other ways to accomplish this, I prefer Termux as much as possible and in my case Termux would also be the best tool for the job.

Automate, Tasker and the like does not seem to support a lot of what you can get out of the AlarmClock provider, only setting a new alarm. Additional plugins for these with calendar support and whatnot are quite hackish, depending on your needs.

This requires the permission com.android.alarm.permission.SET_ALARM.

Reference implementation

I'm no android developer, but the Android API seem to support this

Java example taken from here:

  Intent openClockIntent = new Intent(AlarmClock.ACTION_SET_ALARM);
  openClockIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  openClockIntent.putExtra(AlarmClock.EXTRA_HOUR, 10);
  context.startActivity(openClockIntent);

iwconfig avatar Dec 26 '20 05:12 iwconfig

Comment to support the feature request.

justpeanuts avatar Sep 02 '23 01:09 justpeanuts