简体   繁体   中英

How to detect mobile phone event in browser using javascript?

Now i have a HTML5 web app designed to running on mobile devices, Android And IOS. And I'm using Web Audio Api to play sound, and I want to pause playing when there is a call coming. Searched on Google that on Android there is a TelephonyManager.ACTION_PHONE_STATE_CHANGED notification broadcast to Apps when there is a phone call, but i don't know how to handle it using javascript in browser.

Any tips about this problem will be appreciated a lot.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM