I had to do something similar for my app...what I did was use the Alarm
Manager based on these examples:

http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/
http://www.epochconverter.com/

I only had two files (in my case they were live streams) for my user to
choose from using the radio button widget. My alarm manager launched an
Activity where by using a public static variable I was able to determine
which stream was chosen and use the MediaPlayer to play one of those files.

Hope this helps...I had trouble with this as well at first. One thing to
keep in mind when you're looking into the Alarm Manager is that the time the
alarm will go off is based on an offset to the current system time which is
in milliseconds...the second link above will show you how to convert to
epoch time. Basically what I did was convert the time the alarm is supposed
to go off into epoch time...took the difference from the current system time
(which is also in epoch format) and then used the difference as my offset.

DanielleM

On Thu, Feb 17, 2011 at 11:47 AM, vnv <[email protected]> wrote:

> Hi,
>
> I would like to enable my user to select mp3 or whatever sound file he
> want's to to play it as designated alarm sound.
>
> Is there any intent-alike thingy that I could call and user would
> browse selection and select, after which I could have path to the
> existing file.
>
> Tnx for help in advance.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to