gpt4 book ai didi

android - 有没有办法从应用程序内兑换促销代码?

转载 作者:行者123 更新时间:2023-12-02 09:40:23 27 4
gpt4 key购买 nike

从今年年初开始,可以为应用使用促销代码:Create promotions

如页面In-app Promotions所述,促销代码也可以在应用程序内兑换。

它还说:“您还可以将SKU保留在Play商店之外,因此获取该商品的唯一方法是输入该SKU的促销代码。”

这就是我想要的应用内商品:仅允许用户通过在应用内输入促销代码来获得应用内商品,并且不允许用户花钱购买。

如何才能做到这一点?

最佳答案

通过分析Play商店应用,我发现当前版本会打开“Redeem your code”对话框,其意图如下:

try {
final Uri redeemUri = Uri.parse("https://play.google.com/redeem");
final Intent redeemIntent = new Intent(Intent.ACTION_VIEW, redeemUri);
startActivity(redeemIntent);
} catch (android.content.ActivityNotFoundException e) {
// Play Store app is not installed
}

请注意,这在任何新版本的Play商店中都可能会更改。

关于android - 有没有办法从应用程序内兑换促销代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35999817/

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