android - Error exception when show the progress dialog in the async task -
I am currently working on an async function to post some data in the API, the problem is that when I Async working with progress dialog was named "APIhandler" which handles many types of case.
Here's the creator
Public APIHandler (reference _ctx, EasyTracker _tracker, string_formType) {this.ctx = _ctx; This.tracker = _tracker; This.formType = _formType; Shared references prefs = ctx.getSharedPreferences ("userInfo", 0); Token = prefs.getString ("token", ""); MemId = prefs.getString ("memId", ""); If (formType.equals ("uploadImg")) {pd = ProgressDialog.show (ctx, ctx.getResources (). GetString (R.string.sys_info), ctx.getResources (). GetString (R.string.publishing)) ; } Else {pd = ProgressDialog.show (ctx, ctx.getResources (). GetString (R.string.sys_info), ctx.getResources (). GetString (R.string.loading)); }}
PostStexContact Here
@Override Secure Zero PostXextech (JSONObject result) {if (pd! = Null & pd.is Showing ()) Pd.dismiss (); }
The way to call the API handler is here
the new API handler (CTX, Tracker, "Login"). Execute (CTX, session.TetapetsToken ());
Error code (note that this is unsuccessful at dialog.show)
02-18 14:17: 17.942: E / Window Manager (440 ): Activity com.project.hkseven.Activity.SharePicForm has leaked the window com.android.internal.policy.impl.PhoneWindow$DecorView@4231c268, which was originally added here 02-18 14:17: 17.942: E / Window Manager (440): Android.view.windowLeaked: Activity com.project.hkseven.activity.SharePicForm has leaked the window com.android.internal.policy.impl.PhoneWindow$DecorView@4231c268 which is basically here Was added 02-18 14: 17: 17.942: E / Window Manager (440): For Android. View.Drive IMPple. & Lt; Init & gt; (ViewArtimple.Jewskel) 02-18 14: 17: 17.942: E / Window Manager (440): Android. ViewWindowManagerImpl.addView at (WindowManagerImpl .java: 307) 02-18 14: 17: 17.942: E / Window Manager (440): Android. On. Windows Manager Impl.Advive (Window Manager Impl. Java 2828) 02-18 14: 17: 17.942: E / Window Manager (440): On Android. ViewWindowManagerImpl $ CompatModeWrapper.addView (WindowManagerImpl.java:153) 02-18 14: 17: 17.942: E / Window Manager (440): Android. On Viscin Window Dollar LocalWindowManager.addView (windows.java writer 86) 02-18 14:17: 17.942: E / Window Manager (440): On Android.app.Dialog.show (Dialog.JavaX 7777) 02-18 14:17: 17.942: E / Window Manager (440): Android.APProgressionology.show (Progress Diolog. Java 116) 02-18 14: 17: 17.942: E / Window Manager (440): Android.APProjectDialog.Show (Progress DealogyJavaah 99) 02-18 14: 17: 17.942: E / Window Manager (440): Android.APProgressionDialog.Show (Progress DeLogJAVA: 940) 02-18 14: 17: 17.942: E / Window me Ejr (440) on com.project.hkseven.Utility.APIHandler. & Lt; Init & gt; (APIHandler.java:62) 02-18 14: 17: 17.942: E / Window Manager (440): at com.project.hkseven. Active. SharePicForm $ 4. Finish (SharePicForm.java:282) 02-18 14: 17: 17.942: E / Window Manager (440): Com. Facebook.Request $ 4.run (Request.java.1669) 02-18 14: 17: 17.942: E / Window Manager (440): Android.OS Handler Handyley Callback (Handler. Java: 615) 02-18 14:17 : 17.942: E / Window Manager (440): D.os.Handler.dispatchMessage (handler.java: 92) on Android 2. E-Window Manager (440): Android.org OS Oops (Looper.java:137) 02-18 14: 17: 17.942: E / Window Manager (440): Android. App ActivateTrade.Mine (ActivityTrade.Java Sharma 882) 02-18 14: 17: 17.942: E / Window Manager (440): .invokeNative (original method) on java.lang.reflect.method 02-18 14:17: 17.942: E / Window Manager (440): at java.lang.reflect.Method.invoke (method Java 1111) 02-18 14: 17: 17.942: E / WindowManager (440): com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:789) 02-18 14: 17: 17.942: E / Window Manager (440): .jygoteInit.main at com.android.internal.os (ZygoteInit.java/56) 02-18 14 : 17: 17.942: E / Window Manager (440): On Dalvik.system.NativeStart.main (Basic method)
How to fix the problem? Thank you very much
Just make sure that you do not end your SharePicForm
activity There are errors before displaying the dialog that your SharePicForm
activity is not present when displaying the dialog. Or maybe it's already gone.
Comments
Post a Comment