09-22-2012 05:39 AM
I am starting with NFC development. working on 7.0 API and i am using 9930 simulator.
Below is the first code for NFC I had tested
package mypackage;
import net.rim.device.api.system.capability.DeviceCapabil
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.container.*;
public class NFCDemo extends UiApplication
{
public static void main(String[] args)
{
new NFCDemo().enterEventDispatcher();
}
public NFCDemo()
{
pushScreen(new NFCPropertiesScreen());
}
private class NFCPropertiesScreen extends MainScreen
{
public NFCPropertiesScreen()
{
setTitle("NFC Capability Reporter");
LabelField lbl[] = new LabelField[2];
lbl[0] = new LabelField();
lbl[1] = new LabelField();
if(DeviceCapability.isNFCSupported())
{
lbl[0].setText("supported true");
} else
{
lbl[0].setText("supported false");
}
if(DeviceCapability.isNFCAvailable())
{
lbl[1].setText("available true");
} else
{
lbl[1].setText("available false");
}
add(lbl[0]);
add(lbl[1]);
}
}
}
And the output I am getting is :
supported true
available false
I also tried to change the NFC settings in phobe from "Off" to 'On" but it again changes to Off again . Can anyone suggest how to get this working . And how should i start the NFC development for blackberry . What resources should i start with ?
Do i require signing keys or NFC controller URI . dont even know what exactly are thses but have come across these terms .
Thanks in advance
Any help is highly appreciated .
Rudrani Angira
09-22-2012 06:17 AM
Hi Rudrani,
Welcome to the support forums,
Just type "NFC" in search box you will get a lot of discussion and information about that.
Foe example
http://supportforums.blackberry.com/t5/Java-Develo
I think this can helpful to you.
Thanks.
09-22-2012 07:29 AM
Hi Pradeep
Thanks for your reply ad sharing the links . But actually i have already gone throug them but did not find the solution
Can you please have a look at my code and its output. It shows
supported true
available false
Can you please suggest what should i do to resolve it ? What are the steps to follow to configure NFC support in simulator and how to simulate it .
Thanks in advance
09-25-2012 04:47 AM
This is the link for testing NFC in the BlackBerry Simulator using the tools from the Open NFC package: https://developer.blackberry.com/java/documentatio
However, having tried that route myself before acquiring an NFC capable device, I would advise that that is a painful process. You will have far more success and greater progress if you test and debug your NFC applications on a BlackBerry with NFC capabilities