Open MistryHiral opened 5 years ago
this also affects me
seems like this repo is dead 😞
@MistryHiral @jawand I fixed the issue with this way. In "android/src/main/java/in/mertcan/advancedshare/shareintents/Base.java" change this:
if (checkKey("url")) {
...
}
to
if (checkKey("url")) {
if (fileHelper.isFile()) {
List<ResolveInfo> resInfoList = registrar.context().getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
for (ResolveInfo resolveInfo : resInfoList) {
String packageName = resolveInfo.activityInfo.packageName;
registrar.context().grantUriPermission(packageName, fileHelper.getUri(), Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
}
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.putExtra(Intent.EXTRA_STREAM, fileHelper.getUri());
intent.setType(fileHelper.getType());
}
}
only first time share, the app is launched. When I try the second time, I am getting an error (in WahtsApp share ) 'this file format not support'. And i am using AdvancedShare.generic() method