Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个应用程序来呼叫号码*123456789#,但是当应用程序呼叫这个号码时,Android 只是呼叫*123456789(没有#)。
*123456789#
*123456789
#
你可以帮帮我吗?
您只需对电话号码进行编码。
String phonenumber = "*123456789#"; encodedPhonenumber = URLEncoder.encode(phonenumber, "UTF-8"); startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + encodedPhonenumber)));