Posts

Showing posts from 2018

How to cancel AsyncTask

I found great solution to solve the AsyncTask cancel problem found this so annoying to solve but it fixed the cancelation problem of AsyncTask of mine so sharing with you guys when i was using Android emulator and running Oreo version on it and trying  asyncTaskObj.cancle(true); it was perfectly working i.e it was perfectly calling onCancelled() method of AsyncTask but problem arise when i tried to run it in my Marshmallow version android device, it was not calling onCancelled() method of AsyncTask so i found a solution where we call asyncTaskObj.cancle(true); i.e. in onClick event we can do version check and if version is smaller then Oreo then manually call onCancelled() method and also check if isCancelled() is true i.e. Eg: mButtonCancel.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View view) { //set state of cancel for AsyncTask myAsyncTask .cancel( true ); //checking if v...

Privacy Policy

Privacy Policy for Legend Mortal Developer At Legend Mortal Developer, accessible from https://legendmortaldeveloper.blogspot.com, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by Legend Mortal Developer and how we use it. If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us. Log Files Legend Mortal Developer follows a standard procedure of using log files. These files log visitors when they visit websites. All hosting companies do this and a part of hosting services' analytics. The information collected by log files include internet protocol (IP) addresses, browser type, Internet Service Provider (ISP), date and time stamp, referring/exit pages, and possibly the number of clicks. These are not linked to any information that is personally identifiable. The purpose of the information is for analyzing trends, administer...