Version: 6000.3
语言: 中文
谷歌游戏
实施商店

亚马逊应用商店和亚马逊地下商店

扩展功能

亚马逊用户 ID

要获取其他 Amazon 服务的当前 Amazon 用户 ID,请使用IAmazonExtensions:

public void OnInitialized
    (IStoreController controller, IExtensionProvider extensions)
{
    string amazonUserId = 
        extensions.GetExtension<IAmazonExtensions>().amazonUserId;
    // ...
}

亚马逊的沙盒测试

要使用亚马逊的本地沙盒测试应用,请使用IAmazonConfiguration扩展配置:

var builder = ConfigurationBuilder.Instance(
StandardPurchasingModule.Instance());
// Define your products.
builder.AddProduct("someConsumable", ProductType.Consumable);
// Write a product description to the SD card 
// in the appropriate location.
builder.Configure<IAmazonConfiguration>()
    .WriteSandboxJSON(builder.products);

使用此方法将产品描述写入 SD 卡时,请在测试应用的清单中声明写入外部存储的 Android 权限:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 

如果适用,请在发布前删除此额外权限。

Amazon Sandbox 现已设置为本地测试。有关更多信息,请参阅 Amazon 的 App Tester 文档

谷歌游戏
实施商店