Programmatically find whether installing from unknown sources is allowed

后端 未结 3 1335
慢半拍i
慢半拍i 2020-12-30 04:38

I need to find whether the current Android device allows to install apps from sources other than the market. This option appears in the settings UI under Applications named

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-30 05:24

    you can request the package manager to tell you

     applicationContext.packageManager.canRequestPackageInstalls()
    

提交回复
热议问题