mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-19 13:41:26 +00:00
add info about permissions on api level 30 for resolveActivity
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
b97e670253
commit
5914f01524
@ -281,12 +281,14 @@ public class MagicPreviewMessageViewHolder extends MessageHolders.IncomingImageM
|
||||
}
|
||||
}
|
||||
|
||||
private boolean canBeHandledByExternalApp(String mimetype, String fileName){
|
||||
private boolean canBeHandledByExternalApp(String mimetype, String fileName) {
|
||||
String path = context.getCacheDir().getAbsolutePath() + "/" + fileName;
|
||||
File file = new File(path);
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setDataAndType(Uri.fromFile(file), mimetype);
|
||||
|
||||
// TODO resolveActivity might need more permissions starting with android 11 (api 30)
|
||||
// https://developer.android.com/about/versions/11/privacy/package-visibility
|
||||
return intent.resolveActivity(context.getPackageManager()) != null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user