我的拨号器只显示“*16001”:
private Button checksim;
private String number = "*16001#";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bangladeshsimverification);
checksim = findViewById(R.id.b_b_check);
checksim.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent opendialer = new Intent(Intent.ACTION_DIAL);
opendialer.setData(Uri.parse("tel:" + number));
if (opendialer.resolveActivity(getPackageManager()) != null) {
startActivity(opendialer);
}
}
});
}
我想#
在这个字符串的末尾添加“”,但它不起作用。我怎样才能做到这一点?