android - 是否可以从 React Native 重定向到本机设置页面以进行订阅管理?
问题描述
我正在尝试重定向到 React Native 上的订阅页面。
我在网上找到的如何做到这一点的代码是这样的:
Linking.openURL(
"https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions"
);
对于 iOS
和这个:
Linking.openURL(
"https://play.google.com/store/account/subscriptions?package=YOUR_PACKAGE_NAME&sku=YOUR_PRODUCT_ID"
);
对于安卓。
我还无法测试 Android 链接,因为我还没有创建相关的包名称或产品 ID,但我尝试了 iOS 链接,它没有重定向到设置/订阅管理页面。
我得到的只是带有 iOS 链接的错误消息(在物理设备上 - 以及在模拟器中) - 即使我在物理设备上完全登录了我的 Apple 帐户:
pings metrics dialogIdMZFinance.ManageSubscriptionsLoginRequired messageSign in to manage subscri messageCode5074 options Manage Subscriptions CancelactionUrlbuy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptionseventTypedialog failureType5074 customerMessageSign in to manage subscriptions. m-allowed dialog kindauthorization m-allowed messageSign in to manage subscriptions.explanationEnter your Apple ID and password and click Manage Subscriptions.defaultButtonok okButtonStringManage Subscriptions okButtonActionkindGotourlhttps://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/com.apple.jingle.app.finance.DirectAction/manageSubscriptionscancelButtonStringCancel initialCheckboxValue cancel-purchase-batch
我希望用户能够单击一个按钮并被发送到该页面(以防他们想取消订阅)。
有没有办法做到这一点?
解决方案
显然新的网址是
https://apps.apple.com/account/subscriptions
我会在确认 Android 链接后更新。
推荐阅读
- powershell - Microsoft Graph PowerShell access permissions - 401 Unauthorized
- android - 如何正确修改android x86 system.img?
- php - 无法从本地网络上的 Web 服务器访问 localhost
- java - 使用 mockito 在单个测试方法中模拟多个 resttemplate
- java - 如何为构造函数制作测试用例
- c - 有人能告诉我为什么我的时间不会打印实际时间吗?
- asp.net-core - 如何使用登录页面保护 ASP.NET Core 2.2 Web Api Swagger?
- python - In SQL select query, remove first and last 0 values but not in the middle
- docker - Docker pull image without ssl in Kubernetes with docker private registry
- r - 密度曲线的高斯反卷积