本文整理汇总了Java中org.solovyev.android.checkout.Checkout类的典型用法代码示例。如果您正苦于以下问题:Java Checkout类的具体用法?Java Checkout怎么用?Java Checkout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Checkout类属于org.solovyev.android.checkout包,在下文中一共展示了Checkout类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: function
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
@Override
protected void function() {
final Adapter adapter = new Adapter();
mInventoryCallback = new InventoryCallback(adapter);
String ateKey = Helper.getATEKey(this);
int colorAccent = Config.accentColor(this, ateKey);
rv.setPopupBgColor(colorAccent);
rv.setItemAnimator(new DefaultItemAnimator());
CustomLayoutManager customLayoutManager = new CustomLayoutManager(this);
customLayoutManager.setSmoothScrollbarEnabled(true);
rv.setLayoutManager(customLayoutManager);
rv.addItemDecoration(new DividerItemDecoration(this, 75, false));
rv.setHasFixedSize(true);
rv.setAdapter(adapter);
final Billing billing = MusicXApplication.get(this).getmBilling();
mCheckout = Checkout.forActivity(this, billing);
mCheckout.start();
reloadInventory();
}
开发者ID:RajneeshSingh007,项目名称:MusicX-music-player,代码行数:20,代码来源:DonationActivity.java
示例2: consume
import org.solovyev.android.checkout.Checkout; //导入依赖的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
示例3: purchase
import org.solovyev.android.checkout.Checkout; //导入依赖的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
示例4: getFallbackInventory
import org.solovyev.android.checkout.Checkout; //导入依赖的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: onOptionsItemSelected
import org.solovyev.android.checkout.Checkout; //导入依赖的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
示例6: getCheckout
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
public Checkout getCheckout() {
if(checkout == null && !Configuration.isStandaloneMode()) {
checkout = Checkout.forApplication(billing, Products.create().add(IN_APP, ((RemoteIssueCollection) issueCollection).getIssueProductIds()).add(SUBSCRIPTION, Configuration.getSubscriptionProductIds()));
checkout.start();
}
return checkout;
}
开发者ID:bakerframework,项目名称:baker-android-refactor,代码行数:8,代码来源:BakerApplication.java
示例7: onCreate
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
if (mCheckoutRequest) {
App.getCheckoutInternal().requestConnect();
mCheckout = Checkout.forActivity(this, App.getCheckout());
}
mPowerSaveDetector = PowerSaveDetector.newInstance(this);
super.onCreate(savedInstanceState);
}
开发者ID:AChep,项目名称:HeadsUp,代码行数:13,代码来源:ActivityBase.java
示例8: onCreate
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
if (mCheckoutRequest) mCheckout = Checkout.forActivity(this, getCheckoutInternal().getCheckout());
super.onCreate(savedInstanceState);
}
开发者ID:shaobin0604,项目名称:HeartbeatFixerForGCM,代码行数:9,代码来源:ActivityBase.java
示例9: CheckoutInternal
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
public CheckoutInternal(@NonNull Context context, @NonNull Products products) {
mBilling = new Billing(context, new Configuration());
mCheckout = Checkout.forApplication(mBilling, products);
}
开发者ID:shaobin0604,项目名称:HeartbeatFixerForGCM,代码行数:5,代码来源:CheckoutInternal.java
示例10: getCheckout
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
@NonNull
public Checkout getCheckout() {
return mCheckout;
}
开发者ID:shaobin0604,项目名称:HeartbeatFixerForGCM,代码行数:5,代码来源:CheckoutInternal.java
示例11: initializeCheckout
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
public void initializeCheckout(List<String> productIds) {
List<String> subscriptionIds = new ArrayList<>();
subscriptionIds.add(getString(R.string.google_play_subscription_id));
checkout = Checkout.forApplication(billing, Products.create().add(IN_APP, productIds).add(SUBSCRIPTION, subscriptionIds));
}
开发者ID:MagLoft,项目名称:magloft-android-app,代码行数:6,代码来源:BakerApplication.java
示例12: getCheckout
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
public Checkout getCheckout() {
return checkout;
}
开发者ID:MagLoft,项目名称:magloft-android-app,代码行数:4,代码来源:BakerApplication.java
示例13: onCreate
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
void onCreate(Activity activity, Bundle savedInstanceState) {
if (mCheckoutRequest) mCheckout = Checkout.forActivity(activity, AppHeap.getCheckout());
mPowerSaveDetector = PowerSaveDetector.newInstance(activity);
mActivity = activity;
mCreated = true;
}
开发者ID:AChep,项目名称:AcDisplay,代码行数:7,代码来源:ActivityBaseInternal.java
示例14: getCheckout
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
@NonNull
public static Checkout getCheckout() {
return getCheckoutInternal().getCheckout();
}
开发者ID:AChep,项目名称:AcDisplay,代码行数:5,代码来源:AppHeap.java
示例15: onCreate
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Initialize preferences
PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
// Initialize tutorial
if(Configuration.getPrefFirstTimeRun()) {
Log.d(this.getClass().getName(), "First time app running, launching tutorial.");
showAppUsage();
}
// Initialize jobs
jobManager = BakerApplication.getInstance().getJobManager();
EventBus.getDefault().register(this);
// Initialize issue collection
issueCollection = BakerApplication.getInstance().getIssueCollection();
// Initialize issue adapter for shelf view
issueAdapter = new IssueAdapter(this, issueCollection);
// Render View
this.setContentView(R.layout.shelf_activity);
// Initialize Features
setupHeader();
loadBackground();
setupSwipeLayout();
setupActionBar();
setupCategoryDrawer();
// Fade in animation
View view = findViewById(android.R.id.content);
Animation mLoadAnimation = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.fade_in);
mLoadAnimation.setDuration(2000);
view.startAnimation(mLoadAnimation);
// Initialize shelf view
shelfView = (ShelfView) findViewById(R.id.shelf_view);
shelfView.setAdapter(issueAdapter);
issueAdapter.updateIssues();
// Update category drawer
updateCategoryDrawer(issueCollection.getCategories(), issueAdapter.getCategoryIndex());
// Continue downloads
unzipPendingPackages();
// Checkout
if(!Configuration.isStandaloneMode()) {
shelfCheckout = Checkout.forActivity(this, BakerApplication.getInstance().getCheckout());
shelfCheckout.start();
shelfCheckout.createPurchaseFlow(SHELF_CHECKOUT_REQUEST_CODE, new PurchaseListener());
}
// Plugin Callback
BakerApplication.getInstance().getPluginManager().onShelfActivityCreated(this);
}
开发者ID:bakerframework,项目名称:baker-android-refactor,代码行数:61,代码来源:ShelfActivity.java
示例16: getCheckout
import org.solovyev.android.checkout.Checkout; //导入依赖的package包/类
@NonNull
public static Checkout getCheckout() {
return instance.mCheckoutInternal.getCheckout();
}
开发者ID:AChep,项目名称:HeadsUp,代码行数:5,代码来源:App.java
注:本文中的org.solovyev.android.checkout.Checkout类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论