Reputation: 47
I need to play the song from memory card in the specific time like 10am, 1pm and 5pm. So here my questions are, How to auto start the application? and How to play that songs in regular intervals?
Upvotes: 0
Views: 11459
Reputation: 22637
Please check put android's AlarmManager, http://developer.android.com/reference/android/app/AlarmManager.html
It a nutshell, you will create an alarm for a particular time, register a BroadcastReceiver to be called in response to the alarm going off. In the receiver, you will start an IntentService that will use MediaPlayer to play the song, and again use AlarmManager to schedule another alarm for the next time you want to play the song.
http://developer.android.com/reference/android/content/BroadcastReceiver.html http://developer.android.com/reference/android/app/IntentService.html http://developer.android.com/reference/android/media/MediaPlayer.html
There are lots of nuances to getting it right, and explaining them is not in the scope of this answer. If you Google on the topic, you will find lots of examples and tutorials.
Upvotes: 4
Reputation: 241
find background service and using audio.
im not sure u mean this... like a alarm clock
it
s not auto start.
Upvotes: 1