Hi,

I'm not sure about it, but would a Wake Lock solve the problem?
PARTIAL_WAKE_LOCK ensures the CPU is running, but the screen may be off.

Regards,

Marcio Alexandroni
www.cialogica.com
w  Tel. 55 11 3717-2345
   Cel. 55 11 9989-8316
[EMAIL PROTECTED] 
 marcioalexandroni

-----Original Message-----
From: android-developers@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of vekexasia
Sent: Wednesday, December 03, 2008 17:50
To: Android Developers
Subject: [android-developers] TelephonyManager.listen Freezes when the
screen is shutted down!


hi, on my onCreate() Activity function i wrote this:
<--
        CambioCellula myCellula=new CambioCellula();
...
        TelephonyManager x=(TelephonyManager)this.getSystemService
(Context.TELEPHONY_SERVICE);
        x.listen(myCellula, PhoneStateListener.LISTEN_CELL_LOCATION);
-->
Where CambioCellula is my class defined like this excerpt
<--
public class CambioCellula extends PhoneStateListener {
....
        public void onCellLocationChanged(CellLocation location) {
                GsmCellLocation myLocation=(GsmCellLocation)location;
                Log.d("X","Y");
                Toast.makeText(ctx, "Found New Cells
"+myLocation.getCid(),Toast.LENGTH_LONG ).show();
        }
}

-->
The program works when the screen is on .. But when i shut down the
Screen  ( with a short press of the end-call button) it seems to
doesn't
work..

IS this an sdk problem? Am i doing something wrong?
Are you familiar with this kind of "bugs" ?
Thanks Andrea.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
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