Saturday, June 26, 2010

Re: [android-developers] Re: How to fetch phone's phone number or unique ID

Exactly, I want an unique ID to it.

How can I call it? Do I have to instantiate something?

Thanks,

On Sat, Jun 26, 2010 at 4:25 PM, Indicator Veritatis <mej1960@yahoo.com> wrote:
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 <nando.andr...@gmail.com> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate