六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 39|回复: 0

Getting the IMSI / IMEI (SIM/Device unique IDs)

[复制链接]

升级  92.67%

55

主题

55

主题

55

主题

秀才

Rank: 2

积分
189
 楼主| 发表于 2013-1-15 02:50:13 | 显示全部楼层 |阅读模式
<span style="border-collapse: separate; font-family: Verdana; font-size: 16px;">What you learn: You will learn how read out the IMSI (International Mobile Subscriber Identity) of the SIM-Card present in your mobile and the IMEI (International Mobile Equipment Identity). The IMSI identifies with the SIM, the IMEI with the device

Possible Scenario: You need a unique id for authentication/registration or license purposes of your Android-Activity  This two lines below provide you one SIM-unique ID, the IMSI and the device-unique ID the IMEI  

Difficulty: 1 of 5  

 Questions/Problems: Simply post below... 

Description: 
An International Mobile Subscriber Identity, or IMSI, is a unique number associated with all GSM and Universal Mobile Telecommunications System (UMTS) network mobile phone users. It is stored in the Subscriber Identity Module (SIM) inside the phone and is sent by the phone to the network. It is also used to acquire other details of the mobile in the Home Location Register (HLR)or as locally copied in the Visitor Location Register. In order toavoid the subscriber being identified and tracked by eavesdroppers onthe radio interface, the IMSI is sent as rarely as possible and a randomly generated TMSI is sent instead

The International Mobile Equipment Identity or IMEI is a number unique to every GSM and UMTS mobile phone.It is usually found printed on the phone underneath the battery and can also be found by dialing the sequence *#06# into the phone. 


Code: And this is how you read out the unique IMSI-ID / IMEI-ID within Android
[table=90%][tr][td]Java:[/td][/tr][tr][td]<div style="font-family: monospace;">String myIMSI = android.os.SystemProperties.get(android.telephony.TelephonyProperties.PROPERTY_IMSI)
// within my emulator it returns:   310995000000000 

String myIMEI = android.os.SystemProperties.get(android.telephony.TelephonyProperties.PROPERTY_IMEI)
// within my emulator it returns:   000000000000000
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表