コード例 #1
0
  private void startProxyPurchaseActivity(String sku, boolean inapp, String developerPayload) {

    if (UnityPlugin.instance().getHelper() == null) {
      Log.e(UnityPlugin.TAG, "OpenIAB UnityPlugin not initialized!");
      return;
    }

    sendRequest = true;
    Intent i = new Intent(UnityPlayer.currentActivity, UnityProxyActivity.class);
    i.putExtra("sku", sku);
    i.putExtra("inapp", inapp);
    i.putExtra("developerPayload", developerPayload);

    // Launch proxy purchase Activity - it will close itself down when we have a response
    UnityPlayer.currentActivity.startActivity(i);
  }