Search in sources :

Example 1 with OneTimePaymentButton

use of net.osmand.plus.chooseplan.button.OneTimePaymentButton in project Osmand by osmandapp.

the class MapsPlusPlanFragment method collectPriceButtons.

public static List<PriceButton<?>> collectPriceButtons(OsmandApplication app, InAppPurchaseHelper purchaseHelper, boolean nightMode) {
    List<InAppSubscription> subscriptions = getVisibleSubscriptions(app, purchaseHelper);
    List<PriceButton<?>> priceButtons = new ArrayList<>(PurchasingUtils.collectSubscriptionButtons(app, purchaseHelper, subscriptions, nightMode));
    OneTimePaymentButton oneTimePaymentButton = PurchasingUtils.getOneTimePaymentButton(app);
    if (oneTimePaymentButton != null) {
        priceButtons.add(oneTimePaymentButton);
    }
    return priceButtons;
}
Also used : PriceButton(net.osmand.plus.chooseplan.button.PriceButton) ArrayList(java.util.ArrayList) OneTimePaymentButton(net.osmand.plus.chooseplan.button.OneTimePaymentButton) InAppSubscription(net.osmand.plus.inapp.InAppPurchases.InAppSubscription)

Aggregations

ArrayList (java.util.ArrayList)1 OneTimePaymentButton (net.osmand.plus.chooseplan.button.OneTimePaymentButton)1 PriceButton (net.osmand.plus.chooseplan.button.PriceButton)1 InAppSubscription (net.osmand.plus.inapp.InAppPurchases.InAppSubscription)1