1.AndroidManifest.xml에 퍼미션을 추가해준다.(add permission AndroidManifest.xml)
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
2.
TelephonyManager tm =(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String deviceid = tm.getDeviceId();
댓글 없음:
댓글 쓰기