簡體   English   中英

如何在Android inApp結算中將試用購買方式更改為實際購買方式?

[英]How to change the mode of trial purchases to real purchases in Android inApp billing?

我的應用程序具有InApp Billing功能,並且我在計費模式下使用Android In-App Billing v3進行計費,效果很好,但是我不知道如何進入生產模式並進行實際購買。

我的代碼如下:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    bp = new BillingProcessor(this, getResources().getString(R.string.pubKey), this); //R.string.pubKey contain my license key from play.console
    bp.initialize();
    purchaseBtn = findViewById(R.id.btn_purchaseItem);
    purchaseBtn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            bp.purchase(MainActivity.this, "get_10_coins", getResources().getString(R.string.pubKey));//This product id is registered and active in the play console.
            bp.consumePurchase("get_10_coins"); 
        }
    });
}

當我單擊購買應用程序時,將顯示以下內容: 在此處輸入圖片說明

但是我無法真正購買商品, 如何從試用模式切換到生產模式?

在Google Play控制台>>設置>>管理測試人員中刪除您的電子郵件

暫無
暫無

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

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