gpt4 book ai didi

flutter - 如何在Flutter中实现应用内购买订阅?

转载 作者:IT王子 更新时间:2023-10-29 06:33:36 39 4
gpt4 key购买 nike

我想在我的 Flutter 应用程序中为 iOS 和 Android 设备提供自动续订订阅。用户可以订阅 1 个月。

目前还没有官方维护的应用内购买插件。但是 Flutter 中有很多关于 In-App Purchases 的插件。

哪个最好?如何实现?这些安全吗?

最佳答案

==== UPDATE from 11.03.2020

Hi, I can see this post still reading by people who looking for amethod of how to work with subscription in Flutter. During 2019 I madetwo apps with thousands install where users can buy a renewablesubscription on the 2 platforms. Until February 2020 I used for thispackage from Flutter team https://pub.dev/packages/in_app_purchase,BUT - there is no way to get info about the user to unsubscribe iniOS. This is not the plugin issue, but the iOS approach for theprocess. We should implement our own backend for security reasons (bythe way Google also recommends to do the same, but still left the wayto check the state directly from the app).

So, after some researches, I found guys who made backend and pluginand it is free until you have less than 10 000 USD revenue for themonth. https://www.revenuecat.com/https://pub.dev/packages/purchases_flutter

I've implemented this plugin in my apps and it works like a charm.There is some good approaches that allow you to get a subscriptionstate at any point in the app. I'm going to make an example andarticle, but not sure about the timing.

==== UPDATE from 03.10.2019

I recommend using new package from Flutterteam https://pub.dev/packages/in_app_purchase

The example with code is here https://github.com/flutter/plugins/tree/master/packages/in_app_purchase/in_app_purchase/example

With this plugin I successfully implemented payments and recursivesubscriptions to Android and iOS simultaneously. With the old package Ihad some minor issues.

你可以使用不错的插件flutter_inapp_purchase

我已经将它用于我开发的应用程序并且运行良好。您可以使用我关于如何使用订阅的示例 - github有一个完整的工作示例 - 当你运行它时,你应该得到屏幕

enter image description here

(不要忘记在模拟器中登录 Google play,否则您会看到“不支持应用内结算版本 3”)

关于flutter - 如何在Flutter中实现应用内购买订阅?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53880390/

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