How to understand that phone screen is off or app in background?


#1

How to understand that phone screen is off or app in background? For example, using NativeAudio with setInterval. Every 10 sec - I’m playing sound. When app in background or screen is off - I heard this sound. But it should be not like that, need to specify that phone currently not active.


#2

#3

@Sulot, if I right understand, with this library I can know is it background or not?


#4

“/cordova-plugin-background-mode”