-
Notifications
You must be signed in to change notification settings - Fork 0
[PR-27228] Upgrade Demo App target to Android 17 (API 37) #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ad59e89
[PR-27228] Upgrade Demo App target to Android 17 (API 37)
dgtv e0b9c1f
Fix AGP 9 proguard file requirement and unit tests on modern JDK
dgtv 372e8a6
Opt demo app out of predictive back to keep Talkable popup Back handling
dgtv f778588
chore: migrate CI from CircleCI to GitHub Actions
zhuravel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
|
|
||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
|
|
||
| - name: Set up Gradle | ||
| uses: gradle/actions/setup-gradle@v6 | ||
|
|
||
| # app/build.gradle reads keystore.properties at configuration time; | ||
| # dummy values are enough for unsigned CI builds | ||
| - name: Create CI keystore.properties | ||
| run: | | ||
| cat > keystore.properties <<'EOF' | ||
| keyAlias = ci | ||
| keyPassword = ci | ||
| storeFile = ./../keystore.jks | ||
| storePassword = ci | ||
| EOF | ||
|
|
||
| - name: Run SDK unit tests | ||
| run: ./gradlew :sdk:test | ||
|
|
||
| - name: Build demo app | ||
| run: ./gradlew :app:assembleDebug | ||
|
|
||
| - name: Upload test results | ||
| if: always() | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: test-results | ||
| path: '**/build/test-results/**/*.xml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| jdk: | ||
| - openjdk17 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Migrate custom Back handling before targeting 37
Plain English
On Android 16 and newer, pressing Back while a Talkable popup is open skips the popup-closing behavior and leaves the offer screen instead.
Example
Run the demo on Android 16 or 17, open a Talkable offer and then an in-offer popup, and press system Back. This line raises the app target from 35 to 37, so the platform no longer dispatches
TalkableActivity.onBackPressed(). As a result,TalkableOfferFragment.onBackPressed()never publishesclose_popups, and the activity follows the default Back action. Android documents this target-36+ change here: behavior changes.Why this matters
The demo now activates this behavior, and SDK consumers targeting 36 or newer encounter the same broken popup interaction.
Suggested fix
Migrate
TalkableActivitytoOnBackPressedDispatcher/OnBackPressedCallbackand ensure the resolved AndroidX Activity version integrates with predictive Back. For example:Add an Android 16+ device or instrumentation test that opens a popup and verifies that the first Back action closes it. A manifest opt-out is only a temporary fallback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch — confirmed: TalkableActivity's Back override stops being dispatched once the app targets 36+. Fixed for the demo app in 372e8a6 with the documented enableOnBackInvokedCallback="false" opt-out. The proper OnBackPressedDispatcher migration needs androidx.activity ≥ 1.6.0 in the SDK (the dispatcher only integrates with predictive back from 1.6.0), so it comes with an AndroidX bump and an SDK release — tracked as a follow-up rather than in this PR, which intentionally doesn't change the published SDK.