简体   繁体   English

使用MediaPlayer流作为声音源设置Android警报

[英]Setting an Android alarm with MediaPlayer stream as the sound source

I am writing an Android app that plays a live Shoutcast stream among other things. 我正在编写一个可播放实时Shoutcast流的Android应用。 Is it possible to build a feature where the user can set an alarm with the Shoutcast stream as the sound source for the alarm? 是否可以构建一个功能,使用户可以使用Shoutcast流作为警报的声源来设置警报? I have searched here and elsewhere for the answer but with no luck so I would appreciate any pointers or high level advice as to how I can achieve this. 我已经在这里和其他地方搜索了答案,但是没有运气,因此,对于我如何实现此目标,我将不胜感激。

Take a look at the AlarmManager class and also the DatePicker and TimePicker classes. 看一下AlarmManager类以及DatePickerTimePicker类。

Between the three of them you should be able to do what you want. 在这三个人之间,您应该能够做自己想做的事。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM