Possible Duplicate:
How to start an Activity from a Service?
apologies for my terminology in advance I am very new to android programming.
What i am trying to do:
i am trying to create an alarm clock application.
What i have so far:
so far i have a class that starts an alarm service after 5 seconds (this works fine). then when this service class starts i want it to start another class (called AlarmRinging) but this is where I come unstuck.
Any answers or avenues to check out would be greatly appreciated.
android.app.Service is descendant of android.app.Context so you can use startActivity directly. However since you start this outside any activity you need to set FLAG_ACTIVITY_NEW_TASK flag on the intent.
For example:
where this is your service.