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.
我想在通话过程中从拨号盘获取号码
设想:
那么我怎样才能得到拨出的号码呢?
在通话过程中从拨号盘获取号码:
要从拨出电话中获取号码,您需要注册一个BroadcastReceiverfor PHONE_STATEAction。insideonReceive方法,您将检索为:
BroadcastReceiver
PHONE_STATE
onReceive
String outgoingNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER)
如需更多帮助,您可以查看以下教程:
操作 Android 的传入和传出呼叫教程