telephonymanager

Retrieve incoming call's phone number in Android

耗尽温柔 提交于 2019-11-26 01:06:49
问题 I would like to retrieve the incoming call\'s phonenumber and do something with it like the do in http://blog.whitepages.com/2009/02/27/caller-id-by-whitepages-a-new-android-app-that-puts-telemarketers-on-alert/ Could you please help me because I can\'t find any information about this. Where do i start and how do i get hold of the phonenumber? Ok so currently my code looks like below. When I place the call the CustomBroadcastReceiver catches it and the log message is printed out. I can

Retrieve incoming call's phone number in Android

我只是一个虾纸丫 提交于 2019-11-26 00:59:00
I would like to retrieve the incoming call's phonenumber and do something with it like the do in http://blog.whitepages.com/2009/02/27/caller-id-by-whitepages-a-new-android-app-that-puts-telemarketers-on-alert/ Could you please help me because I can't find any information about this. Where do i start and how do i get hold of the phonenumber? Ok so currently my code looks like below. When I place the call the CustomBroadcastReceiver catches it and the log message is printed out. I can retrieve the telephone number from the bundle. But! I can't get hte CustomPhoneStateListener to work. As you

Getting telephone US local area code with Android

别等时光非礼了梦想. 提交于 2019-11-26 00:52:58
I would like to know how can i get the device/user area code from within my android app I know there is a lib named TelephonyManager but i couldn't find the country code feature To make myself clear: I have an activity which asks the user to enter his phone number and i want the area code to be taken from the device (from his carrier?) If i would open my app in new york i would get +212 as the code and a text box to enter my own number 1- Add This Array to Strings.xml File <string-array name="CountryCodes" > <item>93,AF</item> <item>355,AL</item> <item>213,DZ</item> <item>376,AD</item> <item

How to hang up outgoing call in Android?

℡╲_俬逩灬. 提交于 2019-11-26 00:32:45
问题 I am developing an application where one of the things we need is to control the outgoing call, at least to be able to stop it from our application. I\'ve tried using Intent.ACTION_CALL from an existing activity: Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse(\"tel:\" + phoneNumber)); startActivity(callIntent); But stopping the call seems to be disallowed through the API. Can you suggest some workaround? For example: enabling airplane mode during the call? Just an example; this