How to Retrieve the Terminal's MEID Number: Difference between revisions

From wizarPOS
(Created page with "Snippet code: private static String getMEID(Context context,TelephonyManager telephonyManager){ String meid = null; int count = telephonyManager.getPhoneCount();...")
 
(Replaced content with "{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/sim-ethenet-wifi/retrieve-terminal-meid-number}}")
Tag: Replaced
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Snippet code:
{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/sim-ethenet-wifi/retrieve-terminal-meid-number}}
  private static String getMEID(Context context,TelephonyManager telephonyManager){
    String meid = null;
    int count = telephonyManager.getPhoneCount();
        for (int i = 0; i < count; i++) {
            int[] subIds = SubscriptionManager.getSubId(i);
            int phoneType = telephonyManager.getCurrentPhoneType(subIds[0]);
            if(phoneType == TelephonyManager.PHONE_TYPE_CDMA){
              meid = telephonyManager.getDeviceId(i);
              android.util.Log.d("meid ", " meid slot"+ i +" = "+ meid);
              break;
            }
        }
        if(!TextUtils.isEmpty(meid)&&(meid.length() == 14 || meid.length() == 15)){
        return meid;
        }
        meid = Settings.Global.getString(
            context.getContentResolver(),"cdma_meid_with_no_card");
        android.util.Log.d("meid ", meid);
        if(!TextUtils.isEmpty(meid)&&(meid.length() == 14 || meid.length() == 15)){
        return meid;
        }
    return "";
    }

Latest revision as of 09:05, 7 April 2024

Please visit new link of same subject:

https://smartpossdk.gitbook.io/cloudpossdk/faq/sim-ethenet-wifi/retrieve-terminal-meid-number

We're making a move! Our site's content is migrating to a new URL, to provide you with an enhanced browsing experience. Please update your bookmarks accordingly. Thank you for your continuous support!