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 - Showing a Toast or Activity on top of another application

Showing a Toast or Activity on top of another application

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

Showing a Toast or Activity on top of another application

Postby Sir^Knigget » Wed Sep 30, 2009 6:26 pm

Hello,
I have an application which runs a background thread which eventually updates listeners on some incoming event.
When I'm in this listeners' code, I want to be able to either show a Toast or a new Activity on top of the screen, regardless of what is running in this moment - but to be able to come back to it (add on top of the current stack, even if it's another application).
By now I didn't succeed in doing that in any way.

This is one attempt (inside my listener, which is called from a worker thread):

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2.  
  3.  
  4.                                 runOnUiThread(new Runnable() {
  5.  
  6.                                        
  7.  
  8.                                         public void run() {
  9.  
  10.                                                 Toast.makeText(getApplicationContext(), "toast", Toast.LENGTH_LONG).show();
  11.  
  12.                                                
  13.  
  14.                                         }
  15.  
  16.                                 });
  17.  
  18.  
Parsed in 0.015 seconds, using GeSHi 1.0.8.4


It shows the toast when I am in my original application, but not when I'm in background.
I put a breakpoint on the line with the toast showing, and I know that I get there, but it does nothing.

Do you have any idea?

Thanks ahead!
Sir^Knigget
Freshman
Freshman
 
Posts: 9
Joined: Wed Sep 30, 2009 6:00 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests