I want to make a music application, in which On click song, it will do call activity in background instead display dial pad then call. btnFullTrack.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
try {
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:123456789"));
startActivity(callIntent);
} catch (ActivityNotFoundException activityException) {
}
}
});
There is no way. The only way is to open the dial pad through the Intent ACTION_CALL
如果您要拨打电话并跳过通话屏幕,则不能这样做(我认为是出于安全原因。)
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.