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. Gimana caranya kembali ke room original Hero

Setelah mencoba beberapa room ternyata tidak memuaskan, gimana caranya
kalo mau balik lagi ke room asli Hero cupcake 1.5 ? tadinya mau
restore Nandroid, tapi  kan hanya back up room yang terakhir ya?, kalo
misalnya pakai RUU yang di xda developers misalnya  apa bisa? terus
apa nantinya bisa di root lagi? mohon bantuannya para suhu ,pertanyaan
nubie nih

-- 
"Indonesian Android Community [id-android]" 

2. Droid Reboot when using VBO in opengl es codes

Hi, All:

I am working on a app which render geometrics with VBO in NDK opengl,
it works in other phone, but in Motola Droid, it will cause the
devices reboot

The logs like next, anyone can help me?

04-05 15:36:21.609: DEBUG/dalvikvm(1320): +++ not scanning '/system/
lib/libwebcore.so' for 'nativeResize' (wrong CL)
04-05 15:36:21.609: DEBUG/dalvikvm(1320): +++ not scanning '/system/
lib/libmedia_jni.so' for 'nativeResize' (wrong CL)
04-05 15:36:21.609: DEBUG/dalvikvm(1320): +++ not scanning '/system/
lib/libexif.so' for 'nativeResize' (wrong CL)
04-05 15:36:21.609: INFO/SanAngeles(1320): resize w=480 h=778
04-05 15:36:21.609: DEBUG/dalvikvm(1320): +++ not scanning '/system/
lib/libwebcore.so' for 'nativeRender' (wrong CL)
04-05 15:36:21.609: DEBUG/dalvikvm(1320): +++ not scanning '/system/
lib/libmedia_jni.so' for 'nativeRender' (wrong CL)
04-05 15:36:21.617: DEBUG/dalvikvm(1320): +++ not scanning '/system/
lib/libexif.so' for 'nativeRender' (wrong CL)
04-05 15:36:21.961: ERROR/IMGSRV(1034): sgxif.c:108: WaitForRender:
Timeout
04-05 15:36:21.961: WARN/IMGSRV(1034): mapper.c:42:
MapperDumpSyncObjects: Dumping all active sync objects..
04-05 15:36:21.961: WARN/IMGSRV(1034): mapper.c:50:
MapperDumpSyncObjects: Sync object ID=20, 0xFHWR=0x0300, WOC
DevVAddr=0xd811a3c, ROC DevVAddr=0xd811a44
04-05 15:36:21.961: WARN/IMGSRV(1034): mapper.c:50:
MapperDumpSyncObjects: Sync object ID=19, 0xFHWR=0x0300, WOC
DevVAddr=0xd80037c, ROC DevVAddr=0xd800384
04-05 15:36:21.961: WARN/IMGSRV(1034): mapper.c:50:
MapperDumpSyncObjects: Sync object ID=18, 0xFHWR=0x0130, WOC
DevVAddr=0xd80058c, ROC DevVAddr=0xd800594
04-05 15:36:21.961: WARN/IMGSRV(1034): mapper.c:50:
MapperDumpSyncObjects: Sync object ID=16, 0xFHWR=0x0130, WOC
DevVAddr=0xd80022c, ROC DevVAddr=0xd800234
04-05 15:36:21.961: WARN/IMGSRV(1034): mapper.c:50:
MapperDumpSyncObjects: Sync object ID=10, 0xFHWR=0x0130, WOC
DevVAddr=0xd8005a4, ROC DevVAddr=0xd8005ac
04-05 15:36:21.961: WARN/IMGSRV(1034): mapper.c:50:
MapperDumpSyncObjects: Sync object ID=8, 0xFHWR=0x0130, WOC
DevVAddr=0xd80055c, ROC DevVAddr=0xd800564
04-05 15:36:21.961: WARN/IMGSRV(1034): mapper.c:50:
MapperDumpSyncObjects: Sync object ID=3, 0xFHWR=0x1000, WOC
DevVAddr=0xd800064, ROC DevVAddr=0xd80006c
04-05 15:36:21.961: WARN/IMGSRV(1034): mapper.c:50:
MapperDumpSyncObjects: Sync object ID=2, 0xFHWR=0x1000, WOC
DevVAddr=0xd80004c, ROC DevVAddr=0xd800054

-- 

3. Can any one see my message?

4. Activating Bluetooth

5. Enabling download of a particular file (extension) in native android browser

6. Question about AlphaAnimation

7. Question about stopping AlarmManager.