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. How to start

I am a beginner to Android.

How would I proceed to learn Android.

Do you have any reference to any book ??

I am experienced with Java 2 Standard Edition

Thanks

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

2. Overlay never displayed in MapView

Do you use ItemizedOverlay or directly Overlay ?
I found that no one on the mailing list made ItemizedOverlay work,
included me.
I'll try to draw items myself like in the M5.





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

3. Android SMS

4. Could not fine HelloAndroid.apk when lauching the HelloAndroid exampl

5. how to use webview to show lcoal javascript

6. Poll: How much will the first Android handset cost?

7. Treo Pro skin now available for Android Emulator!