Skip to content

华为m2 android:5.1.1 打开APK失败 #100

Closed
@jisx

Description

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); String packageName = context.getPackageName(); Uri uri = FileProvider.getUriForFile(context, packageName + ".fileProvider", new File(filePath)); intent.setDataAndType(uri, typeString); } else { intent.setDataAndType(Uri.fromFile(file), typeString); }

修改 Build.VERSION.SDK_INT > Build.VERSION_CODES.M

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions