作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
从今年年初开始,可以为应用使用促销代码: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
}
关于android - 有没有办法从应用程序内兑换促销代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35999817/
我是一名优秀的程序员,十分优秀!