Skip to content

Feature/fe 2044 plans - #823

Merged
PavlosTze merged 19 commits into
feature/hyperlocal-upsellfrom
feature/fe-2044-plans
Dec 1, 2025
Merged

PavlosTze merged 19 commits into
feature/hyperlocal-upsellfrom
feature/fe-2044-plans

Conversation

@PavlosTze

@PavlosTze PavlosTze commented Nov 26, 2025 •

Copy link
Copy Markdown
Collaborator

Why?

The billing flow functionality + manage subscription of the upsell feature.

How?

  • In the BillingService added the functionality of getting the available products, starting the billing flow and purchasing a product. In Android, purchasing a product needs a verification of the signature and an acknowledge request back to Google, which is what we do here. Whenever we get an active subscription we check if it's acknowledged properly or not and otherwise we handle it (e.g. a connection issue could take place when acknowledging a purchase initially and we need to properly acknowledge the next time we have it). Also created the functionality to update the UI in the whole process of it via a Flow and data class PurchaseUpdateState.
  • Created ManageSubscriptionActivity and its respective layout, along with some composable components such as PremiumFeaturesView which is the card that advertises the premium and CurrentPlanView which is the card showing the current active plan (standard or premium).
  • Added the new UI components ("powered by" etc) as we discussed internally.
  • Added support for the new banner which will advertise this feature.
  • Added the analytics that were needed.

Testing

As discussed internally you need to download the app to proper make some test purchases etc. Otherwise if you need to build it from Android Studio to test the rest of the functionality, please DM me so I can send you the secret you need in the production.env file.

Additional Info

  • Fixes FE-2053
  • Fixes FE-2045

@github-actions

github-actions Bot commented Nov 26, 2025 •

Copy link
Copy Markdown

Coverage Report (Type: Instructions)

Overall Project 81.53% -4.63% ✅
Files changed 5.78% ✅

File Coverage
RemoteBannersDataSource.kt 100% ✅
ManageSubscriptionViewModel.kt 100% ✅
HomeViewModel.kt 97.42% -0.43% ✅
AnalyticsService.kt 97.28% ✅
Extensions.kt 80.43% -4.99% ✅
UIModels.kt 52.54% -1.31% ✅
CurrentPlanView.kt 0% -90.84% ✅
PlansView.kt 0% -91.95% ✅
PremiumFeaturesView.kt 0% -89.49% ✅

@PavlosTze
PavlosTze force-pushed the feature/hyperlocal-upsell branch from e935f21 to 3f5aa8b Compare November 27, 2025 06:31
* Implement the new card in the Profile screen for the subscription

