Hi, I developing NFC function now, I discover the NFC jni source code 
different from Android 2.3.7 to Android 4.0.4.
Those different caused NFC function PBtF(Power By the Field) can not work.
Would you please help to answer that modify for what purpose?
And how to turn on the NFC PBtf function in Android 4.0.4?

YaoTsu LIn

The source code show on following.
/packages/apps/Nfc/jni/com_android_nfc_NativeNfcManager.cpp 

*In function "com_android_nfc_NfcManager_doSelectSecureElement"*
/*Android 2.3.7 code base*/
        ret = phLibNfc_SE_SetMode(seID, phLibNfc_SE_ActModeVirtual, 
nfc_jni_se_set_mode_callback,
                (void *)&cb_data);

/* Android 4.0.4 code base*/
    if(seID == 0xABCDF0)
    {
        TRACE("Select UICC");
        ret = phLibNfc_SE_SetMode(seID, phLibNfc_SE_ActModeVirtual, 
nfc_jni_se_set_mode_callback,
                (void *)&cb_data);
    }
    else
    {
        TRACE("Select SMX");
        ret = phLibNfc_SE_SetMode(seID, phLibNfc_SE_ActModeVirtualVolatile, 
nfc_jni_se_set_mode_callback,
                (void *)&cb_data);
    }

*In function "com_android_nfc_NfcManager_doDeselectSecureElement"*
/*Android 2.3.7 code base*/
        ret = phLibNfc_SE_SetMode(seID, phLibNfc_SE_ActModeOff,
                nfc_jni_se_set_mode_callback, (void *)&cb_data);

/* Android 4.0.4 code base*/
    if(seID == 0xABCDF0)
    {
        TRACE("Deselect UICC");
        ret = phLibNfc_SE_SetMode(seID, phLibNfc_SE_ActModeOff,
                nfc_jni_se_set_mode_callback, (void *)&cb_data);
    }
    else
    {
        TRACE("Deselect SMX");
        ret = phLibNfc_SE_SetMode(seID, phLibNfc_SE_ActModeDefault,
                nfc_jni_se_set_mode_callback, (void *)&cb_data);
    }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to