I would like to delete the cache and all details of previous versions of an application programmatically when I am installing a new version of an application. How do you do this?
Asked
Active
Viewed 1,130 times
0
-
1see this http://stackoverflow.com/a/9622867/1329126 – Sankar V Apr 04 '13 at 14:05
-
@LanceRoberts hahahaaaaaaaa – Apr 04 '13 at 14:10
1 Answers
3
First determine the current application is old version, then delete it via:
Uri packageURI = Uri.parse("package: your.application.package");
Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI);
startActivity(uninstallIntent);

Ali
- 2,012
- 3
- 25
- 41