Skip to content

AppUtils.installApp(uri)方法建议验证一下 #1406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jingzz1 opened this issue Dec 24, 2020 · 0 comments
Open

AppUtils.installApp(uri)方法建议验证一下 #1406

jingzz1 opened this issue Dec 24, 2020 · 0 comments
Assignees
Labels

Comments

@jingzz1
Copy link

jingzz1 commented Dec 24, 2020

content开头的才能安装,file开头的要先转成相对路径,类似这样

    val installUri = when(uri.scheme){
        ContentResolver.SCHEME_CONTENT ->uri
        ContentResolver.SCHEME_FILE ->UriUtils.file2Uri(File(uri.path))
        else -> null
    } ?: return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants