在我们的网站上,您可以通过拨打某个电话号码并输入6位数代码来进行小额支付。是否可以自动拨打此号码,或将其附加在电话号码后面,这样这个6位数的代码会自动输入?
如果它适用于Android或iPhone,它已经有很多帮助,虽然交叉解决方案显然更适合。
答案 0 :(得分:-1)
你去吧
在清单中添加以下权限。
<uses-permission android:name="android.permission.CALL_PHONE">
然后调用此方法
private void call() {
try {
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:1234")); //you put desired phone number
startActivity(callIntent);
} catch (ActivityNotFoundException e) {
Log.e("helloandroid dialing example", "Call failed", e);
}
}