Deactivate NVC connection to NFC Tag type 4 before closing to avoid app crash (Known Issue)
This article shows you how to get rid of application crashing when application using NFC with Tag Type 4.
Article Metadata
Tested with
Article
Contents |
Introduction
When a NFC application is run on Symbian Anna/Belle that communicate with NFC tag type 4 then we see a problem. The problem is that our application closed. Our application get a panic when the tag is removed. This happen because of a bug in NFC implementation. The bug has been identified and is fixed in platform release that will be available in the coming release after Belle.
How to produce the bug
-Use the following code when a tag is removed away from the C7 (for example) This does not work and give panic though the API should be used like this way.
void CNfcHandler::TagLost()
{
iTag->CloseConnection(*iIso14443Connection);
delete iIso14443Connection;
iIso14443Connection = 0;
}
-Run the application
-Bring an NFC tag type 4 and remove it (Our NFC app is closed because of panic)
Work Around
Because of the bug it does not work as it should be. We can try the following code if we develop application for platform up to Belle. Following code works.
void CNfcHandler::TagLost()
{
if(iIso14443Connection->IsActivated())
{
iIso14443Connection->Deactivate();
}
iTag->CloseConnection(*iIso14443Connection);
delete iIso14443Connection;
iIso14443Connection = 0;
}
Device SW used to test
Use C7 with FW 022.013 and FW022.014

