當前位置: 首頁>>代碼示例>>Java>>正文


Java PurchaseSystem類代碼示例

本文整理匯總了Java中com.badlogic.gdx.pay.PurchaseSystem的典型用法代碼示例。如果您正苦於以下問題:Java PurchaseSystem類的具體用法?Java PurchaseSystem怎麽用?Java PurchaseSystem使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PurchaseSystem類屬於com.badlogic.gdx.pay包,在下文中一共展示了PurchaseSystem類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setupPurchaseManager

import com.badlogic.gdx.pay.PurchaseSystem; //導入依賴的package包/類
public void setupPurchaseManager()
{
    PurchaseSystem.onAppRestarted();
    if (PurchaseSystem.hasManager())
    {
        PurchaseManagerConfig purchaseManagerConfig = getPurchaseManagerConfig();
        PurchaseSystem.install(new PurchaseObserver(), purchaseManagerConfig);
    }
}
 
開發者ID:overengineering,項目名稱:space-travels-3,代碼行數:10,代碼來源:Services.java

示例2: purchaseSku

import com.badlogic.gdx.pay.PurchaseSystem; //導入依賴的package包/類
public void purchaseSku(String sku)
{
    if (PurchaseSystem.hasManager())
    {
        PurchaseSystem.purchase(sku);
    }
}
 
開發者ID:overengineering,項目名稱:space-travels-3,代碼行數:8,代碼來源:Services.java

示例3: onActivityResult

import com.badlogic.gdx.pay.PurchaseSystem; //導入依賴的package包/類
@Override
public void onActivityResult (int requestCode, int resultCode, Intent data) {
	// forward to corresponding Android IAP-system
	PurchaseManager manager = PurchaseSystem.getManager();
	if (manager != null) {
		try {
			// this might fail which is OK! --> some implementations will not require this...
			Method method = manager.getClass().getMethod("onActivityResult", int.class, int.class, Intent.class);
			method.invoke(manager, requestCode, resultCode, data);
		} catch (Exception e) {
			Log.d(TAG, "Failed to invoke onActivityResult(...) on purchase manager.", e);
		}
	}
}
 
開發者ID:libgdx,項目名稱:gdx-pay,代碼行數:15,代碼來源:IAP.java

示例4: AndroidGooglePlayPurchaseManager

import com.badlogic.gdx.pay.PurchaseSystem; //導入依賴的package包/類
@SuppressWarnings("unused") // Unit tested with reflection. (as in IAP.java)
public AndroidGooglePlayPurchaseManager(Activity activity,
                                        AndroidFragmentApplication application,
                                        int activityRequestCode) {

    PurchaseResponseActivityResultConverter converter = new PurchaseResponseActivityResultConverter(this);
    AsyncExecutor executor = new NewThreadSleepAsyncExecutor();
    ApplicationProxy.FragmentProxy proxy = new ApplicationProxy.FragmentProxy(activity, application);
    googleInAppBillingService = new V3GoogleInAppBillingService(proxy, activityRequestCode, converter, executor);

    PurchaseSystem.setManager(this);
}
 
開發者ID:libgdx,項目名稱:gdx-pay,代碼行數:13,代碼來源:AndroidGooglePlayPurchaseManager.java

示例5: restorePurchase

import com.badlogic.gdx.pay.PurchaseSystem; //導入依賴的package包/類
public void restorePurchase()
{
    PurchaseSystem.purchaseRestore();
}
 
開發者ID:overengineering,項目名稱:space-travels-3,代碼行數:5,代碼來源:Services.java

示例6: dispose

import com.badlogic.gdx.pay.PurchaseSystem; //導入依賴的package包/類
@Override
public void dispose () {
	// dispose the purchase system
	PurchaseSystem.dispose();
}
 
開發者ID:libgdx,項目名稱:gdx-pay,代碼行數:6,代碼來源:IAP.java


注:本文中的com.badlogic.gdx.pay.PurchaseSystem類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。