Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I'm experiencing two scenarios with audio in
use. 

1. A phone call comes in and suspends my
application. While the user is still in the phone call, they swap in the
application. My application plays audio mixed with the phone call. How should I
go about determining if there's a phone call in progress? Is there a callback
mechanism I can use to get notified of state changes so I and stop/start audio? 

2. A music player is running in the background.
How should I determine if another app is currently playing music?

1) Using one of these “ICALL_GetInfo” or
“ICALL_GetState” API’s one can find the Phone call state (or) Applications can
also register to receive updated TAPIStatus information on any changes through
the ISHELL_RegisterNotify() function or via adding notification in MIF
“AEET_NMASK_VOICE_CALL” notification mask is to be
used to register for any state changes in voice calls of the device. Whenever
there is a status change applications receive EVT_NOTIFY event. The dwParam for
this event is of type “AEENotify”. The pData member of which is of type
“AEETNotifyInfo”. 
2) I don’t think there is away to know if any other application is
using Media player from a developer perspective. Please go through
“IRestorestatus” interface API reference. 

You can find this under “APIReference > System
> Application > Interfaces > IResourceStatus > “. There is an
example which will describe whether the “IMEDIA_Play” failed because of
temporarily unavailable resource or not. 
Thanks & Regards 
Sridhar A.

1) Using one of these “ICALL_GetInfo” or
“ICALL_GetState” API’s one can find the Phone call state (or) Applications can
also register to receive updated TAPIStatus information on any changes through
the ISHELL_RegisterNotify() function or via adding notification in MIF
“AEET_NMASK_VOICE_CALL” notification mask is to be
used to register for any state changes in voice calls of the device. Whenever
there is a status change applications receive EVT_NOTIFY event. The dwParam for
this event is of type “AEENotify”. The pData member of which is of type
“AEETNotifyInfo”. 
2) I don’t think there is away to know if any other application is
using Media player from a developer perspective. Please go through
“IRestorestatus” interface API reference. 

You can find this under “APIReference > System
> Application > Interfaces > IResourceStatus > “. There is an
example which will describe whether the “IMEDIA_Play” failed because of
temporarily unavailable resource or not. 
Thanks & Regards 
Sridhar A.