拨打电话在数量,然后按#键然后按、拨打电话、数量

2023-09-05 04:55:59 作者:解忧小馆子

我的工作呼叫应用程序在那里我做呼叫按钮点击,但如果只是跟着#数量,然后它没有考虑#键在最后的电话号码。

例如,如果我想要在*从应用程序,123#,然后那只能说明*在调用屏幕123电话发出呼叫。请建议我在哪里,我错了。

下面是我的$ C $下呼叫* 123#按钮的点击。

 意图callIntent =新的意图(Intent.ACTION_CALL);
callIntent.setData(Uri.parse(电话:+ phoneNumber的));
callIntent.setData(Uri.parse(电话:+* 123#));
startActivity(callIntent);
 
全澳 通缉 摇中南航往返机票的朋友 我们给你打了上百遍电话了 中奖人数300多页,就是找不到你啊.....

解决方案

试试这个...

 意图callIntent =新的意图(Intent.ACTION_CALL,Uri.parse(电话:+ Uri.en code(* 123#)));
startActivity(callIntent);
 

I am working on the calling app where I make call on button click but if the number just followed by # then it does not take the # key at the last of phone number.

For Example if I want to make a call on *123# from app then it only shows *123 in the calling screen in phone. Please suggest me where I am going wrong.

Here is my code for call on *123# on button click.

Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + phoneNumber));
callIntent.setData(Uri.parse("tel:" + "*123#"));
startActivity(callIntent);

解决方案

try this...

Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"+ Uri.encode("*123#")));
startActivity(callIntent);