How can i get android screen-off event

Hello(i am first question~)

I want to know how to get the event of screen-off for lock screen publishing.

The project just make pattern lock screen, i want to publish real lock screen.

how can i add screen off event listener?

please help~~

※ i don’t want to expo detach for the native android studio project

1 Like

Have you looked into AppState API at all?

None of us do :slightly_smiling_face::joy:

If this doesn’t work for you, could you open a canny: Feature Requests | Expo and share it here so others can vote on it :blue_heart::slightly_smiling_face::star:

Thx for reply

I thought AppState is just check the react-native application status.

I thought Screen-off is not appstate~

Yeah i will check more PhoneState(screen off) through AppState API~


I checked AppStat, but it didn’t work.

i think AppState is not only screen-off event.
(in home screen, in another app, etc…)

i dont want these results.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.