cancel
Showing results for 
Search instead for 
Did you mean: 

v74 system firmware cannot install APK

VR-cgapk
Honored Guest
Requesting help, I previously developed an android file manager to install APK files within the device, but after updating the v74 firmware in Quest 3, I can't install APK files within the device, previously I was calling com.android.packageinstaller to install APKs through the intent method, but now I can't install APKs. How can I fix it?
 
This is my call function:

function install(path, uri)
local intent = Intent(Intent.ACTION_VIEW)
local ext = "apk"
if path:find("^/sdcard/Android/data") or path:find("^/storage/emulated/0/Android/data") then
uri = getDocumentUri(path)
end
if uri == nil then
local file = File(path)
local filename = file.name
ext = filename:match(".+%.(.+)$")
if Build.VERSION.SDK_INT >= 24 then
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
uri = FileProvider.getUriForFile(activity, packageName, file)
else
uri = Uri.fromFile(file)
end
else
if Build.VERSION.SDK_INT >= 24 then
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
end
end
intent.setDataAndType(uri, MimeTypeMap.getSingleton().getMimeTypeFromExtension(ext))
intent.setPackage("com.android.packageinstaller")
activity.startActivity(intent)
end

0 REPLIES 0