모델 정보 및 계정 가져오기

|

// device 고유 정보값 가져오기

    Log.d(tag"BOARD: " + Build.BOARD);

    Log.d(tag"BRAND: " + Build.BRAND);

    Log.d(tag"CPU_ABI: " + Build.CPU_ABI);

    Log.d(tag"DEVICE: " + Build.DEVICE);

    Log.d(tag"DISPLAY: " + Build.DISPLAY);

    Log.d(tag"FINGERPRINT: " + Build.FINGERPRINT);

    Log.d(tag"HOST: " + Build.HOST);

    Log.d(tag"ID: " + Build.ID);

    Log.d(tag"MANUFACTURER: " + Build.MANUFACTURER);

    Log.d(tag"MODEL: " + Build.MODEL);

    Log.d(tag"PRODUCT: " + Build.PRODUCT);

    Log.d(tag"TAGS: " + Build.TAGS);

    Log.d(tag"TIME: " + Build.TIME);

    Log.d(tag"TYPE: " + Build.TYPE);

    Log.d(tag"USER: " + Build.USER);

       

       

 // device 정보 가져오기

    TelephonyManager telephony=(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);

       

    Log.d(tag"getCallState : "+telephony.getCallState());

    Log.d(tag"getDataActivity : "+telephony.getDataActivity());

    Log.d(tag"getDataState : "+telephony.getDataState());

    Log.d(tag"getDeviceId : "+telephony.getDeviceId());

    Log.d(tag"getDeviceSoftwareVersion : "+telephony.getDeviceSoftwareVersion());

    Log.d(tag"getLine1Number : "+telephony.getLine1Number());

    Log.d(tag"getNetworkCountryIso : "+telephony.getNetworkCountryIso());

    Log.d(tag"getNetworkOperator : "+telephony.getNetworkOperator());

    Log.d(tag"getNetworkOperatorName : "+telephony.getNetworkOperatorName());

    Log.d(tag"getNetworkType : "+telephony.getNetworkType());

    Log.d(tag"getPhoneType : "+telephony.getPhoneType());

    Log.d(tag"getSimCountryIso : "+telephony.getSimCountryIso());

    Log.d(tag"getSubscriberId : "+telephony.getSubscriberId());

    Log.d(tag"getVoiceMailAlphaTag : "+telephony.getVoiceMailAlphaTag());

    Log.d(tag"getVoiceMailNumber : "+telephony.getVoiceMailNumber());

    Log.d(tag"isNetworkRoaming : "+telephony.isNetworkRoaming());

    Log.d(tag"hasIccCard : "+telephony.hasIccCard());

    Log.d(tag"hashCode : "+telephony.hashCode());

    Log.d(tag"toString : "+telephony.toString());

       

// device 계정 정보 가져오기

    Account[] accounts =  AccountManager.get(getApplicationContext()).getAccounts();

    Account account = null;

                 

    for(int i=0;i<accounts.length;i++) {

          account = accounts[i];

          Log.d(tag"Account - name: " + account.name + ", type :" + account.type);

 

          if(account.type.equals("com.google")){     //이러면 구글 계정 구분 가능

                       

          }

    }


Trackback 1 And Comment 0