Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear data in android using coding

Tags:

android

I want to clear data through coding for my application. Right now I am Clearing Data from Settings->Applications->Manage Application->My Application->Clear Data.

But I want to do it through coding. Please help me if any one have answers.

like image 714
PrashantAdesara Avatar asked Mar 17 '26 19:03

PrashantAdesara


1 Answers

Use Context's getFilesDir method to get the directory, and then delete all directory and data as explained here.

like image 56
MByD Avatar answered Mar 19 '26 10:03

MByD



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!