First of all, you should keep in mind that in the GSM world, the phone
number identifies the SIM, the user's account; it does not identify
the phone.

There is, however, in the android.telephony package, an method of the
TelephonyManager class called getDeviceId() that returns a unique ID
for the phone: IMEI for a GSM phone and MEID for CDMA.

There is also a getLine1Number() that returns the phone number, which
is probably not what you really want on a GSM phone. It might not even
be what you want on a CDMA phone, since there are obsure models with
two lines, and even more obscure models that take a SIM even on CDMA.

On Jun 25, 2:36 pm, Nando Android <[email protected]> wrote:
> Hello,
>
> I wonder how could I fetch the phone's phone number or an unique id
> to identify it?
>
> Thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to