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

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 - Detect phone on sleep

Detect phone on sleep

Quickly share your Android Code Snippets here...

Detect phone on sleep

Postby csengyee » Sun Dec 20, 2009 4:54 am

Hi guys,

Is there a way to detect a phone entering into sleep mode? Thanks in advance.
csengyee
Junior Developer
Junior Developer
 
Posts: 19
Joined: Mon Jul 13, 2009 3:07 pm

Top

Postby i4nc4mp » Thu Dec 31, 2009 4:00 am

Yes. Just use a broadcast receiver for screen_off. I am doing this with a simple program that auto-bypasses the lockscreen activity.

Whats vexing me is whether I can have an activity watch for hardware buttons and handle them, while displaying just a sleeping screen
i4nc4mp
Developer
Developer
 
Posts: 39
Joined: Sat Dec 12, 2009 6:44 pm

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 4 guests