Possible Duplicate:
How to detect system information like os or device type
I am new to android application development.
I developed one small application,and install that application .apk file in my device,it is working good.
But my requirement is When i install .apk file first time in my device,then i have to retrieve the total device information and store that information in my database.
please help me go forward
This question is related to
android
You may want to take a look at those pages : http://developer.android.com/reference/android/os/Build.html and http://developer.android.com/reference/java/lang/System.html (the getProperty() method might do the job).
For instance :
System.getProperty("os.version"); // OS version
android.os.Build.VERSION.SDK // API Level
android.os.Build.DEVICE // Device
android.os.Build.MODEL // Model
android.os.Build.PRODUCT // Product
Etc...
Try this:
// Code For IMEI AND IMSI NUMBER
String serviceName = Context.TELEPHONY_SERVICE;
TelephonyManager m_telephonyManager = (TelephonyManager) getSystemService(serviceName);
String IMEI,IMSI;
IMEI = m_telephonyManager.getDeviceId();
IMSI = m_telephonyManager.getSubscriberId();
If you want device ID information use TelephonyManager. Here is the link for that :
http://facinatingandroid.blogspot.in/2011/09/android-device-information.html
and also check this :
http://sree.cc/google/android/reading-phone-device-details-in-android
Source: Stackoverflow.com