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 - how to Start onRunning Activity without restarting??

how to Start onRunning Activity without restarting??

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

how to Start onRunning Activity without restarting??

Postby sit06603 » Sun Jan 04, 2009 4:57 am

hi all,

Happy new year to all...

I have a question on starting the activity...
if the activity is onRunning(already started)
{
How can I call the activity to run, without duplicate and restart the activity???
coz whenever I use this.startActivity(intent); twice, it will start twice
I wan to start onces even I call twices...
if the activity onRunning at background and bring it in front when I second call...
Any idea???
}

else
{
Start as new activity...

}

your attention is much appreciated... thanks...

Wesley.
sit06603
Junior Developer
Junior Developer
 
Posts: 22
Joined: Thu May 15, 2008 11:22 am

Top

Re: how to Start onRunning Activity without restarting??

Postby Sparkletron » Thu Jan 08, 2009 4:48 pm

sit06603 wrote:I wan to start onces even I call twices.


Well I don't know if there's some special Android way of doing this, but in Java you have a number of options. One is to synchronize the method in question. Perhaps...

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         @Override
  2.         public synchronized void onCreate(Bundle savedInstanceState) {
  3.  
Parsed in 0.011 seconds, using GeSHi 1.0.8.4

This will make all calls to onCreate() queue up so that only one call runs at a time.

Another possibility is to treat the entire object as a singleton.

-S
Sparkletron
Developer
Developer
 
Posts: 26
Joined: Tue Nov 04, 2008 6:17 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 7 guests