安装软件
2023-01-24 09:16:15 最后更新
call(null,"mlua","xiaoyi.instalApk","/storage/sdcard0/AppProjects/MyApp2/app/build/bin/app.apk")
//以下代码放到模块中
--请标明"摘自@枭燚QQ1612108278的源码"请尊重他人智力劳动成果,谢谢
function instalApk(path)
import "android.content.Intent"
import "android.net.Uri"
intent = Intent(Intent.ACTION_VIEW)
path="/sdcard/a.apk"
intent:setDataAndType(Uri:parse("file://"..path), "application/vnd.android.package-archive") 
intent:addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
activity:startActivity(intent)
end