<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Prateek Mishra on Medium]]></title>
        <description><![CDATA[Stories by Prateek Mishra on Medium]]></description>
        <link>https://medium.com/@prateekmishra-dev?source=rss-53c245d013c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*TAk-Jo540ur7tR-U.jpg</url>
            <title>Stories by Prateek Mishra on Medium</title>
            <link>https://medium.com/@prateekmishra-dev?source=rss-53c245d013c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 01:19:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prateekmishra-dev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Image Spam Classification using Natural Language Processing]]></title>
            <link>https://medium.com/@prateekmishra-dev/image-spam-classification-using-natural-language-processing-487807f74d46?source=rss-53c245d013c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/487807f74d46</guid>
            <category><![CDATA[spam]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[spam-filter]]></category>
            <dc:creator><![CDATA[Prateek Mishra]]></dc:creator>
            <pubDate>Sun, 21 Nov 2021 11:18:16 GMT</pubDate>
            <atom:updated>2021-11-27T04:02:47.365Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Sje7bYysYmqugcGt.jpeg" /><figcaption>An image showing an inbox full of spam email. Image from : pupupsmart.com</figcaption></figure><p>With the rapid growth of the internet, cyber crimes like phishing, spamming and impersonating are also increasing. According to the report released by Symantec, email spam accounted for 55% of total emails. Initially, email spam was mostly in textual form. Several Machine learning (ML) based spam detectors with high accuracy have been developed to filter out text based spams. Over time, attackers moved to image spam to avoid text-based spam filters. They use images to share information by hiding and embedding text in it. They trick people to click on the image that redirects them to unsafe websites or causes malware attacks. In this article we will discuss Deep learning based approach for image spam detection.</p><h3><strong>Referenced Study</strong></h3><p>We have referenced the research paper<strong> </strong><a href="https://ieeexplore.ieee.org/document/9044249"><strong>Deep Convolutional Neural Networks for Image Spam Classification</strong></a><strong>. </strong>In this paper, two deep Convolutional Neural network models along with few pretrained ImageNet architectures like VGG19, Xception were discussed. We further study the effects of using a cost-sensitive learning approach in handling imbalance of data. Some of the proposed models in this work have achieved an accuracy up to 99% with zero false positive rate in the best case. The impact of using a cost-effective learning approach to handle data inequalities was also studied in this work. Some models that are proposed in this paper have achieved high accuracy of up to 99%.</p><p>In this article we will discuss the two Deep Convolutional Neural Networks proposed in the paper. We will also utilize the GoogLeNet Model to detect spam images and try to compare the GoogLeNet model with the model proposed in the referenced paper.</p><h3><strong>GoogLeNet</strong></h3><p>GoogLeNet is a 22-layer deep convolutional neural network (27 layers if pooling layers are also counted) which is a variant of the Inception Network, a Deep Convolutional Neural Network developed by researchers at Google.</p><p>GoogleNet Model is widely used for various computer vision tasks and has given promising results. Large neural networks are generally prone to problems of over fitting and suffer from either exploding or vanishing gradient. GoogleNet has addressed these issues by making use of it’s Inception Modules and auxiliary layers. For our problem of image classification we leverage this model.</p><h3><strong>Dataset used</strong></h3><p>Dataset used is a publicly available dataset from Northwestern University’s website. It has 810 HAM images and 929 SPAM images. There are 810 unique HAM images and 897 unique SPAM images.</p><h3><strong>Preprocessing</strong></h3><ol><li>Resizing : We iterate through all the folders present inside the Dataset folder and store the non-corrupt and unique SPAM and HAM images inside it in flattened form. The original RGB image is also converted into grayscale image and resized to 156X156X1 (224X224 for GoogLeNet) before storing it.</li><li>Removing Duplicate Samples : The uniqueness is ensured using a hash list that stores a hash of flattened images and if any duplicate image appears, its hash value is already inside the hash list and hence we discard that image. In this way the dataset is pre-processed.</li><li>Labelling Samples : Along with pre-processing the dataset, we also compute the label vector that stores whether an image is SPAM or HAM. Its value is 0 for a SPAM image and 1 for a Normal (HAM) image.</li></ol><h3><strong>Model Definition and training</strong></h3><p>We will design 3 DCNN models:</p><h4>GoogleNet</h4><ol><li><strong>Model Architecture</strong> : GoogleNet consists of 22 layers divided across 6 stages in the network. Three of these stages involve Inception Modules and one stage has 2 Auxiliary Layers. Inception modules make use of multiple different sized filters and dimension reductions before their output is concatenated for input to the next layer. This helps in feature reduction at both smaller and larger levels. Auxiliary Layers 1 and 2 are introduced at output of Inception Modules, loss of auxiliary layers are calculated and weighed with loss of main output layer for addressing vanishing gradient problem in this deep network. The model also consists of Dropout Layers at various stages in the network preventing typical over fitting problems as seen in deep neural networks. The output consists of 3 layers: the main output layer, auxiliary layer 1 and 2.</li><li><strong>Learning:<br></strong>Model checkpoints are stored according to best achieved validation accuracy on the main output layer which is monitored at each epoch. Learning Rate is reduced when training accuracy on the main output layer has stopped improving, this explores possibility of achieving smaller possible improvements. Classifications are made using predictions on the main output layer, the same could also be done using auxiliary layers 1 and 2.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zMMLnXjNqrzY15MI" /><figcaption><a href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43022.pdf">GoogLeNet Configuration</a></figcaption></figure><h4>Sequential Model-1</h4><p><strong>Model Architecture:</strong> A sequential model with 3 convolutional layers with size 32, 64 and 128 is designed. Each convolutional layer is followed by a ReLU activation and max pooling of pooling size 2. We use dropout regulation after the convolution layers. Next the output is flattened and is then passed to a Dense layer with 128 neurons. After this layer we have done ReLU activation and after that dropout regularization. At last a sigmoid activation function is used with the dense layer of a single neuron. Loss is computed using binary_crossentropy and adam optimizer is used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/0*Zki0HJkkxEZFrDaH" /><figcaption>Sequential Model-1 Configuration</figcaption></figure><h4>Sequential Model-2</h4><p><strong>Model Architecture</strong> : A sequential model with 3 convolutional layers with size 128, 128 and 256 is designed. Each convolutional layer is followed by a ReLU activation and max pooling of pooling size 4, 3 and 2. We use dropout regularization after the convolution. After this the output is passed to a dense layer containing 128 neurons after being flattened. Then ReLu activation and dropout regularisation are performed on the layer. At the end we apply the sigmoid activation function on the dense layer of an individual neuron.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/0*ONWsZu8X8AzUigBo" /><figcaption>Sequential Model-2 Configuration</figcaption></figure><h3>Methodology</h3><p>After defining the model and training it over the training samples, we iterate through the folder in which all the checkpoints of the best model are saved and we find out the latest checkpoint to load its weights into the model. The accuracy and other evaluation metrics are computed after loading the weights. The class weights are obtained from the model and again the model is trained over those class weights of the trained model. This leads to <strong>cost-sensitive learning</strong>. This is being done to reduce the skewness of the data towards the spam class. This is done by passing the class weights to the model and penalizing the prediction mistakes of the minority class proportional to how underrepresented it is. The accuracy and other evaluation metrics are computed and printed.</p><p>Further, the output of the second-last dense layer of the model is extracted and given as input to different Machine Learning models like Logistic Regression, Support Vector Machine (linear and non-linear kernels), Decision Tree, Random Forest, etc for prediction. The output of the second-last dense layer of the model acts as features on which the Machine Learning models predict the output. This creates hybrid models of CNN-ML models.</p><p>The inputs for the machine learning models are produced as follows, first the model named m1model uses the output from the dense layer of the last hidden layer and then the model named m2model uses the output of the dense layer of the last hidden layer in the cost sensitive CNN model. Then we run both of these models as a preprocessor to shape x_test and x_train according to our requirements.</p><h3>Results</h3><p>To evaluate the models we have used 5 kinds of scores:</p><ul><li>Accuracy Score</li><li>Precision Score</li><li>Recall Score</li><li>F1 Score</li><li>Area under ROC Curve</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/0*5DhjZSHSgyiISnAs" /><figcaption>Comparison of ROC curve of various models computed by the help of CNN</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/0*XkBtz2awIonYuTk0" /><figcaption>Comparison of ROC curves of various models computed with the help of cost sensitive CNN</figcaption></figure><p>We get similar graphs for the second CNN model as well with slight changes in the ROC curve area values.</p><h3>Conclusion</h3><p>In this project we learnt the use and effect of pre-processing and explored the usage of GoogleNet in Image Classification task and Natural Language processing. We understood the utility of hybrid models and their application in Image Spam Classification.</p><h3>References</h3><ol><li><a href="https://www.geeksforgeeks.org/understanding-googlenet-model-cnn-architecture/">https://www.geeksforgeeks.org/understanding-googlenet-model-cnn-architecture/</a></li><li><a href="https://towardsdatascience.com/deep-learning-googlenet-explained-de8861c82765">https://towardsdatascience.com/deep-learning-googlenet-explained-de8861c82765</a></li><li><a href="https://towardsdatascience.com/a-simple-guide-to-the-versions-of-the-inception-network-7fc52b863202">https://towardsdatascience.com/a-simple-guide-to-the-versions-of-the-inception-network-7fc52b863202</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=487807f74d46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Discord Bots : DisCal]]></title>
            <link>https://medium.com/nybles/using-discord-bots-discal-bad3f10cc477?source=rss-53c245d013c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/bad3f10cc477</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[discord-server]]></category>
            <category><![CDATA[discord]]></category>
            <category><![CDATA[discord-bot]]></category>
            <dc:creator><![CDATA[Prateek Mishra]]></dc:creator>
            <pubDate>Mon, 03 Aug 2020 06:49:03 GMT</pubDate>
            <atom:updated>2020-08-03T06:49:03.926Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using Discord Bots : DisCal</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*f4xFZfe1p8yaJeFg.png" /><figcaption>courtesy : droplr.com</figcaption></figure><p>Discord bots are automated users that spice up the discord usage experience. There are a lot of bots available out there. Today we’ll talk about DisCal.</p><blockquote><em>DisCal is a powerful Discord bot allowing you to connect Google Calendar to Discord in a seamless fashion. With superior support and features such as custom calendars, events, automated announcements, RSVPs and more, DisCal is the ultimate calendar bot.</em> (<a href="https://www.discalbot.com/">https://www.discalbot.com/</a>)</blockquote><h3>How to use DisCal discord bot 101:</h3><p><strong>Adding the bot to your server:</strong></p><ul><li>Invite the bot to your server from the bot webpage(<a href="https://www.discalbot.com/setup">https://www.discalbot.com/setup</a>).</li><li>Give it all the necessary permission that it asks.</li><li>In no time the bot will be added to your server.</li></ul><p><strong>Using the bot:</strong></p><p>There are certain commands that have to be used to communicate to this bot. The complete list of commands can be found on the official website(<a href="https://www.discalbot.com/commands">https://www.discalbot.com/commands</a>).</p><p>The first step in running this bot is adding a calendar, follow these steps. It is only required the first time to add this to your server.</p><pre>!cal create name_of_calendar <br>!cal description description_of_calendar <br>!cal timezone your_timezone<br>!cal confirm</pre><ul><li>Give any name and write the description of the calendar like what will be put on it etc.</li><li>Enter your time zone. If you don’t know the exact string for your time zone that this bot is expecting. Simply add anything. It will take you to a website. From there you can copy paste the exact time zone string for your time zone. Finally confirm.</li><li>Next step is adding the events. Events are Google Calendar events. When you create an event the members of the channel will be able to copy the events on their google calendar. Whats the Use case? Lets says you have a channel with 1000 users and you’re planning a stream the next weekend. So you will create an event and a message will be posted on the channel. The users can thus add this event to their Google Calendar by tapping on the top of that message. To add an event follow these steps.</li></ul><pre>!event create myevent1<br>!event description Dummy text 1<br>!event start 2018/03/21–14:30:00<br>!event end 2018/03/21–15:30:00<br>!event confirm</pre><p>Enter the time the event will start and end. Note that this time had to be entered in military format. Mentioning the end time is not necessary, If you don’t know the ending time this step can be skipped. Finally confirm the event. This confirms the event and adds a new message to the channel. After this you will get an event confirmation message. Notice that there is an id associated with every event.</p><p>Now as the event has been created, you might want that your users be reminded some time before the event. This bot offers those features too. Follow these steps to add a announcement.</p><pre>!a create<br>!a type specific<br>!a channel general<br>!a hours no_of_hours<br>!a minutes no_of_minutes<br>!a event asdfa34<br>!a confirm</pre><ul><li>First create a new announcement and mention the type of the announcement. Then write the name of the channel who want the announcement to be put in. Now mention the number of hours and minutes before the announcement that you want the users to be reminded. Then add the event of the event this announcement is being created. Finally confirm the changes. Notice that there is an id associated with this announcement.</li><li>Now an announcement has been created. The bot will put a message in the mentioned channel at the time configured. But what if we want it to @ mention certain users. (When you <a href="http://twitter.com/mention">@mention</a> someone they get a notification irrespective of them muting the channel). To add people to the announcement:</li></ul><pre>!a sub dfsda32 everyone</pre><p>Mention the announcement id and the group of people you want to tag. You can also use other specifiers like admin and names of specific people like @prateekmishra etc.</p><p>That’s all for today. There are a lot of other commands that you must refer in order to make yourself comfortable with this bot. Thanks for reading. If you liked this show some ❤</p><blockquote><strong>About Me </strong>:</blockquote><blockquote>I am an enthusiastic developer who finds technology fascinating. Presently, I am trying my hands at competitive programming :)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bad3f10cc477" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nybles/using-discord-bots-discal-bad3f10cc477">Using Discord Bots : DisCal</a> was originally published in <a href="https://medium.com/nybles">Nybles</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to be : Student Entrepreneurs #2]]></title>
            <link>https://medium.com/@prateekmishra-dev/how-to-be-student-entrepreneurs-2-8e044b5df94c?source=rss-53c245d013c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e044b5df94c</guid>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[students]]></category>
            <category><![CDATA[time-management]]></category>
            <category><![CDATA[success]]></category>
            <dc:creator><![CDATA[Prateek Mishra]]></dc:creator>
            <pubDate>Fri, 28 Jun 2019 15:04:50 GMT</pubDate>
            <atom:updated>2019-06-28T15:04:50.651Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to be : Student Entrepreneurs #2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*OMmMH7AGa-Jj-jVvFXRtCQ.png" /><figcaption>Image courtesy: IIIC IIIT Allahabad</figcaption></figure><p>Being a student and a start-up owner is difficult than just being a start-up owner, no doubts in that. That’s because along with the start-up you have to manage studies, projects, labs and “other things” :p. Managing time is a master stroke.</p><p>Today, in the second post of “ How to be : Student Entrepreneurs”, lets talk about time management.</p><ol><li>Don’t spread yourself too thin: Being a student there always will be time limitations. Never take up more work than what you can do. What can be done is handing off some your work to other people. Find local business partners, free lancers or even classmates who are willing to help in order to relieve the full weight of the burden.</li><li>Getting the best of both worlds: Some big project coming up? Semester projects lined up? Ask your professor to use your business as your project. Most professors love incorporating real world tasks! If not possible choose something that matches your domain of expertise or is similar to your business.</li><li>Being a student has some perks too: College gives you a lot of breaks be it the summer break or the winter break or your Diwali holidays which most of the professionals don’t have. Make sure you utilise this. You can use this time to recharge and focus on the company without any added workloads.</li><li>Something you already know: Plan wisely. It is critical that you learn to effectively utilize time. Every single second you spend on this planet must have a purpose.</li></ol><p>Hail, mighty Entrepreneurs! All the Best. If you liked this post show some ❤. Stay tuned for next posts in this series!</p><p><strong>About Me</strong>: I am an Executive at IIIT Allahabad Info Communication and Incubation Center. I love solving real world problems, creative solutions is my where my heart lies!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e044b5df94c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to be : Student Entrepreneurs #1]]></title>
            <link>https://medium.com/@prateekmishra-dev/how-to-be-student-entrepreneurs-1-74f0f2b47e8f?source=rss-53c245d013c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/74f0f2b47e8f</guid>
            <category><![CDATA[successful-entrepreneurs]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[students]]></category>
            <category><![CDATA[success]]></category>
            <dc:creator><![CDATA[Prateek Mishra]]></dc:creator>
            <pubDate>Tue, 25 Jun 2019 11:09:37 GMT</pubDate>
            <atom:updated>2019-06-25T11:09:37.570Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to be : Student Entrepreneurs #1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9-5fyrJbCAWP0ItxRohvtQ.jpeg" /><figcaption>Image Courtesy: pxhere.com</figcaption></figure><p>We all have that moment when we are too pissed off with course lectures to study anything anymore. What pops up next is the idea of a Start-up :p. <br>This is exactly what happens with mature start-ups except that they are just resolute enough to nurture their ideas. Statistically speaking companies like Dell, Dropbox, Facebook, Google were started while their founders were still in college!</p><p>Today, in the first post of “How to be : Student Entrepreneurs” series, lets discuss some common myths college students have regarding launching their start-ups.</p><ol><li>I am just a kid, people won’t take me seriously: Not only students, all businessmen face this issue. People have some kind of hesitation due to lack of experience. Generally speaking, the opposite is true! You are young and zealous, so people actually want to listen to you.</li><li>I don’t have enough time: Hahahaha! Well, jokes apart. If you have time to watch movies, late night hangouts, weekend plans to just lounge around, you have time to work.</li><li>I don’t have enough knowledge to compete with the giants: Frankly speaking, nobody has enough knowledge to launch a successful start-up. You learn along the way! If you just sit there reading books regarding start-ups, you will remain idle indefinitely!</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*1ADIzUg1usRZqOkqKrcdAA.jpeg" /><figcaption>All The Best!</figcaption></figure><p>Hail, mighty Entrepreneurs! All the Best. If you liked this post show some ❤. Stay tuned for next posts in this series!</p><p><strong>About Me</strong>: I am an Executive at IIIT Allahabad Info Communication and Incubation Center. I love solving real world problems, creative solutions is my where my heart lies!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74f0f2b47e8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making use of the Android  AsyncTask class]]></title>
            <link>https://medium.com/nybles/making-use-of-the-android-asynctask-class-30469180a1d2?source=rss-53c245d013c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/30469180a1d2</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[background-process]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[asynctask]]></category>
            <dc:creator><![CDATA[Prateek Mishra]]></dc:creator>
            <pubDate>Wed, 12 Jun 2019 07:05:48 GMT</pubDate>
            <atom:updated>2019-07-01T06:17:28.267Z</atom:updated>
            <content:encoded><![CDATA[<h3>Making use of the Android AsyncTask class</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HO7f7L4NLLY_mCVd" /><figcaption>Image from: 9to5google.com</figcaption></figure><p>No matter where your attachments lie, we all hate lag on devices with a vengeance. Android devices are regular victims of unspeakable lag although there are some good practices that developers must follow for smooth functioning apps.</p><p>Let’s say you need a feature implementing some networking, file and database access, or complex calculations. These are heavy operations and will definitely result in an unsought anguish. Users tolerate some pauses, but a frozen app just drives them nuts!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*KSxleFXNmfMZ7tKH.jpg" /></figure><p>All android applications have a main thread, a thread is some instructions executing independently. This thread is responsible for the user interface. If complex code is executed on this thread it may get held up and result in the app slowing down, freezing or even crashing entirely! It is therefore recommended to execute lengthy instructions in background threads. The simplest way to perform background operations is the AsyncTask class.</p><p>This class allows you to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers. An asynchronous task is defined by a computation that runs in the background thread and whose result is published on the UI thread. But how does this class communicate with the activity this is put on?</p><p>To use Async Task, simply declare a new class, make it extend the AsyncTask class with the 3 parameters as discussed below.</p><pre>public class Asynctaskexample extends AsyncTask&lt;Integer, Integer, String&gt;{<br>    @Override<br>    protected void onPreExecute() {<br>        super.onPreExecute();</pre><pre>    }<br><br>    @Override<br>    protected String doInBackground(Integer... integers) {<br>        return null;</pre><pre>    }<br><br><br>    @Override<br>    protected void onProgressUpdate(Integer... values) {<br>        super.onProgressUpdate(values);</pre><pre>    }<br><br>    @Override<br>    protected void onPostExecute(String s) {<br>        super.onPostExecute(s);</pre><pre>    }<br>}</pre><p>An asynchronous task is defined by 3 generic types, called Params, Progress and Result (here Integer, Integer and String respectively). Any class that extends AsyncTask has these parameters. Params is what the user passes into this Async task class, this value goes into the doInBackground method. It may be a url or the numbers for large calculation, any data which has to be processed in the background. Progress is the variable used to keep track of the progress. For example this may be the index of some large loop which can be used to show progress using some progress dialogue. Result is what is returned from the doInBackground method to the onPostExecute method eg some string or anything else. As can be seen an Async Task has the following four major methods, override the following four methods.</p><ol><li><strong>onPreExecute</strong>: a step used to set up the task. Here execute something that you want to be executed before the lengthy process.</li><li><strong>doInBackground</strong>: a step used to perform the actual task. This creates a background thread and does the job.</li><li><strong>onProgressUpdate</strong>: a step used to update the current progress status of the task that is being performed in doInBackground.</li><li><strong>onPostExecute</strong>: once doInBackground finishes executing the task, this step delivers the result back to the main UI thread and stops the AsyncTask process</li></ol><p>It’s important to note that the onPreExecute and the onPostExecute methods run on the UI thread i.e. they do not run in the background. doInBackground runs on a new thread in the background and you cannot update any graphics in the interface that the user sees, however the onProgressUpdate can be used a rescue.</p><p>That brings us to an end in exploring the AsyncTask. Hope you guys learnt something and enjoyed this too! If you liked this blog show some ❤, stay tuned for more awesome content.</p><p>Interested in learning more about AsyncTask class and how background threads work? Check out these Android developer resources.</p><ol><li><a href="https://developer.android.com/reference/android/os/AsyncTask.html">https://developer.android.com/reference/android/os/AsyncTask.html</a></li><li><a href="https://www.udemy.com/learn-android-application-development-y/learn/lecture/7811358#overview">https://www.udemy.com/learn-android-application-development-y/learn/lecture/7811358#overview</a></li></ol><p><strong>About Me</strong>: I am an Android developer at IIIT-Allahabad. I love solving real world problems, creative solutions is my where my heart lies!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30469180a1d2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nybles/making-use-of-the-android-asynctask-class-30469180a1d2">Making use of the Android  AsyncTask class</a> was originally published in <a href="https://medium.com/nybles">Nybles</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>