* Forecast in tab in station details + in forecast details (#807)

* WIP of forecast tab's state & prompt. Billing library missing to check state.

* Integrate the billing library, create functionality for initializing it and fetching if we have an active sub or not and update the UI respectively

* Handle UI in Forecast Details if premium is available or not

@pantelisss pantelisss left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job. I've noticed an issue in the success screen. Let's change the button title to "Continue" and remove the "Head to a station..."
Screenshot_20251127_145441

@PavlosTze
PavlosTze merged commit f2ee0cf into feature/hyperlocal-upsell Dec 1, 2025
1 of 2 checks passed
@PavlosTze
PavlosTze deleted the feature/fe-2044-plans branch December 1, 2025 15:30
eeVoskos added a commit that referenced this pull request Feb 27, 2026
* Implement the new card in the Profile screen for the subscription (#805)

* Implement the new card in the Profile screen for the subscription

* Forecast in tab in station details + in forecast details (#807)

* WIP of forecast tab's state & prompt. Billing library missing to check state.

* Integrate the billing library, create functionality for initializing it and fetching if we have an active sub or not and update the UI respectively

* Handle UI in Forecast Details if premium is available or not

* Feature/fe 2044 plans (#823)

* Implement the new card in the Profile screen for the subscription (#805)

* Implement the new card in the Profile screen for the subscription

* Forecast in tab in station details + in forecast details (#807)

* WIP of forecast tab's state & prompt. Billing library missing to check state.

* Integrate the billing library, create functionality for initializing it and fetching if we have an active sub or not and update the UI respectively

* Handle UI in Forecast Details if premium is available or not

* Create the initial manage subscription screen

* Manage subscription + plans screen

* Launch billing flow, handle purchases

* Update UI of the purchase update state + support of remote configurable banner

* Finalize the UI

* Fixes

* Fix detekt + unit tests

* Fixes on when clearing the shared flow

* Add some view content events

* UI fixes + add "powered by Meteoblue banner"

* Update gradle version

* Fix the actions

* Fixed the check of free premium trial available

* Fixes on logged out state in forecast tab

* Handle login state in Manage Subscription screen

* Handle tabs coloring in device details

* Fix text on success button in the billing flow

* Fixes

* Fixed the placement of meteoblue logo

* Show powered by weatherxm logo instead of the text we had before

* WIP - Integrate the purchaseToken in the API request

* Finalize the integration of the purchaseToken in the API and the isPremium in the response

* Fix the discrepancies between the premium data and the default ones

* Bump version

* Fix the STOPSHIP comment

* Minor detekt fixes

* More fixes

* Reverse the position of powered by and hyperlocal

* Replace the RangeSlider with a custom compose component to better draw the corner radius and make it customizable

* Chages in the Hyperlocal Prompt card and in the Powered by card

* Support of two different endpoints in Forecast (no UI yet)

* Add the two tabs in the forecast tab of the device details

* Fix powered by visibility in forecast fragment

* Fixes on forecast tab. Add the two tabs in forecast details.

* Fix in forecast details

* Fixes in forecast tab in hourlies to set probability to visible when setting it

* WIP: Add premium gradient color in temperature bar in forecast tab

* WIP paint the weather icons in the daily forecast in the forecast tab with gradient when premium

* Add gradient in the charts in forecast details in premium tab

* Fix the forecast tab color at onResume

* Replace the DailyTileForecastAdapter with a composable one, in order to better adjust the border when in hyperlocal tab

* Change the prompt CTA text

* Update the texts in the profile tab

* Redesign the top bar, the bottom bar and add the selector at the top of the screen

* Redesign the subscription management screen

* Fix detekt

* Fixes

* Implement the UI changes when downgrading and the new dialog before downgrading.

* Bump version to release in closed testing

* Fixed the downgrade dialog by using a custom composable

* Fix test code

* Hide the tab selectors and keep only the monthly subscription

* Add precipitation in pro forecast

* Fetch forecast again if the user went to the manage subscription screen (to catch new purchases automatically)

* Hide premium implementation for Solana users

* Bump version

* Redesign FreePlanView and PremiumPlanView for hyperlocal upsell

- PremiumPlanView: remove icon box, add gradient overlay, pill badges
  (★ Best Accuracy / Current Plan), trial-aware pricing section (2 Months
  Free + then-note vs regular price + baseline-aligned period), green tick
  feature items, divider, description
- FreePlanView: remove icon box, muted pill badge, smaller $0 price,
  tagline, divider, dot-box feature items
- Premium always shown first in the list
- Action button colour updated to colorPrimary to match card accents
- More breathing room between cards and action button
- 7 new strings added

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix UI contrast issues in manage subscription screen

* Minor fixes

* Fix unit tests

* Bump version

* Drive PremiumPlanView UI decisions from offer tags

- Extend SubscriptionOffer with tags, freeTrialPeriod, discountedCycles, basePrice
- Rewrite setupProducts() to emit one offer per store entry with phase metadata
- Replace hardcoded offer ID resolution in getMonthlyAvailableSub() with tag-based logic
- Gate free trial box, launch offer title, and discount row on their respective tags
- Use dynamic free trial month count parsed from freeTrialPeriod (e.g. "P2M" → 2)
- Select "for the next N months" vs "for the first N months" based on free-trial tag
- Split preview into four separate named functions for per-state visibility in AS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update dependencies and free trial threshold

* Bump version code

* Update free trial threshold strings

The threshold for unclaimed $WXM required to unlock and claim a Premium free trial has been updated from 100 to 200 in the user-facing strings.

* feat: Update app version code

* Update app/src/main/java/com/weatherxm/service/BillingService.kt

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update app/src/main/java/com/weatherxm/service/BillingService.kt

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update app/src/test/java/com/weatherxm/ui/forecastdetails/ForecastDetailsViewModelTest.kt

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Minor fixes

* Changed default build variant

* Add inspection suppression for signing configuration in build script

* Add unstable API usage suppression for locale filters

* Fix detekt violations across billing, subscription UI, and test files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update tag sorting logic in build script

* Update test data for wallet rewards in DeviceDetailsViewModelTest

---------

Co-authored-by: Pavlos Tzegiannakis <pavlostzeg@gmail.com>
Co-authored-by: Pavlos Tzegiannakis <pavlostze@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
production — 5c9279ce Deployed Dec 1, 2025 by PavlosTze via coverage #1212
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants