求解啊。。有做mtk的吗,,,

解决方案 »

  1.   

    获取卡槽的类型这个不了解
    下面来段代码你看看  能有啥启发不 
    private static void initMtkDoubleSim() {
    try {
    TelephonyManager tm = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
    Class<?> c = Class.forName("com.android.internal.telephony.Phone");
    Field fields1 = c.getField("GEMINI_SIM_1");
    fields1.setAccessible(true);
    simId_1 = (Integer) fields1.get(null);
    Field fields2 = c.getField("GEMINI_SIM_2");
    fields2.setAccessible(true);
    simId_2 = (Integer) fields2.get(null); Method m = TelephonyManager.class.getDeclaredMethod(
    "getSubscriberIdGemini", int.class);
    imsi_1 = (String) m.invoke(tm, simId_1);
    imsi_2 = (String) m.invoke(tm, simId_2); Method m1 = TelephonyManager.class.getDeclaredMethod(
    "getDeviceIdGemini", int.class);
    imei_1 = (String) m1.invoke(tm, simId_1);
    imei_2 = (String) m1.invoke(tm, simId_2); Method mx = TelephonyManager.class.getDeclaredMethod(
    "getPhoneTypeGemini", int.class);
    phoneType_1 = (Integer) mx.invoke(tm, simId_1);
    phoneType_2 = (Integer) mx.invoke(tm, simId_2); if (TextUtils.isEmpty(imsi_1) && (!TextUtils.isEmpty(imsi_2))) {
    defaultImsi = imsi_2;
    }
    if (TextUtils.isEmpty(imsi_2) && (!TextUtils.isEmpty(imsi_1))) {
    defaultImsi = imsi_1;
    }
    } catch (Exception e) {
    isMtkDoubleSim = false;
    return;
    }
    isMtkDoubleSim = true;
    }
      

  2.   

    FeatureOption.MTK_GEMINI_SUPPORT
    这个是判断是否是双卡
    FeatureOption.MTK_GEMINI_3G_SWITCH
    这个是判断是否是3G