本文整理汇总了Java中org.solovyev.android.checkout.Inventory类的典型用法代码示例。如果您正苦于以下问题:Java Inventory类的具体用法?Java Inventory怎么用?Java Inventory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Inventory类属于org.solovyev.android.checkout包,在下文中一共展示了Inventory类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: reloadInventory
import org.solovyev.android.checkout.Inventory; //导入依赖的package包/类
private void reloadInventory() {
final Inventory.Request request = Inventory.Request.create();
// load purchase info
request.loadAllPurchases();
// load SKU details
request.loadSkus(ProductTypes.IN_APP, getInAppSkus());
mCheckout.loadInventory(request, mInventoryCallback);
}
开发者ID:RajneeshSingh007,项目名称:MusicX-music-player,代码行数:9,代码来源:DonationActivity.java
示例2: onLoaded
import org.solovyev.android.checkout.Inventory; //导入依赖的package包/类
@Override
public void onLoaded(@Nonnull Inventory.Products products) {
final Inventory.Product product = products.get(ProductTypes.IN_APP);
if (!product.supported) {
// billing is not supported, user can't purchase anything
return;
}
mAdapter.update(product);
}
开发者ID:RajneeshSingh007,项目名称:MusicX-music-player,代码行数:10,代码来源:DonationActivity.java
示例3: onLoaded
import org.solovyev.android.checkout.Inventory; //导入依赖的package包/类
@Override
public void onLoaded(@NonNull Inventory.Products products) {
final Inventory.Product product = products.get(ProductTypes.IN_APP);
mAdapter.setNotifyOnChange(false);
mAdapter.clear();
if (product.supported) {
for (Sku sku : product.getSkus()) {
final Purchase purchase = product.getPurchaseInState(sku, Purchase.State.PURCHASED);
final SkuUi skuUi = new SkuUi(sku, purchase != null);
mAdapter.add(skuUi);
}
// Sort items by prices.
mAdapter.sort(new Comparator<SkuUi>() {
@Override
public int compare(@NonNull SkuUi l, @NonNull SkuUi r) {
return (int) (l.sku.detailedPrice.amount - r.sku.detailedPrice.amount);
}
});
showScene(SCREEN_INVENTORY);
} else {
mEmptyView.setText(R.string.donate_billing_not_supported);
showScene(SCREEN_EMPTY_VIEW);
}
mAdapter.notifyDataSetChanged();
}
开发者ID:shaobin0604,项目名称:HeartbeatFixerForGCM,代码行数:29,代码来源:DonateDialogFragment.java
示例4: getFallbackInventory
import org.solovyev.android.checkout.Inventory; //导入依赖的package包/类
@Nullable
@Override
public Inventory getFallbackInventory(@NonNull Checkout checkout,
@NonNull Executor onLoadExecutor) {
if (RobotmediaDatabase.exists(mBilling.getContext())) {
return new RobotmediaInventory(checkout, onLoadExecutor);
} else {
return null;
}
}
开发者ID:shaobin0604,项目名称:HeartbeatFixerForGCM,代码行数:11,代码来源:CheckoutInternal.java
示例5: onLoaded
import org.solovyev.android.checkout.Inventory; //导入依赖的package包/类
@Override
public void onLoaded(@NonNull Inventory.Products products) {
final Inventory.Product product = products.get(ProductTypes.IN_APP);
mAdapter.setNotifyOnChange(false);
mAdapter.clear();
if (product.supported) {
for (Sku sku : product.getSkus()) {
final Purchase purchase = product.getPurchaseInState(sku, Purchase.State.PURCHASED);
final SkuUi skuUi = new MySkuUi(sku, purchase != null);
mAdapter.add(skuUi);
}
// Sort items by prices.
mAdapter.sort(new Comparator<SkuUi>() {
@Override
public int compare(@NonNull SkuUi l, @NonNull SkuUi r) {
return (int) (l.sku.detailedPrice.amount - r.sku.detailedPrice.amount);
}
});
// Show the inventory.
refreshUi(SCREEN_INVENTORY);
} else refreshUi(SCREEN_EMPTY_VIEW);
mAdapter.notifyDataSetChanged();
}
开发者ID:AChep,项目名称:AcDisplay,代码行数:28,代码来源:DonateDialog.java
示例6: update
import org.solovyev.android.checkout.Inventory; //导入依赖的package包/类
public void update(Inventory.Product product) {
mProduct = product;
notifyDataSetChanged();
}
开发者ID:RajneeshSingh007,项目名称:MusicX-music-player,代码行数:5,代码来源:DonationActivity.java
示例7: onLoaded
import org.solovyev.android.checkout.Inventory; //导入依赖的package包/类
@Override
public void onLoaded(@NonNull Inventory.Products inventoryProducts) {
BakerApplication.getInstance().getIssueCollection().updatePricesFromProducts(inventoryProducts);
issueAdapter.updateIssues();
}
开发者ID:MagLoft,项目名称:magloft-android-app,代码行数:6,代码来源:ShelfActivity.java
示例8: onLoaded
import org.solovyev.android.checkout.Inventory; //导入依赖的package包/类
@Override
public void onLoaded(@NonNull Inventory.Products inventoryProducts) {
// Load existing purchases from backend
fetchPurchasesJob = new FetchPurchasesJob(Configuration.getManifestUrl());
BakerApplication.getInstance().getJobManager().addJobInBackground(fetchPurchasesJob);
}
开发者ID:bakerframework,项目名称:baker-android-refactor,代码行数:7,代码来源:RemoteIssueCollection.java
示例9: getInventory
import org.solovyev.android.checkout.Inventory; //导入依赖的package包/类
public Inventory getInventory() {
return inventory;
}
开发者ID:bakerframework,项目名称:baker-android-refactor,代码行数:4,代码来源:RemoteIssueCollection.java
注:本文中的org.solovyev.android.checkout.Inventory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论