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

Apps help me to display string ?

Discussion in 'Android Development' started by achilles205, Aug 22, 2011.

  1. achilles205

    achilles205 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    5
    Joined:
    Aug 4, 2011

    Aug 4, 2011
    5
    0
    5
    I'm a newbie in android, i want to find serial number of a android device ... Somebody can help me to display string "deviceId" ? Thank for your help :)
    ---------------------------
    final TelephonyManager tm = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);
    final String tmDevice, tmSerial, tmPhone, androidId;
    tmDevice = "" + tm.getDeviceId();
    tmSerial = "" + tm.getSimSerialNumber();
    androidId = "" + android.provider.Settings.Secure.getString(getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);

    UUID deviceUuid = new UUID(androidId.hashCode(), ((long)tmDevice.hashCode() << 32) | tmSerial.hashCode());
    String deviceId = deviceUuid.toString();
     

    Advertisement

  2. achilles205

    achilles205 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    5
    Joined:
    Aug 4, 2011

    Aug 4, 2011
    5
    0
    5
    somebody can help me :(.
     
  3. achilles205

    achilles205 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    5
    Joined:
    Aug 4, 2011

    Aug 4, 2011
    5
    0
    5
    somebody help me ? :(((((((
     
  4. Martimus

    Martimus One bite at a time...
    Rank:
    None
    Points:
    843
    Posts:
    19,535
    Joined:
    Jul 9, 2010

    Jul 9, 2010
    19,535
    4,045
    843
    Male
    Engineer
    'neath a cactus
    Welcome to the Android Forums!

    Moving your thread to the Android Developers forum as you'll have a better change of getting an answer here. Be patient... many of these smart folks work other jobs during the day and it may take a while for someone to see your post and respond accordingly.
     
    achilles205 likes this.
  5. achilles205

    achilles205 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    5
    Joined:
    Aug 4, 2011

    Aug 4, 2011
    5
    0
    5
    thank for your advice :)
     

Share This Page

Loading...