Android 跳轉到應用市場,評價App

                    try {
                            var uri = Uri.parse("market://details?id=$packageName")
                            var intent = Intent(Intent.ACTION_VIEW, uri)
                            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                            startActivity(intent)
                        } catch (e: Exception) {
                            ToastDialog.error("您的手機未安裝應用市場")
                            e.printStackTrace()
                        }

上面是kotlin的寫法哦

記錄:

安卓如何跳轉到應用市場

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章