0

Im using alarm intent to set an alarm

Code :

Intent i = new Intent(AlarmClock.ACTION_SET_ALARM); 
i.putExtra(AlarmClock.EXTRA_MESSAGE, meet); 
i.putExtra(AlarmClock.EXTRA_HOUR, hour); 
i.putExtra(AlarmClock.EXTRA_MINUTES, min); 
startActivity(i); 

As i have already selected the time ,date and the message from my app i don't want to make any changes So in the alarm app as this intent is fired.

I have to press the OK button every time i set an alarm. Screenshot

I don't want this screen to popup, and press the Ok button again and again. what should I do?

Is there a way to send OK request in the intent itself?

4

2 回答 2

3

每次设置闹钟时,我都必须按 OK 按钮。

行为会因闹钟应用程序而异。

我不想弹出这个屏幕,然后一次又一次地按下确定按钮。我应该怎么办

编写您自己的闹钟应用程序,或找到一个不提示您按 OK 的应用程序。

有没有办法在意图本身中发送 OK 请求?

不。

于 2013-05-27T14:55:44.273 回答
1

您可以对自己的警报服务类.. http://developer.android.com/reference/android/app/Service.html

于 2013-05-27T14:59:20.347 回答