PurchaseTester: Add new UI to configure internal proxy behavior#1016
Conversation
| } | ||
|
|
||
| @Suppress("EmptyFunctionBlock") | ||
| binding.proxyUrlInput.addTextChangedListener(object : TextWatcher { |
There was a problem hiding this comment.
I added this so we could configure the proxy setting from before the SDK was configured. This means we will update the property on every change, which is probably fine.
There was a problem hiding this comment.
it's fine for a sample app. Would listening to onFocusChange also do the trick, but without the intermediate calls while editing?
There was a problem hiding this comment.
There are some situations where the edittext doesn't lose focus, causing the proxy url to not be updated in time. For example, if you are editting the proxy url edittext and then click a button, the focus isn't lost. Updating on text change was the quickest alternative I could find, even though it's clearly not optimal
Codecov Report
@@ Coverage Diff @@
## main #1016 +/- ##
=======================================
Coverage 85.37% 85.37%
=======================================
Files 169 169
Lines 6005 6005
Branches 839 839
=======================================
Hits 5127 5127
Misses 546 546
Partials 332 332 |
|
This looks amazing 😍 I'll let somebody else review this cause I know virtually nothing about Android UI. |
| } | ||
|
|
||
| @Suppress("EmptyFunctionBlock") | ||
| binding.proxyUrlInput.addTextChangedListener(object : TextWatcher { |
There was a problem hiding this comment.
it's fine for a sample app. Would listening to onFocusChange also do the trick, but without the intermediate calls while editing?
|
Merging this for now. If there are any further comments, I can address in followup PRs |
**This is an automatic release.** ### New Features * Offline entitlements support (#1030) via Toni Rico (@tonidero) ### Bugfixes * Fix billing connection error when querying purchases early in the process lifetime (#1032) via Toni Rico (@tonidero) ### Performance Improvements * Perform product entitlement mapping request after more critical requests (#1017) via Toni Rico (@tonidero) ### Dependency Updates * Bump fastlane from 2.212.2 to 2.213.0 (#1024) via dependabot[bot] (@dependabot[bot]) ### Other Changes * Get offerings response from disk cache if available (#1029) via Toni Rico (@tonidero) * Improve offline entitlements logs to mention limitations of this mode (#1039) via Toni Rico (@tonidero) * Improve error message when backend returns internal error code (#1038) via Toni Rico (@tonidero) * PurchaseTester: Add new UI to configure internal proxy behavior (#1016) via Toni Rico (@tonidero) * Updated readme to include links to migration guides (#1021) via Marcos Castany (@mcastany) * Store offerings response in SharedPreferences (#1028) via Toni Rico (@tonidero) * Refactor offerings code out of Purchases (#1027) via Toni Rico (@tonidero) --------- Co-authored-by: revenuecat-ops <ops@revenuecat.com> Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
Description
This PR adds a new button to the
ConfigureFragment,LoginFragmentandOverviewFragment. This will open a bottom sheet where we can modify the behavior of our internal proxy. This will help with testing offline entitlements and trusted entitlements. Note that this UI will only be helpful when using our internal proxy. When using other proxies, the requests will fail and the UI will display the corresponding errordevice-2023-05-23-101143.mp4