First of all, get the apk file from its path using this code
final PackageManager pm = getPackageManager();
PackageInfo packageInfo = null;
try {
packageInfo = pm.getPackageInfo("PACKAGE NAME HERE", PackageManager.GET_META_DATA);
} catch (NameNotFoundException e) {
e.printStackTrace();
}
File file = new File(packageInfo.applicationInfo.sourceDir);
Uri uri = Uri.fromFile(file);
source
share