andrew wrote: > I am sorry for using the wrong word "endless". > My service is a listener,when receiving messages from computer, > it will call my activity,and in my activity,if finds the screen is > locked,it have to > hide the screen,in order to display itself.
Why not use a Notification? That's the preferred means of alerting the user to something that has occurred in the background. > If the the messages is keeping on sending to my service, > when user keeping on operating the computer,my activity will be called > again and again, > so it have to hide and rediplay the lock again and again. What you are describing sounds like an incredible drain on the battery, coupled with a UI that will interfere with any other use of the device (Want to send an SMS? Tough! Your activity will keep forcing itself to the foreground!). I sure hope you know what your users will want... > Maybe someone could tell me how to remove the lock when my activity is > loaded,and to add the lock when my activity finished, > this will give me a new way to deal my problem. onCreate() and onDestroy(), perhaps? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 0.95 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 -~----------~----~----~----~------~----~------~--~---

