Why google dont provide this function for normal use (android.telecom.Connection)?
I need this function for disable bluetooth selection for my call. I think that in java we can use reflection for get this function, but im using Xamarin and its impossivel using reflection
/**
* Sets the supported audio routes.
*
* @param supportedAudioRoutes the supported audio routes as a bitmask.
* See {@link CallAudioState}
* @hide
*/
public final void setSupportedAudioRoutes(int supportedAudioRoutes) {
if ((supportedAudioRoutes
& (CallAudioState.ROUTE_EARPIECE | CallAudioState.ROUTE_SPEAKER)) == 0) {
throw new IllegalArgumentException(
"supported audio routes must include either speaker or earpiece");
}
if (mSupportedAudioRoutes != supportedAudioRoutes) {
mSupportedAudioRoutes = supportedAudioRoutes;
for (Listener l : mListeners) {
l.onSupportedAudioRoutesChanged(this, mSupportedAudioRoutes);
}
}
}
The answer ist simple and easy. You are not supposed to use it.
Please read the specification and understand that Represents does not mean Controls.