title: Android: how to detect a private number programmatically
body: <p>I use BroadcastReceiver to intercept incoming call on Android phone as below</p>
  
  <pre><code>tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
  Bundle bundle = intent.getExtras();
  String number = bundle.getString(TelephonyManager.EXTRA_INCOMING_NUMBER);
  </code></pre>
  
  <p>In the "private number" case, I tested on two devices, it shows the number as -1 on HTC Wildfire and -2 on Galaxy S. I checked the <code>android.telephony.PhoneNumberUtils</code> but it could't help me.</p>
  
  <p>Is there a function or a generic way to detect a private number on Android phone?</p>