簡體   English   中英

TWA 中未定義的 getDigitalGoodsService

[英]Undefined getDigitalGoodsService in TWA

嘗試將 DigitalGoodsAPI 集成到 Playstore 上的 PWA 應用程序中。 window.getDigitalGoodsService 在 android 應用程序的內部測試期間顯示為未定義。

至今:

  1. 我已經注冊了 orgin-trials,在 PWA 頁面中添加了元標記。
  2. 更改了引用 android 應用程序的清單,
  3. 在 Bubblewrap 期間在應用程序中啟用播放計費
  4. DigitalAssetLinks json 有效
  5. 在 Google play 上創建了一個應用程序並創建了它的應用程序內產品
  6. 通過 Google Play 鏈接到內部測試員進行測試。

window.getDigitalGoodsService 仍然顯示為未定義,嘗試重建多次。 我錯過了什么?

最后,我能夠解決這個問題。 問題是 Digital Goods API,您需要使用 DigitalGoodsAPI V2 並且必須驗證令牌。 在此處驗證令牌: https://googlechrome.github.io/OriginTrials/check-token.html

在 PWA 的元標記放置中。

還要確保,令牌狀態顯示為成功: https://prnt.sc/26he938 <--這是幫助我解決問題的主要線索。

再見。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM