Auto Clear or a Widget to Clear Whats App Chat History

Some people like to keep their Chat history clean, WhatsApp is one of those apps that provides a way to clear all conversations easily. But still its tedious to go to Settings and clicking on Clear All Conversations. Hence I decided to create a little script to automatically clear WhatsApp chat history.

Requirements:

1. Tasker App. (Paid)

2. SQlite Installer for Root.

3. Rooted Android.

You can either let Tasker automatically clear the history every day/every hour/every second or create a small widget which will clear the history on one click.

First install both the above mentioned Apps on your Android. SQlite installer is needed to install the Sqlite binary in your Rooted android, this will help us manage WhatsApp’s database. Tasker is the best automation app available, there are thousands of possibilities with that simple app. One of which we will be using here.

Overview.

Auto Clear History.

We will create a Tasker Profile to run a Shell script every day at 12AM. The shell script will invoke a command to delete all the contents of messages and chat_list tables in the WhatsApp database named msgstore.db.

Widget.

We will create a Tasker widget with the same shell script but instead of having it run at 12AM everyday, we create the one click widget which when pressed will run the shell script and clear the database.

Hope its clear.

Auto Clear History.

Step 1. Open your File Manager and go to SD Card > Create a new folder named sql > Open the folder and create a new file in it. Paste the following contents in the file and save it as wadel.sql

Delete from messages;
Delete from chat_list;

Step 2. Now Open Tasker > Create Profile (the big button) > Time > Uncheck the ‘Repeat’ checkbox and Check the ‘To’ checkbox.

Step 3. Set what ever time you want in the ‘From’ field and set the same in the ‘To’ field. For example 00:00 in From & To field to run the script at Midnight.

Step 4. Go back > New Task > Click on the big button > Script > Run Shell.

Step 5. In the command field type the following:

sqlite3 /data/data/com.whatsapp/databases/msgstore.db < /sdcard/sql/wadel.sql

Check the box next to Use Root.

That is it. Now when ever the clock hits 00:00, Tasker will run the Task you just created which will clear your Chat History.

Create a Widget to Clear WhatsApp History.

Step 1. Same as above.

Step 2. Open Tasker > Go to the Tasks tab > Create a New Task (big button) > Enter a name for it.

Step 3. Click on the big button > Script > Run Shell.

Step 4. In the command field type the following:

sqlite3 /data/data/com.whatsapp/databases/msgstore.db < /sdcard/sql/wadel.sql

Check the box next to Use Root.

Step 5. Go to your Homescreen > Create a new widget > Choose the Tasker widget named ‘Task’ > Select the Task you just created.

Step 6. You will be asked to choose an icon, select one and go back.

Now you have your widget, to clear your WhatsApp history just click on the Widget any time.

Hope you liked this guide, make sure you share it with your friends on Facebook, Twitter and Google Plus.

Continue reading here: Facebook Chat Allows Using Anyone’s Profile Picture as Emoticon

Was this article helpful?

0 0