[英]Android Intent.ACTION_CALL: phone number with # char
我想撥打*142#
但是,它僅撥打*142
, #
被忽略。
這是我的代碼
Button button = (Button) findViewById(R.id.balance);
myButton.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View view)
{
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:" + telephoneNumber));
startActivity(intent);
}
}
我將*142#
設置為*142#
,但仍然撥打*142
。 我該怎么做才能確保撥打*142#
? 以#
結尾?
URL使用URLEncoder
編碼數字。
#
在URI語法中具有特殊含義,需要將其編碼為%23
,以字面意義將其視為#
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.