File oldFile = new File(dirPath+"/"+packageName+".apk");
Log.e("Path ",oldFile.getPath());
my log returns this:
E/Path: /storage/emulated/0/Android/data/com.bazibaaz.app/files/com.YGD.GoldenBasket.apk
i have this file exactly on the path shown in the log, but this code:
oldFile.exists()
returns false!
i have permissions to read and write:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
here is the picture of file (to prove its existence):
( path: internal storage/storage/emulated/0/Android/data/com.bazibaaz.app/files/com.YGD.GoldenBasket.apk)