Commit d9517905 authored by wanglei's avatar wanglei

...

parent 8b511dac
......@@ -14,6 +14,8 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<application
android:name=".MyApplication"
android:allowBackup="true"
......
......@@ -86,9 +86,11 @@ class MediaBrowserActivity : BaseActivity<ActivityMediaBrowserBinding>() {
this.viewDocumentAction(bean.uri, bean.mimeType)
}
if (tittle == "APK") {
LogEx.logDebug(TAG, "APK ${bean.uri}")
try {
this.installAokAction(bean.uri)
} catch (e: Exception) {
LogEx.logDebug(TAG, "APK $e")
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val intent = Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES)
launcher.launch(intent) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment