Skip to content

Conversation

@oliverlaz
Copy link
Member

@oliverlaz oliverlaz commented Oct 27, 2025

💡 Overview

When we migrated away from InCallManager (#1840) to our in-house callManager, we didn't port the Wake Lock on iOS and proximity sensing on both Android and iOS.
This PR closes that gap.

🎫 Ticket: https://linear.app/stream/issue/RN-291/screen-auto-lock

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR restores screen wake lock and proximity sensing functionality that was lost during the migration from InCallManager to the custom callManager implementation. The changes ensure the device screen stays on during calls and the proximity sensor automatically turns off the screen when held near the ear (earpiece mode only).

Key Changes:

  • Added screen wake lock on iOS to prevent screen dimming during calls
  • Implemented proximity sensor monitoring on both iOS and Android to turn off screen when device is near ear
  • Integrated proximity management into the call lifecycle via callManager.start() and callManager.stop()

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
sample-apps/react-native/dogfood/src/navigators/Call.tsx Integrated callManager.start() and callManager.stop() calls in the dogfood app to enable wake lock and proximity sensing
packages/react-native-sdk/ios/StreamInCallManager.swift Added wake lock, proximity monitoring, and audio route observation on iOS
packages/react-native-sdk/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt Integrated ProximityManager into Android call manager lifecycle
packages/react-native-sdk/android/src/main/java/com/streamvideo/reactnative/callmanager/ProximityManager.kt New Android proximity manager implementation handling sensor registration and wake lock management

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@oliverlaz oliverlaz changed the title fix: restore screen wake lock and proximity sensing fix(react-native): restore screen wake lock and proximity sensing Oct 27, 2025
@oliverlaz oliverlaz merged commit f20ef70 into main Oct 27, 2025
8 checks passed
@oliverlaz oliverlaz deleted the wake-lock branch October 27, 2025 15:03
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