gpt4 book ai didi

android - 直接从我们的 Android 应用打开 Play 商店评级屏幕

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:08:46 24 4
gpt4 key购买 nike

是否可以直接打开特定应用的Play商店应用的评级屏幕对话框?

最佳答案

试试这个..

Uri uri = Uri.parse("market://details?id=" + context.getPackageName());
Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
try {
startActivity(goToMarket);
} catch (ActivityNotFoundException e) {
Toast.makeText(context, "Couldn't launch the market", Toast.LENGTH_LONG).show();
}

或者

Intent intent = new Intent(Intent.ACTION_VIEW);                     
intent.setData(Uri.parse("market://details?id=Your Main Package Name"));
startActivity(intent);

关于android - 直接从我们的 Android 应用打开 Play 商店评级屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19263768/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com