Skip to content

DEV-1401: ShimmerCapture targets API 36 (Google Play requirement) - #149

Merged
jyong15 merged 2 commits into
masterfrom
DEV-1401_target_sdk_36
Nov 3, 2026
Merged

jyong15 merged 2 commits into
masterfrom
DEV-1401_target_sdk_36

Conversation

@MAzalya

@MAzalya MAzalya commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Replaces #148, closed when its branch was renamed for the new ticket.

Play Console refused the ShimmerCapture 1.3.4 draft: "Your app currently targets API level 35 and must target at least API level 36".

Change (shimmerServiceExample/build.gradle, AndroidManifest.xml)

  • targetSdkVersion 35 → 36.
  • versionCode 35 → 36. Play keeps the versionCode 35 APK uploaded with the refused draft and will not accept that code again. versionName stays 1.3.4: the release is re-created under the same name.
  • compileSdk stays 34, as it already did with target 35. Play checks only the target, and moving compileSdk would need a newer Android Gradle Plugin than the repo's 8.2.2.

What targeting 36 changes for this app

Checked against the Android 16 behaviour changes for apps targeting 36:

  • Predictive back: onBackPressed() is no longer called. The app does not override it, nor handle KEYCODE_BACK: no change.
  • Edge-to-edge: the opt-out is removed. The app already ran edge-to-edge from targeting 35, with no opt-out: no change.
  • Large screens: on displays of 600dp and wider (tablets, unfolded foldables), Android 16 ignores android:screenOrientation="portrait", so MainActivity can rotate there. Phones are unaffected. Rotating recreated MainActivity, re-showing the location notice each time, so AndroidManifest.xml now gives it configChanges for orientation and screen size: it reflows instead of being recreated.

Tested

  • Local :shimmerServiceExample:assembleRelease passes, including lint-vital. The APK reads versionCode='36' versionName='1.3.4' targetSdkVersion:'36'.
  • Still needed: on an Android 16 phone, connect, configure, stream and plot, as the release procedure asks. Also a tablet, if one is to hand, for the rotation.

After merge

  1. Delete the ShimmerCapture_v1.3.4 release and tag, which hold the refused versionCode 35 APK.
  2. Discard the 1.3.4 draft in Play Console.
  3. Run Release ShimmerCapture again: it tags 1.3.4 on the new commit and uploads versionCode 36.

🤖 Generated with Claude Code

Play Console refused the 1.3.4 draft: apps must target at least API level 36. versionCode goes to 36 too, because Play keeps the versionCode 35 APK from that draft and will not accept the code again; versionName stays 1.3.4. compileSdk stays 34, as it did with target 35: Play checks only the target.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@MAzalya

MAzalya commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Tested on Android 16 (emulator, API 36)

Debug build of this branch (641410d, versionCode 36, targetSdk 36), on the Android 16 google_apis x86_64 image: a Pixel 7 phone profile and a Pixel Tablet profile. The emulator has no route to a real Shimmer, so connect, configure, stream and plot are not covered. Those still need a real device.

Phone (portrait locked, as before)

  • Cold launch, the app's location notice, then the system location and Bluetooth prompts: OK. Location, BLUETOOTH_SCAN and BLUETOOTH_CONNECT granted; background location and advertise are not requested on 12+, as before.
  • Main screen, edge to edge: nothing under the status bar or the gesture bar.
  • Overflow menu: all items present. Back closes it.
  • Connect to Shimmer device → Scan for devices: discovery starts (scanning for devices…), with no receiver error. Back returns to the main screen.
  • Swiping and tapping between tabs: OK.
  • No crash in the crash buffer during any of it.

Back at the root screen: goes home, and the process stays alive. MainActivity is destroyed, so the next launch is warm and shows the location notice again. Same at targetSdk 35 (built and tested side by side), so this is not from this PR.

Tablet (≥600dp): the one visible change. As expected, Android 16 ignores screenOrientation="portrait" here, so the app runs in landscape and rotates. The landscape layout is fine: all five tabs fit, and the service starts. No crash over repeated rotations. But each rotation recreates MainActivity, which shows the location notice again and logs a WindowLeaked for the previous one. That is cosmetic, tablet-only and harmless. If it matters, android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize" on MainActivity would stop the recreation.

Android 14 (Samsung Galaxy A13 on the bench): this build, 1.3.4 / versionCode 36 / targetSdk 36, is installed there already.

…ated

Targeting API 36, Android ignores screenOrientation="portrait" on displays 600dp and wider, so ShimmerCapture rotates on tablets. Each rotation recreated MainActivity, which re-showed the location notice and logged a WindowLeaked for the previous one. configChanges for orientation and screen size keeps the activity; it has no orientation-specific resources, so the views reflow as they are. Phones still lock to portrait.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@MAzalya

MAzalya commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Tablet rotation fixed

Added android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize" to MainActivity (7b84d6f), so a rotation no longer recreates it. MainActivity has no orientation-specific resources and no onConfigurationChanged, so its views just reflow.

Retested on the Android 16 Pixel Tablet emulator: five rotations, then

  • the same MainActivity instance throughout (not recreated)
  • the location notice shown once, at launch only
  • no WindowLeaked, no crash
  • portrait and landscape layouts reflow, and the selected tab (Plot) is kept

Debug and release builds pass, release including lint-vital. Phones still lock to portrait, so they are unaffected.

@jyong15 jyong15 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good and tested

@jyong15
jyong15 merged commit 22073fe into master Nov 3, 2026
1 check passed
@jyong15
jyong15 deleted the DEV-1401_target_sdk_36 branch November 3, 2026 05:05
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