Version: 5.6
针对 Windows 应用商店进行配置
Samsung Galaxy IAP 配置

Configuration for the Amazon Appstore and Amazon Underground stores

简介

This guide describes the process of setting up the Amazon Appstore and the Amazon Underground stores for use with the Unity in-app purchasing (IAP) system. This includes establishing the digital records and relationships that are required to interact with the Unity IAP API, setting up an Amazon developer account, and testing and publishing a Unity IAP application.

As with other platforms, the Amazon stores allow for the purchase of virtual goods and managed products. These digital products are identified using a string identifier and an additional type to define durability, with choices including subscription (capable of being subscribed to), consumable (capable of being rebought), and non-consumable (capable of being bought once). Note that the Amazon Underground store does not support subscription.

Amazon has established two app stores for both non-FireOS Android devices as well as FireOS, set up to support free and paid versions of the same app:

  • The Amazon Appstore is provided to support paid and free apps.
  • The Amazon Underground store is designed to give developers a payment schedule for eligible free apps. The Underground store also has stringent requirements for apps based on pay per time spent in the application. More details can be found in the program overview and details documents.

跨店实现 IAP

使用共享的 Android Bundle ID 同时发布到多个 Android IAP 商店(例如 Amazon 和 Google)时,会出现跨店安装问题。请参阅有关 Android 应用内购 (IAP) 商店的跨店安装问题的页面以了解更多信息。

Amazon Appstore and Amazon Underground stores

准备开始

  1. Set up an Amazon developer account at the Amazon developer portal. A single developer account may be used to set up both stores.
  2. Determine which store is most appropriate for your app. Take note of your game’s product identifiers, and study the differences in the types of digital items that are acceptable for the different stores. For example, the identifier for consumable coins will be used in the Amazon store rather than the Amazon Underground store.
  3. Write a game implementing the Unity IAP API. For reference, see the guides on Unity IAP initialization and Integrating Unity IAP in your game. Use the Amazon Appstore for apps with no restrictions on IAP items. To create a free version of your app for the Amazon Underground store, follow Amazon’s guidelines.

设备设置

  1. For non-FireOS Android devices, download and install the Amazon Appstore. Additionally, if you plan on an Underground version of your app, download and install the Amazon Underground store.

  2. On FireOS devices, the Amazon Appstore and the Amazon Underground apps should come pre-installed. If your FireOS device doesn’t have the Amazon Underground store installed, download and install it from the Amazon website.

  3. Once you have installed Amazon Appstore (and Amazon Underground, if desired), install the Amazon App Tester.

    1.设置 Android SDK 1.要安装并查看 Android 调试日志,请确保已安装 Android SDK。从 Android SDK 安装页面下载相关命令行工具包,然后将其解压缩到您的计算机。 1.确认 SDK 能通过命令行 adb 工具识别连接的 Android 设备。例如:

|[11:07:01] user@laptop:/Applications | $ adb devices
List of devices attached
00DA0807526300W5    device

Unity 应用程序设置

为了使用 Unity 的 IAP,需要执行几个设置步骤。

1.导入 Unity IAP 插件。请参阅设置 Unity IAP 以了解更多信息(Unity 5.3 或更高版本)。 1. Set the IAP target store. You should already have an Android app set up. Set the target store using Unity IAP’s Window > Unity IAP > Android > Target Amazon menu item. This is used to toggle between Google and Amazon stores.

![](../uploads/Main/AmazonConfiguration-TargetAmazonMenu.png) 

或者,请调用 API:

UnityPurchasingEditor.TargetAndroidStore(AndroidStore.AmazonAppStore)

Amazon Appstore and Amazon Underground setup

在准备使用 Amazon 应用商店时,无需下载 Amazon 的本机 IAP 插件,因为它提供的所有功能都已包含在 Unity 的 IAP 服务中。

1.添加您的应用程序。从 Amazon Developer Portal 中选择 Add a New App

![](../uploads/Main/AmazonConfiguration-AddNewApp.png) 

1.设置您的目录。使用您事先准备的商品描述,通过 Amazon Developer Portal 将商品添加到 Amazon 目录。导航至应用程序的页面,然后找到 In-App Items 部分。使用 Add a ConsumableAdd an EntitlementAdd a Subscription 按钮来设置您的目录。

![](../uploads/Main/AmazonConfiguration-SetUpCatalog.png) 
针对 Windows 应用商店进行配置
Samsung Galaxy IAP 配置
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961