Skip to content Skip to sidebar Skip to footer

Android Proximity Sensor Issue Only In Samsung Devices

Specific scenario to avoid problems: Behaviour for Activity in Samsung devices was different in the manner that every time there was a change detected, for proximity, it resulted i

Solution 1:

So turns out this is a registered issue with Samsung devices, here is a collection of pages which could help anybody facing this:

  1. Use onWindowFocusChanged. This made sense to me and my implementation related to onPause() was successful on following the same. Source and Explanation: activity-onpause-to-handle-focus What helped me: instead of in onPause();

    @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); if(!hasFocus){ clearProximityListeners(); } }

  2. Issue 74464:Activity#onPause called without Activity#onResume, or can Context#registerReceiver failed

  3. More reference: From quite a different aspect, Bug on unregister...Otto bus.. quote: For us, this only appears on Samsung devices. And after a quick search,...

Please edit, correct, improve the answer if there's any more clarity to it.. hope it saves some time.

Post a Comment for "Android Proximity Sensor Issue Only In Samsung Devices"