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 switch the app in sleep mode ?

How to switch the app in sleep mode ?

Put your problem here if it does not fit any of the other categories.

How to switch the app in sleep mode ?

Postby mork » Tue Jan 05, 2010 7:30 pm

Hy Guys,

i try to learn "Android-Java" - and i have the following problem:

my program get some gps-values,
and send it to a server - after it,
the programm must sleep for 30minutes.
In this time, the GPS turned off.

My code

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. while (true){
  3.  
  4.  
  5.  
  6.  
  7.  
  8. //do ....
  9.  
  10.  
  11.  
  12. Thread.Sleep(time in ms);
  13.  
  14. }
  15.  
  16.  
Parsed in 0.013 seconds, using GeSHi 1.0.8.4


Will not work -.-

Can anyone try to explain:
- a solution for "Sleep"
- goes the App into a "halt" status, so the battery will not be drily ?

cu,
mont
mork
Freshman
Freshman
 
Posts: 2
Joined: Tue Jan 05, 2010 7:21 pm

Top

Postby mork » Wed Jan 06, 2010 9:41 pm

damn... okay.. it was easy...

but... when it goes to sleep,
the app cannot do any events,
so the system says "[...] [force close] [wait]"

in VB.NET i can write Application.DoEvents() - ...and in Java ?

Thanks,
mork
mork
Freshman
Freshman
 
Posts: 2
Joined: Tue Jan 05, 2010 7:21 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 12 guests