phone number should be a string or some numeric type that have capacity to save phone number?

ITU-T recommendation E.164 says you need 3 digits for the country code and up to 15 digits for the directory number within the country dialing plan. And, many people add some punctuation. For example: +1.212.555.1212 is a North American number. It could also be rendered (212) 555-1212 in a North American centric app. 32 characters … Read more

end incoming call programmatically

Try this Sure it will work. It’s working fine for me. You could download the ITelephony.java file from ITelephony.java After that you add the method to end call: Function to Disconnect call public void disconnectCall(){ try { String serviceManagerName = “android.os.ServiceManager”; String serviceManagerNativeName = “android.os.ServiceManagerNative”; String telephonyName = “com.android.internal.telephony.ITelephony”; Class<?> telephonyClass; Class<?> telephonyStubClass; Class<?> serviceManagerClass; … Read more

Get Signal Strength in Android

Define Variables: TelephonyManager mTelephonyManager; MyPhoneStateListener mPhoneStatelistener; int mSignalStrength = 0; Then add this class to your code: class MyPhoneStateListener extends PhoneStateListener { @Override public void onSignalStrengthsChanged(SignalStrength signalStrength) { super.onSignalStrengthsChanged(signalStrength); mSignalStrength = signalStrength.getGsmSignalStrength(); mSignalStrength = (2 * mSignalStrength) – 113; // -> dBm } } and in your onCreate method use: mPhoneStatelistener = new MyPhoneStateListener(); mTelephonyManager … Read more

How to get phone number from an incoming call?

Make a Broadcast receiver say ServiceReceiver assign its action in Manifest. <receiver android:name=”.ServiceReceiver” > <intent-filter> <action android:name=”android.intent.action.PHONE_STATE” /> </intent-filter> </receiver> Add a PhoneStateListener to your TelephonyManager, PhoneStateListener having override onCallStateChanged() with Incoming number parameter. Thats it. ServiceReceiver.Java public class ServiceReceiver extends BroadcastReceiver { @Override public void onReceive(final Context context, Intent intent) { TelephonyManager telephony = … Read more

Make a phone call programmatically

To go back to original app you can use telprompt:// instead of tel:// – The tell prompt will prompt the user first, but when the call is finished it will go back to your app: NSString *phoneNumber = [@”telprompt://” stringByAppendingString:mymobileNO.titleLabel.text]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]];

What regular expression will match valid international phone numbers?

\+(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d| 2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]| 4[987654310]|3[9643210]|2[70]|7|1)\d{1,14}$ Is the correct format for matching a generic international phone number. I replaced the US land line centric international access code 011 with the standard international access code identifier of ‘+’, making it mandatory. I also changed the minimum for the national number to at least one digit. Note that if you … Read more