Make the Android Video SDK compatible with Android 17. - #1752
Make the Android Video SDK compatible with Android 17.#1752rahul-lohra wants to merge 6 commits into
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
WalkthroughIncoming-call foreground service selection now uses a dedicated SDK-aware path. Android 17+ uses the phone-call service type when supported, while earlier versions retain the existing fallback. Tests cover both runtime SDK branches. ChangesIncoming call foreground service type
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/notifications/internal/service/permissions/ForegroundServicePermissionManager.kt`:
- Around line 103-106: Replace the hardcoded 37 in the API-level check within
ForegroundServicePermissionManager with a named ANDROID_17_API_LEVEL constant,
and remove the TODO comment. Use the constant in the Build.VERSION.SDK_INT
comparison while preserving the existing foreground service type condition;
track the future compileSdk upgrade separately.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 74a1c0bf-57c9-4fc2-b260-e8e63754ed25
📒 Files selected for processing (2)
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/notifications/internal/service/permissions/ForegroundServicePermissionManager.ktstream-video-android-core/src/test/kotlin/io/getstream/video/android/core/notifications/internal/service/permissions/ForegroundServicePermissionManagerTest.kt
|



Goal
Closes AND-1324
Make the Android Video SDK compatible with Android 17.
Android 17 introduces new restrictions on background media playback Link . Previously, the SDK relied on the
SHORT_SERVICEforeground service type to play the incoming call ringtone while the app was in the background. This approach is no longer suitable on Android 17.Solution:
For incoming calls on Android 17, replace
SHORT_SERVICEwithServiceInfo.FOREGROUND_SERVICE_TYPE_PHONE_CALL.Implementation
Replace
SHORT_SERVICEwithServiceInfo.FOREGROUND_SERVICE_TYPE_PHONE_CALLfor the incoming call foreground service on Android 17.🎨 UI Changes
None
Testing
Summary by CodeRabbit
Bug Fixes
Tests