我完成了我的android studio电话呼叫代码,但我的应用程序无法正常运行,在手机中运行代码无法正常工作。
String number= phncall.getText().toString();
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse(("tel"+number)));
startActivity(intent);
它引发此异常:
Unable to peek into adb socket due to error. Closing socket.: Connection reset by peer
可以帮助您
Intent dialPhoneIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:"+phoneNumber));