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 - java.lang.RuntimeException: Can't create handler inside thre

java.lang.RuntimeException: Can't create handler inside thre

Search for BETA-testers and/or promote your own Application in a decent way.

java.lang.RuntimeException: Can't create handler inside thre

Postby mamungm » Thu Jul 23, 2009 11:53 am

Hi,

I am getting this runtime exception:

07-23 17:45:27.336: WARN/System.err(775): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare().



I first created a thread to call server for some data. Then the class which implements runnable and gets the data from server, calls another class through interface. In that class I called showDialog(0); and that class is an activity and overrides

@Override
public Dialog onCreateDialog(int id)
{
if(id == YES_NO_DIALOG)
{
return new AlertDialog.Builder(this)
.setIcon(R.drawable.yesno)
.setTitle("Are you sure")
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {

/* User clicked OK so do some stuff */
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {

/* User clicked Cancel so do some stuff */
}
})
.create();
}
}

Please help me how to get rid of this runtime exception.

G.M.Al-Mamun
Android software developer
mamungm
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Jul 22, 2009 4:48 pm

Top

Return to Promote your Android Application

Who is online

Users browsing this forum: No registered users and 5 guests