android軟件版本升級時,安裝新版本後,沒有出現安裝成功界面或直接回到桌面

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //android4.0以後需要添加這行代碼
intent.setDataAndType(Uri.parse(filePath), "application/vnd.android.package-archive");
startActivity(intent);

發佈了255 篇原創文章 · 獲贊 44 · 訪問量 103萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章