Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 188.8.131.52 release ready!
Owner and Founder. Opencart
The most common issue which leads your android application to crash with this log message:
Error: E/WindowManager: android.view.WindowLeaked: Activity com.example.android has leaked window
Let’s take an example here is request() method where we have requested to the server and showing a progress bar. Here mProgress is an instance of ProgressDialog and getResponse() is a method in which we get a response from the server if error(0) that mean we can start new activity for the user.
In above code, we are showing the progress bar to the user and started the new activity without dismissing progress which leaked window in this case.
onStop() method Activity cycle called when no longer activity visible there we can check either mProgress is null or not. If mProgress isn’t null that mean your activity leaked window so you can dismiss it onStop() method.
If you have any doubt comment below.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.