Preventing Screen uto Lock while my application is running

by Georgy » Wed, 26 Aug 2009 04:02:46 GMT


Sponsored Links
 Hello,

I read a lot of posts concerning preventing the screen auto lock but
didn't find an efficient way.

Isn't there any simple line I could put to do such a thing? everything
looked so complicated, or didn't work.

thanks
--~--~---------~--~----~------------~-------~--~----~



Preventing Screen uto Lock while my application is running

by Streets Of Boston » Wed, 26 Aug 2009 04:04:03 GMT


 Which ways did not work or were complicated?



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Preventing Screen uto Lock while my application is running

by Georgy » Wed, 26 Aug 2009 04:09:29 GMT


 For example:

   public void onCreate() {
                PowerManager pm = (PowerManager) getSystemService
(Context.POWER_SERVICE);
                PowerManager.WakeLock wl = pm.newWakeLock
(PowerManager.FULL_WAKE_LOCK, "My Tag");
                wl.acquire();
        }

        public void onDestroy() {
                wl.release();
        }




--~--~---------~--~----~------------~-------~--~----~



Preventing Screen uto Lock while my application is running

by Georgy » Wed, 26 Aug 2009 04:12:14 GMT


 I actually read your post Dianne but somehow it doesn't work.

To be more specific I am using the RADAR intent and try to keep the
screen on while navigating to a location.

Thanks




--~--~---------~--~----~------------~-------~--~----~



Preventing Screen uto Lock while my application is running

by Georgy » Wed, 26 Aug 2009 04:13:59 GMT


 hold on I was thinking:

I am calling the radar intent like this:

 Intent i = new Intent("com.google.android.radar.SHOW_RADAR");

could it be that the line of code you mentioned must be in the RADAR
activity? meaning that I cannot control it unless I write the radar
activity that I am referencing all over again???





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. See the Google app store without having cell phone service ??

Does anyone know if it possible to see the Google app store without
having cell phone service on the Android (like from my ADP with no SIM
card)?

I can see bits of it at http://market.android.com, but can you see all
of it without the Android on a cell phone account?

Thank you!

--~--~---------~--~----~------------~-------~--~----~

2. Potential issues I've found with the way ADC2 is working for games

Wasn't google supposed to do a first pass at filtering these things?
So these are the apps that have - in theory - already passed a
reviewer.

Wow.

(So far I haven't hit anything that bad, and one app I rated pretty
nicely and will probably buy....er, would buy, if google would let me.
But, you know, AOSP users can't use the market anymore..)

On Sat, Sep 26, 2009 at 3:10 AM, Maps.Huge.Info (Maps API Guru)



--~--~---------~--~----~------------~-------~--~----~

3. Figured out how to debug and use JDB on the real android device ADP1.

4. Too many pattern attempts! HTC Magic locked out!

5. ProgressDialog with a second thread - Screen Orientation and "back button". How to restore progress dialog?

6. About tab icon

7. Can I set Activity android:enabled by java code?