On Wed, Jul 14, 2010 at 11:20 PM, Garibay <[email protected]> wrote:
> In my strategy I am creating a Receiver that listens for
> RECEIVE_BOOT_COMPLETED action and launch an everlasting Service which
> sets up a PhoneStateListener.

Boo!

> 1) Is there any other strategy to be always listening for incoming
> calls and thus avoide to using an on boot created Service? (besides
> the Service eventually gets killed and I am not able to detect
> incoming calls)

You could try setting up a BroadcastReceiver for ACTION_PHONE_STATE_CHANGED.

> 3) does startForeground prevent Android going to sleep or it is just
> aimed to keep the Service's process in memory?

startForeground() has no impact on the device going to sleep.

> 4) A wake lock would do this job ? (I have not tried this)

A WakeLock has a significant impact on the device going to sleep.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.9 Available!

-- 
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