how to get the value of dialer in android-application?

落爺英雄遲暮 提交于 2019-12-08 09:36:38

问题


i am developing one application which is based on SIP. And i want to store the value of dialer(value of buttons which is pressed to call) i.e if i am dialing 12345 then how do i store this value in particular string or integer for further manipulation and concatenation.

Clicking on that Five(5) button, phones default dialpad will open.i want to do this in my application.


回答1:


Having in mind the following scenario:

You have a dialpad (buttons from 0-9 etc) and an EditText, which gets updated every time the user hits a digit. When the user hits the "Make a Call button" you need to call getText() on EditText - than you'll have the dialer number.

On the other side (the person that receives the call) you need to parse the incoming SIP INVITE message, to get the number(contact info). Keep in mind that depending on the server configuration phone-numbers can be mapped to aliases (usernames).



来源:https://stackoverflow.com/questions/9161600/how-to-get-the-value-of-dialer-in-android-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!