当前位置: 首页>>代码示例>>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;未经允许,请勿转载。