下面带来的是$ C $下拨打电话从我的活动
brought here is the code for making a phone call from my Activity
public void makeAPhoneCallWithSpeakerOn()
{
String uri = "tel:" + posted_by.trim() ;
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse(uri));
startActivity(intent);
}
问题是:
我怎样才能使手机通话,并打开扬声器?
how can I make the phone call and turn the speaker on?
10倍埃拉德
使用的 AudioManager 以打开扬声器和一个 CallStateListener 用于接收呼叫的终点。
Use an AudioManager to turn on the speakers and a CallStateListener for receiving the end of the call.
上一篇:什么是执行OnClickListener与活动的效果?效果、OnClickListener
下一篇:在教义中坚持 Symfony DateIntervalType 并将其格式化为 twig教义、格式、并将其、DateIntervalType