[android-beginners] Starting an activity from a service

2009-11-05 Thread Tabibito
Hi all, I've begun creating a Call Notes application that runs as a service from startup, senses when a call has ended, and pops up a screen where you can put in a note about the call. So far I have gotten the service to start on boot, the service senses the hangup, but when it does, I can't get

Re: [android-beginners] Starting an activity from a service

2009-11-05 Thread Justin Anderson
startActivity() is not defined where you are trying to call it from. It is a method on the Context class. Create a constructor for your CallStateListener class that takes a Context object as a parameter and store it as a member variable. When you create a new instance of your class, you can do