Skip to content

Target SDK 35#12388

Merged
Isira-Seneviratne merged 7 commits intoTeamNewPipe:devfrom
mikooomich:sdk35
Jul 24, 2025
Merged

Target SDK 35#12388
Isira-Seneviratne merged 7 commits intoTeamNewPipe:devfrom
mikooomich:sdk35

Conversation

@mikooomich
Copy link
Contributor

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Hello. This PR Bumps compileSdk to 36 and targetSdk to 35
  • The bulk of the changes are regarding SDK 34 breakages
  • Opt out of edge to edge as that is enabled by default in SDK 35
    • SDK 36 shouldn't require that much work other than mandatory edge to edge... which would likely require significant code changes (perhaps it would be easier with compose?)
  • I encountered a crash by downloading audio and playing it from downloads (Fresh app install, did not touch any settings)
    • Not going to address in this PR as that can be reproduced with the current dev branch

Before/After Screenshots/Screen Record

  • There shouldn't have been any UI changes

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions bot added the size/medium PRs with less than 250 changed lines label Jun 26, 2025
@AudricV AudricV added the dependency Issues and PRs related to dependencies label Jun 26, 2025
@mikooomich
Copy link
Contributor Author

Applied the suggestions. Thanks!

Also, Android Studio does recommend upgrading AGP & Gradle for compile SDK 36 support. I'm not sure if there's any policy regarding upgrading those versions though.

val packageInfo = getPackageInfo(callingPackage) ?: return null

val appName = packageInfo.applicationInfo.loadLabel(packageManager).toString()
val uid = packageInfo.applicationInfo.uid

This comment was marked as resolved.

val activePermissions = mutableSetOf<String>()
requestedPermissions?.forEachIndexed { index, permission ->
if (permissionFlags[index] and REQUESTED_PERMISSION_GRANTED != 0) {
activePermissions += permission

This comment was marked as outdated.

Copy link
Member

@Isira-Seneviratne Isira-Seneviratne left a comment

Choose a reason for hiding this comment

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

Here are some suggestions for handling the newly nullable fields.

Copy link
Member

@Isira-Seneviratne Isira-Seneviratne left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@Isira-Seneviratne
Copy link
Member

Could you also update the ci.yml file to use the API 35 emulator?

@Isira-Seneviratne Isira-Seneviratne merged commit 22a709d into TeamNewPipe:dev Jul 24, 2025
5 checks passed
@Stypox
Copy link
Member

Stypox commented Jul 27, 2025

I think this caused the following stack trace reported by some user on Matrix. It's related to new streams notifications.

FATAL EXCEPTION: main
Process: org.schabi.newpipe.nightly, PID: 964
android.app.InvalidForegroundServiceTypeException: Starting FGS with type none callerApp=ProcessRecord{a5be1e1 964:org.schabi.newpipe.nightly/u0a626} targetSDK=35 has been prohibited
	at android.app.InvalidForegroundServiceTypeException$1.createFromParcel(InvalidForegroundServiceTypeException.java:53)
	at android.app.InvalidForegroundServiceTypeException$1.createFromParcel(InvalidForegroundServiceTypeException.java:49)
	at android.os.Parcel.readParcelableInternal(Parcel.java:5094)
	at android.os.Parcel.readParcelable(Parcel.java:5076)
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3256)
	at android.os.Parcel.createException(Parcel.java:3245)
	at android.os.Parcel.readException(Parcel.java:3228)
	at android.os.Parcel.readException(Parcel.java:3170)
	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7357)
	at android.app.Service.startForeground(Service.java:863)
	at androidx.work.impl.foreground.SystemForegroundService$Api31Impl.startForeground(SystemForegroundService.java:194)
	at androidx.work.impl.foreground.SystemForegroundService$1.run(SystemForegroundService.java:130)
	at android.os.Handler.handleCallback(Handler.java:991)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8935)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)

@Isira-Seneviratne
Copy link
Member

@Stypox I wrote a fix.

#12471

@ShareASmile ShareASmile mentioned this pull request Aug 23, 2025
2 tasks
whistlingwoods pushed a commit to whistlingwoods/FoxPipe that referenced this pull request Oct 4, 2025
@TobiGr TobiGr mentioned this pull request Dec 21, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependency Issues and PRs related to dependencies size/medium PRs with less than 250 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants