I got the answer to question number 2 here: http://developer.android.com/reference/android/telephony/PhoneStateListener.html <http://developer.android.com/reference/android/telephony/PhoneStateListener.html>Only question 1 remains now.
On Wed, Sep 9, 2009 at 2:15 PM, Android Development <[email protected]>wrote: > I also have a query regarding this. > I have two questions: > > 1) Suppose, i want my service to go into deep sleep initially. If my phone > receives an incoming VoIP call (over the underlying IP connectivity, which > may be WiFi), then i wish to start an activity, and alert one of my services > to handle the incoming call. Is there an alarm for which i can register, > for implementing this use case ? > > 2) My second question is, that is it possible for me to poll for the status > of Data connection states of the Android device using the states defined for > TelephonyManager ? If i wish to be notified somehow, when the data > connection is lost, connected or suspended etc asynchronously, how do i go > about it ? Or will i need to spawn a background thread that checks for the > data status constantly and notifies my application if any major event takes > place ? > > Thanks in advance.. > > > On Wed, Sep 9, 2009 at 1:47 PM, Lee <[email protected]> wrote: > >> >> You can detect screen off and set an alarm every 5 seconds to poke the >> service if you want to keep it doing something. >> While the service is busy, make sure you hold a partial wake lock. >> Have a look at the SMSPopup for an example of wakelock management. >> >> Lee >> >> >> > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

