Moving to SD Card actually copies the apk in /data/app folder to SD card. I wanted to do the same from my code.
I tried this but it failed as canWrite()
, setWriteable(true)
and delete()
returns false
File apkFile = new File(info.activityInfo.applicationInfo.sourceDir);
apkfile.delete();
Is it at all possible to delete/move the apk to sd Card (and not copy it)?
FYI: installLocation
would not help me. So, I had to take the above approach.