Android APK 文件自动安装
生活随笔
收集整理的這篇文章主要介紹了
Android APK 文件自动安装
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、權限
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
?
2、方法
Uri uri = Uri.fromFile(new File("/sdcard/temp.apk")); //這里是APK路徑 Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(uri,"application/vnd.android.package-archive"); startActivity(intent);?
總結
以上是生活随笔為你收集整理的Android APK 文件自动安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: DownloadManager 的使用
- 下一篇: Unable to execute de