Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
Rudrani
Posts: 6
Registered: ‎09-17-2012
My Device: 9900
My Carrier: vodafone

starting NFC development o 9930 simulator

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.DeviceCapability;
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

 

 

Please use plain text.
Developer
pradeep_ch
Posts: 543
Registered: ‎12-23-2010
My Device: Z10
My Carrier: Airtel

Re: starting NFC development o 9930 simulator

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-Development/NFC-Article-and-Code-Index/ta-p/1538775

 

I think this can helpful to you.

 

Thanks.

 

Please use plain text.
New Contributor
Rudrani
Posts: 6
Registered: ‎09-17-2012
My Device: 9900
My Carrier: vodafone

Re: starting NFC development o 9930 simulator

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

 

 

Please use plain text.
Developer
paulkayuk
Posts: 133
Registered: ‎04-30-2010
My Device: Curve 8520
My Carrier: T-Mobile

Re: starting NFC development o 9930 simulator

This is the link for testing NFC in the BlackBerry Simulator using the tools from the Open NFC package: https://developer.blackberry.com/java/documentation/testing_nfc_applications_1627604_11.html

 

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

Please use plain text.