티스토리 뷰



안드로이드/Android 단말 모델 정보 얻어 오기




TestPhoneStateActivity.java
 



package arabiannight.tistroy.com.phonestate;

import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;

public class TestPhoneStateActivity extends Activity {

private static final String TAG = "PhoneState";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Log.i(TAG, "BOARD = " + Build.BOARD);
Log.i(TAG, "BRAND = " + Build.BRAND);
Log.i(TAG, "CPU_ABI = " + Build.CPU_ABI);
Log.i(TAG, "DEVICE = " + Build.DEVICE);
Log.i(TAG, "DISPLAY = " + Build.DISPLAY);
Log.i(TAG, "FINGERPRINT = " + Build.FINGERPRINT);
Log.i(TAG, "HOST = " + Build.HOST);
Log.i(TAG, "ID = " + Build.ID);
Log.i(TAG, "MANUFACTURER = " + Build.MANUFACTURER);
Log.i(TAG, "MODEL = " + Build.MODEL);
Log.i(TAG, "PRODUCT = " + Build.PRODUCT);
Log.i(TAG, "TAGS = " + Build.TAGS);
Log.i(TAG, "TYPE = " + Build.TYPE);
Log.i(TAG, "USER = " + Build.USER);
Log.i(TAG, "VERSION.RELEASE = " + Build.VERSION.RELEASE);

}
}
 







결과화면(Log)





03-24 13:57:20.705: I/PhoneState(29234): BOARD = SHW-M250S
03-24 13:57:20.705: I/PhoneState(29234): BRAND = samsung
03-24 13:57:20.705: I/PhoneState(29234): DEVICE = SHW-M250S
03-24 13:57:20.705: I/PhoneState(29234): DISPLAY = GINGERBREAD.EL21
03-24 13:57:20.705: I/PhoneState(29234): ID = GINGERBREAD
03-24 13:57:20.705: I/PhoneState(29234): MANUFACTURER = samsung
03-24 13:57:20.710: I/PhoneState(29234): MODEL = SHW-M250S
03-24 13:57:20.710: I/PhoneState(29234): PRODUCT = SHW-M250S
03-24 13:57:20.710: I/PhoneState(29234): TAGS = release-keys
03-24 13:57:20.710: I/PhoneState(29234): TYPE = user
03-24 13:57:20.710: I/PhoneState(29234): USER = se.infra
03-24 13:57:20.710: I/PhoneState(29234): VERSION.RELEASE = 2.3.6
 

 


 

파일 첨부 :




 

출처 :  http://polomin.tistory.com/107



댓글
댓글쓰기 폼