Android AlarmClock search by label

99封情书 提交于 2020-01-04 07:58:06

问题


I want to use an Intent with android.provider.AlarmClock to dismiss (ACTION_DISMISS_ALARM) an specific Alarm. I want to use ALARM_SEARCH_MODE_LABEL to select the alarm. However, I have no idea how I can set the label to search for.

Intent i = new Intent(AlarmClock.ACTION_DISMISS_ALARM);
i.putExtra(AlarmClock.EXTRA_ALARM_SEARCH_MODE, AlarmClock.ALARM_SEARCH_MODE_LABEL);
startActivity(i);

Can someone help me complete the code?


回答1:


Seems like it is:

intent.putExtra(AlarmClock.EXTRA_MESSAGE, label)

This seems to result in deleting the entry with that label.



来源:https://stackoverflow.com/questions/42233249/android-alarmclock-search-by-label

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!