B4X FEED how to detect phone state by using PhoneStateChanged

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: how to detect phone state by using PhoneStateChanged است. این موضوع تا کنون 46 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع how to detect phone state by using PhoneStateChanged
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
46
پسندها
0
آخرین ارسال توسط PracticalSoft
Jun 6, 2020
11,559
4,422
Dear specialists, I want to detect if phone state has changed to The ringing state. If this event will occur, I want to release Exoplayer so this library will stop live stream playback. Please, how to write a short code which will react on The PhoneStateChanged on The state ringing. Because if The PhoneStateChanged status is RINGING, it means, that somebody is calling on my number. So I want to stop The Internet radio playback.
Thank you for The code. Pause, release functions work even on Android 4.1, so Exoplayer library is compatible even with so old version. There is An deep problem between click and playback. But on Android 6.0 and newer, everything work much more smoother.

 

عقب
بالا