Forum Discussion
VR-cgapk
10 months agoHonored Guest
v74 system firmware cannot install APK
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
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 6 days ago
- 5 months ago
- 2 years ago