Saturday , November 17 2018
Home / Android / How to clear cache data in your Android application Programmatically ?

How to clear cache data in your Android application Programmatically ?

clear_data

To do it programmatically you need to remove user data from application dir.

You have to create a class “MyApplication” which extends with “Application” class. In this class by using this code you can remove user data from application dir.

1). Declare MyApplication class in manifest file as shown below:

2). MyApplication class:

 

About admin

Check Also

Android Activity Launch Modes

Launch mode is an instruction for Android OS which specifies how the activity should be ...

Leave a Reply