Where is the rest of it, you have truncated it too soon.
On Sunday, April 14, 2013 5:10:47 PM UTC+1, Carlos Calvo wrote:
>
> The logcat
>
> 04-14 18:06:42.043: E/AndroidRuntime(26483): FATAL EXCEPTION: main
> 04-14 18:06:42.043: E/AndroidRuntime(26483):
> android.view.WindowManager$BadTokenException: Unable to add window -- token
> null is not for an application
> 04-14 18:06:42.043: E/AndroidRuntime(26483): at
> android.view.ViewRootImpl.setView(ViewRootImpl.java:571)
> 04-14 18:06:42.043: E/AndroidRuntime(26483): at
> android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:246)
> 04-14 18:06:42.043: E/AndroidRuntime(26483): at
> android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
>
> thx
>
>
> El domingo, 14 de abril de 2013 17:18:00 UTC+2, RichardC escribió:
>>
>> Show us the Logcat
>>
>> On Sunday, April 14, 2013 3:55:42 PM UTC+1, Carlos Calvo wrote:
>>>
>>> Hello,
>>>
>>> I have a ProgressDialog running. Execute method ".dismiss" for destroy
>>> them.
>>>
>>> But when i create a new AlertDialog i take a exception because the
>>> progessdialog yet still show
>>>
>>> *Exception *"Unable to add window -- token null is not for an
>>> application"
>>>
>>> *The code:*
>>>
>>> if (pd.isShowing()){
>>> pd.dismiss();
>>> }
>>> MainActivity.this.runOnUiThread(new Runnable() {
>>>
>>> public void run() {
>>>
>>> AlertDialog.Builder builder = new
>>> AlertDialog.Builder(getApplication());
>>> builder.setTitle("Lo sentimos por el Fallo")
>>> .setMessage("Resolveremos el fallo lo antes posible")
>>> .setCancelable(false)
>>> .setIcon(R.drawable.ic_exception)
>>> .setPositiveButton("Enviar Fallo",
>>> new DialogInterface.OnClickListener() {
>>> public void onClick(DialogInterface dialog, int id) {
>>> //enviar por mail traza exception
>>> mDamageReport.submit( new Exception() );
>>> finish();
>>> }
>>> })
>>> .setNegativeButton("Cerrar",
>>> new DialogInterface.OnClickListener() {
>>> public void onClick(DialogInterface dialog,
>>> int id) {
>>> finish();
>>> }
>>> });
>>>
>>> builder.create().show();
>>>
>>> }
>>> });
>>>
>>
--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.