Someone somewhere somehow (some code inside PhoneGap, by the looks of it)
created an AlertDialog and didn't destroy it when the activity got
destroyed.

-- K

2012/6/14 Rocky <rkjhaw1...@gmail.com>

> All,
>
> I'm getting error Activity has leaked windows, when i'm calling index.html
> page through my Activity.
>
> *Here is the code - *
>
> public class MobSmartPhonehas extends DroidGap {
>
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>
>         super.setIntegerProperty("splashscreen", R.drawable.splash); //
> Display
>                                                                         //
> splash
>                                                                         //
> screen
>                                                                         //
> for
>                                                                         //
> android
>         this.setIntegerProperty("loadUrlTimeoutValue", 1000);
>         super.loadUrl("file:///android_asset/www/index.html", 1000);//
> 1000 is
>                                                                     // the
> time
>                                                                     // for
>                                                                     //
> splash
>                                                                     //
> screen
>                                                                     //
> display
>
>     }
>     // fix for 3897
>     @Override
>     public void onDestroy() {
>         super.onDestroy();
>     }
>
> }
> *
> here is error i'm getting - *
>
> 06-14 15:09:18.154: D/dalvikvm(497): GC_FOR_MALLOC freed 652 objects /
> 84512 bytes in 121ms
>
> 06-14 15:09:18.404: I/Database(497): sqlite returned: error code = 14, msg
> = cannot open file at source line 25467
>
> 06-14 15:09:18.724: I/System.out(497): onReceivedError: Error code=-6
> Description=The connection to the server was unsuccessful.
> URL=file:///android_asset/www/index.html
>
> 06-14 15:09:23.914: D/dalvikvm(497): GC_FOR_MALLOC freed 1828 objects /
> 313472 bytes in 101ms
>
> 06-14 15:09:25.083: E/WindowManager(497): Activity
> com.kt.reality.MobSmartPhonehas leaked window
> com.android.internal.policy.impl.PhoneWindow$DecorView@44fa8d38 that was
> originally added here
>
> 06-14 15:09:25.083: E/WindowManager(497): android.view.WindowLeaked:
> Activity com.kt.reality.MobSmartPhonehas leaked window
> com.android.internal.policy.impl.PhoneWindow$DecorView@44fa8d38 that was
> originally added here
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> android.view.ViewRoot.<init>(ViewRoot.java:247)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> android.view.Window$LocalWindowManager.addView(Window.java:424)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> android.app.Dialog.show(Dialog.java:241)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> android.app.AlertDialog$Builder.show(AlertDialog.java:802)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> com.phonegap.DroidGap$6.run(DroidGap.java:1483)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> android.os.Handler.handleCallback(Handler.java:587)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> android.os.Handler.dispatchMessage(Handler.java:92)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> android.os.Looper.loop(Looper.java:123)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> android.app.ActivityThread.main(ActivityThread.java:4627)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> java.lang.reflect.Method.invokeNative(Native Method)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> java.lang.reflect.Method.invoke(Method.java:521)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
>
> 06-14 15:09:25.083: E/WindowManager(497):     at
> dalvik.system.NativeStart.main(Native Method)
>
>
> Help me out. how to fixed it, I gone through few link over stack overflow
> but not able to find the solution.
>
> --
> Thanks & Regards
>
> Rakesh Kumar Jha
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to