Closed lukeweber closed 11 years ago
Logic for private api. This is the only option on some older phones that have funky Power management settings, especially samsung:
https://github.com/lukeweber/webrtc-jingle-client/blob/stable/voice-client-example/src/main/java/com/tuenti/voice/example/util/WakeLockManager.java
Logic using a proximity sensor, if you can't use the private api: https://github.com/lukeweber/webrtc-jingle-client/blob/stable/voice-client-example/src/main/java/com/tuenti/voice/example/util/ProximitySensor.java
All of it is driven from here: https://github.com/lukeweber/webrtc-jingle-client/blob/stable/voice-client-example/src/main/java/com/tuenti/voice/example/ui/activity/CallInProgressActivity.java
OnPause() logic is particularly important for making sure to stop proximitysensor correctly based on whether the screen is on or off when this method is hit.
Logic for private api. This is the only option on some older phones that have funky Power management settings, especially samsung:
https://github.com/lukeweber/webrtc-jingle-client/blob/stable/voice-client-example/src/main/java/com/tuenti/voice/example/util/WakeLockManager.java
Logic using a proximity sensor, if you can't use the private api: https://github.com/lukeweber/webrtc-jingle-client/blob/stable/voice-client-example/src/main/java/com/tuenti/voice/example/util/ProximitySensor.java
All of it is driven from here: https://github.com/lukeweber/webrtc-jingle-client/blob/stable/voice-client-example/src/main/java/com/tuenti/voice/example/ui/activity/CallInProgressActivity.java
OnPause() logic is particularly important for making sure to stop proximitysensor correctly based on whether the screen is on or off when this method is hit.