Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How to wake up the screen...

How to wake up the screen...

Quickly share your Android Code Snippets here...

How to wake up the screen...

Postby Insignia » Tue Aug 31, 2010 6:08 pm

Hi!

Basically, I own a rooted Dell Streak and I'm trying to make an application which recognises when a text arrives and notifies the user by flashing the 3 Home/Menu/Back LEDs in various different patterns. That wasn't much of a problem to code, the only problem is, that they don't light up when the screen has been locked/timed out. Therefore, i've been trying to get my app to power on the screen when an SMS arrives but i have literally tried everything and had no luck whatsoever.

I can remove the lock screen just fine with:
Code: Select all
private synchronized void disableKeyguard() {
        if (mKeyguardLock == null) {
            mKeyguardLock = mKeyguardManager.newKeyguardLock("AlarmClock");
            mKeyguardLock.disableKeyguard();
        }
    } 


But the screen stays off.
I thought WAKE_LOCK would've worked, but apparently not:
Code: Select all
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock WL1= pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag");
WL1.acquire();
   ...
WL1.release();


I made sure WAKE_LOCK permissions are set in the manifest.

I am completely stumped with this, i'm probably just a complete idiot but i've been trying for a few days and i'm completely stuck :(
Any help would be hugely appreciated!

Thanks in advance!
Insignia
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Aug 31, 2010 5:31 pm

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 3 guests