titanium-sdk icon indicating copy to clipboard operation
titanium-sdk copied to clipboard

feat(android): target Android SDK level 35

Open m1ga opened this issue 10 months ago • 10 comments

First updates for targetSDK 35 (fixes https://github.com/tidev/titanium-sdk/issues/14111).

As mentioned in https://github.com/tidev/titanium-sdk/issues/14111 Android SDK level 35 will enable edge-to-edge by default. This will break a lot of our default themes:

Bildschirmfoto_20250209_202720 (see the top of the window)

This PR will enable targetSDK 35 but will opt-out of edge-to-edge. This way we will have more time to implement proper edge-to-edge support and the apps will looks the same as before for everyone. It's not announced when targetSDK 35 will be required but according to https://targetsdk.com/ it will be end of this year (new apps, app updates a year later as always)

With this PR it will look like this again: Bildschirmfoto_20250209_202653

suppressUnsupportedCompileSdk is added to remove the warnings during build as the gradle version needs to be updated (different PR).

TODO Run more tests and see if anything else needs to be implemented for targetSDK 35

m1ga avatar Feb 09 '25 19:02 m1ga

@prashantsaini1 Can you please give this a test with our app?

hansemannn avatar Mar 01 '25 09:03 hansemannn

Android 16 was just released so you can test it on Pixel devices now too. At the moment most 3rd party apps opt-out of the edge-to-edge design (even most Google apps) too.

Long term goal of course: add a safe padding around the top and bottom so it will layout the windows correctly in edge-to-edge mode.

m1ga avatar Jun 10 '25 20:06 m1ga

a small update to prepare the XML layouts we have. They won't be used because of the opt-out part but when we implement the correct way these windows will work already.

Without the XML fix and edge-to-edge:

DrawerLayout: BottomNavigation (experimental:true):
Screenshot_20250612-124753 Screenshot_20250612-152728

With the XML fix and edge-to-edge:

DrawerLayout: BottomNavigation (experimental:true):
Screenshot_20250612-124734 Screenshot_20250612-153326

m1ga avatar Jun 12 '25 13:06 m1ga

We should get this merged. I have re-reviewed it, but still haven't tested it. :(

When the description says "opt-out of edge-to-edge", how do I opt-in to test this?

cb1kenobi avatar Jun 12 '25 15:06 cb1kenobi

you add https://github.com/tidev/titanium-sdk/pull/14181/files#diff-308f820e2c4773f2a8eb23b7c16335e9878e01a11863c33d6b9fd05b44aad626 to your project (/app/platform/android/res/) and set it to false

m1ga avatar Jun 12 '25 15:06 m1ga

or run 12.7.0 and set <uses-sdk android:targetSdkVersion="35" /> in your tiapp.xml (inside <manifest>)

m1ga avatar Jun 12 '25 15:06 m1ga

@m1ga Can you check if this entire stuff can be done by simply calling the WindowCompat.setDecorFitsSystemWindows(getWindow(), true); in TiBaseActivity as described here?

This would be helpful to cover all scenarios if we missed anything somewhere.

Edit: Though this PR disables the edge-to-edge feature and saves current apps, however, this may soon be required to enable more immersive UX. I can take a look on it this weekend to find a proper solution to enable/disable it and automatically handle the systems colors as also described in above link.

prashantsaini1 avatar Jun 12 '25 15:06 prashantsaini1

No, that doesn't work: Screenshot_20250612-173904

(I'm testing other stuff at the moment from the video in the issue ;-) )

Though this PR disables the edge-to-edge feature and saves current apps, however, this may soon be required to enable more immersive UX

True, but currently it isn't and target 35 will be required in November. That is the point of this PR: opt-out so people can make updates and their apps look the same. But totally agree: we have to implement it

m1ga avatar Jun 12 '25 15:06 m1ga

Can it wait a couple of weeks to merge? I haven't tested it yet with our apps, so if it can wait, I can prioritise to wrap it up asap.

prashantsaini1 avatar Jun 12 '25 15:06 prashantsaini1

sure, we didn't switch to 35 yet and no user has to do it by hand. If they want they have the workaround in the issue.

I think this one is more important: https://github.com/tidev/titanium-sdk/pull/14226 so we can start updating all the modules to be compatible. The earlier we can start the better. Many people don't like to update modules :smile: They always run very old versions when they ask for support on slack.

m1ga avatar Jun 12 '25 16:06 m1ga

emails are rolling out with:

Starting August 31 2025: New apps and app updates must target Android 15 (API level 35) or higher to be submitted to Google Play; except for Wear OS, Android Automotive OS, and Android TV apps, which must target Android 14 (API level 34) or higher.

but you can extend until November

m1ga avatar Jul 01 '25 17:07 m1ga

cc @prashantsaini1 Can you finish the review this sprint? Then we can release a new Ti SDK release mid July ✨

hansemannn avatar Jul 01 '25 18:07 hansemannn