当前位置: 首页>>代码示例>>Java>>正文


Java BillingRequests类代码示例

本文整理汇总了Java中org.solovyev.android.checkout.BillingRequests的典型用法代码示例。如果您正苦于以下问题:Java BillingRequests类的具体用法?Java BillingRequests怎么用?Java BillingRequests使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BillingRequests类属于org.solovyev.android.checkout包,在下文中一共展示了BillingRequests类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: consume

import org.solovyev.android.checkout.BillingRequests; //导入依赖的package包/类
private void consume(final Purchase purchase) {
    mCheckout.whenReady(new Checkout.EmptyListener() {
        @Override
        public void onReady(@Nonnull BillingRequests requests) {
            requests.consume(purchase.token, makeRequestListener());
        }
    });
}
 
开发者ID:RajneeshSingh007,项目名称:MusicX-music-player,代码行数:9,代码来源:DonationActivity.java

示例2: purchase

import org.solovyev.android.checkout.BillingRequests; //导入依赖的package包/类
private void purchase(@NonNull final Sku sku) {
    if (DEBUG) Log.d(TAG, "Purchasing " + sku.toString() + "...");
    mCheckout.whenReady(new Checkout.ListenerAdapter() {
        @Override
        public void onReady(@NonNull BillingRequests requests) {
            requests.purchase(sku, null, mCheckout.getPurchaseFlow());
        }
    });
}
 
开发者ID:shaobin0604,项目名称:HeartbeatFixerForGCM,代码行数:10,代码来源:DonateDialogFragment.java

示例3: onOptionsItemSelected

import org.solovyev.android.checkout.BillingRequests; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    final int itemId = item.getItemId();

    if (itemId == R.id.action_info) {
        Intent intent = new Intent(this, InfoActivity.class);
        intent.putExtra(IssueActivity.MODAL_URL, getString(R.string.asset_url_info));
        startActivity(intent);
        return true;
    } else if (itemId == R.id.action_settings) {
        Intent settingsIntent = new Intent(this, SettingsActivity.class);
        startActivity(settingsIntent);
        return true;
    } else if (itemId == R.id.action_refresh) {
        swipeRefreshLayout.setRefreshing(true);
        if(!issueCollection.isLoading()) {
            issueCollection.reload();
        }
        return true;
    } else if (itemId == R.id.action_subscribe) {

        if(issueCollection.getSubscriptionSku() != null) {
            final ActivityCheckout checkout = this.getCheckout();
            checkout.whenReady(new Checkout.ListenerAdapter() {
                @Override
                public void onReady(@NonNull BillingRequests requests) {
                    requests.purchase(issueCollection.getSubscriptionSku(), null, checkout.getPurchaseFlow());
                }
            });
            return true;
        }else{
            Toast.makeText(this, "Subscriptions are currently not available!", Toast.LENGTH_LONG).show();
            return false;
        }
    } else {
        return super.onContextItemSelected(item);
    }
}
 
开发者ID:MagLoft,项目名称:magloft-android-app,代码行数:39,代码来源:ShelfActivity.java

示例4: onSubscriptionClicked

import org.solovyev.android.checkout.BillingRequests; //导入依赖的package包/类
private void onSubscriptionClicked(BillingRequests requests, Sku subscriptionSku) {
    requests.purchase(subscriptionSku, Configuration.getUserId(), shelfCheckout.getPurchaseFlow());
    BakerApplication.getInstance().getPluginManager().onSubscribeClicked(subscriptionSku);
}
 
开发者ID:bakerframework,项目名称:baker-android-refactor,代码行数:5,代码来源:ShelfActivity.java


注:本文中的org.solovyev.android.checkout.BillingRequests类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。