1. Download our Official Android App: Forums for Android!

Apps Looking for a unique phone identifier

Discussion in 'Android Development' started by James McMurray, Sep 27, 2010.

  1. James McMurray

    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    18
    Joined:
    May 5, 2009

    May 5, 2009
    18
    0
    15
    Hi, I'm trying to find a qay to uniquely identify a device that is not tied to the SIM card. That is, some sort of serial number or device identifier that will be different between two phones and will not change if the user swaps SIM cards. TelephonyManager.getDeviceId() and .getSimSerialNumber() won't work, as they are tied to the SIM card.

    BlackBerry has DeviceInfo.getDeviceId(). Does something like this exist in Android?
     

    Advertisement

  2. miXer

    miXer Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    313
    Joined:
    Aug 12, 2010

    Aug 12, 2010
    313
    51
    53
    Norway
    You can use:
    TelephonyManager t = Context.getSystemService(Context.TELEPHONY_SERVICE);
    String dID = t.getDeviceId();
     
  3. James McMurray

    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    18
    Joined:
    May 5, 2009

    May 5, 2009
    18
    0
    15
    As I mentioned in the opening post, TelephonyManager.getDeviceId() and .getSimSerialNumber() won't work, as they are tied to the SIM card. I'm hoping to identify unique devices, not SIM cards.
     
  4. JiMMaR

    JiMMaR Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    363
    Joined:
    Jun 12, 2010

    Jun 12, 2010
    363
    57
    53
  5. miXer

    miXer Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    313
    Joined:
    Aug 12, 2010

    Aug 12, 2010
    313
    51
    53
    Norway
    On TelephonyManager help site it says getDeviceId() returns the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones.
     
  6. RNekic

    RNekic Newbie
    Rank:
    None
    Points:
    16
    Posts:
    12
    Joined:
    May 25, 2010

    May 25, 2010
    12
    1
    16

Share This Page

Loading...