Android Broadcast Receiver:
Is there any trick/event that can trigger just before screen is going to Off android.intent.action.SCREEN_OFF
OR
Any way to know if screen goes off by power press or by auto sleep function?
Android Broadcast Receiver:
Is there any trick/event that can trigger just before screen is going to Off android.intent.action.SCREEN_OFF
OR
Any way to know if screen goes off by power press or by auto sleep function?
Copyright © 2021 Jogjafile Inc.
Have you try to use de lifecycle methods? Every time the screen is Locked, the activity will call first the method onPause() and then onStop(), so you could override them to add your code