Skip to content

Commit 2a3b480

Browse files
committed
Merge pull request blackberry#43 from jcmurray/master
Version 4.0 -- Added new functionality ...
2 parents 25906af + f360cb1 commit 2a3b480

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+755
-1184
lines changed

NfcTool/.cproject

Lines changed: 210 additions & 0 deletions
Large diffs are not rendered by default.

NfcTool/.project

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>NfcTool</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10+
<arguments>
11+
<dictionary>
12+
<key>?name?</key>
13+
<value></value>
14+
</dictionary>
15+
<dictionary>
16+
<key>org.eclipse.cdt.make.core.append_environment</key>
17+
<value>true</value>
18+
</dictionary>
19+
<dictionary>
20+
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
21+
<value>Device-Debug</value>
22+
</dictionary>
23+
<dictionary>
24+
<key>org.eclipse.cdt.make.core.buildArguments</key>
25+
<value></value>
26+
</dictionary>
27+
<dictionary>
28+
<key>org.eclipse.cdt.make.core.buildCommand</key>
29+
<value>make</value>
30+
</dictionary>
31+
<dictionary>
32+
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
33+
<value>clean</value>
34+
</dictionary>
35+
<dictionary>
36+
<key>org.eclipse.cdt.make.core.contents</key>
37+
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
38+
</dictionary>
39+
<dictionary>
40+
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
41+
<value>true</value>
42+
</dictionary>
43+
<dictionary>
44+
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
45+
<value>true</value>
46+
</dictionary>
47+
<dictionary>
48+
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
49+
<value>true</value>
50+
</dictionary>
51+
<dictionary>
52+
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
53+
<value>Device-Debug</value>
54+
</dictionary>
55+
<dictionary>
56+
<key>org.eclipse.cdt.make.core.stopOnError</key>
57+
<value>true</value>
58+
</dictionary>
59+
<dictionary>
60+
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
61+
<value>true</value>
62+
</dictionary>
63+
</arguments>
64+
</buildCommand>
65+
<buildCommand>
66+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
67+
<triggers>full,incremental,</triggers>
68+
<arguments>
69+
</arguments>
70+
</buildCommand>
71+
<buildCommand>
72+
<name>com.rim.tad.tools.qml.core.qmlFileBuilder</name>
73+
<arguments>
74+
</arguments>
75+
</buildCommand>
76+
<buildCommand>
77+
<name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name>
78+
<arguments>
79+
</arguments>
80+
</buildCommand>
81+
</buildSpec>
82+
<natures>
83+
<nature>com.rim.tad.tools.wst.jsdt.core.jsNature</nature>
84+
<nature>org.eclipse.cdt.core.cnature</nature>
85+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
86+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
87+
<nature>com.qnx.tools.ide.bbt.core.bbtnature</nature>
88+
<nature>org.eclipse.cdt.core.ccnature</nature>
89+
<nature>com.rim.tad.tools.qml.core.qmlNature</nature>
90+
</natures>
91+
</projectDescription>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
eclipse.preferences.version=1
2+
environment/project/com.qnx.qcc.toolChain.1019757503/CPULIST/delimiter=,
3+
environment/project/com.qnx.qcc.toolChain.1019757503/CPULIST/operation=append
4+
environment/project/com.qnx.qcc.toolChain.1019757503/CPULIST/value=arm
5+
environment/project/com.qnx.qcc.toolChain.1019757503/VARIANTLIST/delimiter=,
6+
environment/project/com.qnx.qcc.toolChain.1019757503/VARIANTLIST/operation=append
7+
environment/project/com.qnx.qcc.toolChain.1019757503/VARIANTLIST/value=g
8+
environment/project/com.qnx.qcc.toolChain.1019757503/append=true
9+
environment/project/com.qnx.qcc.toolChain.1019757503/appendContributed=true
10+
environment/project/com.qnx.qcc.toolChain.1753360482/CPULIST/delimiter=,
11+
environment/project/com.qnx.qcc.toolChain.1753360482/CPULIST/operation=append
12+
environment/project/com.qnx.qcc.toolChain.1753360482/CPULIST/value=arm
13+
environment/project/com.qnx.qcc.toolChain.1753360482/EXCLUDE_VARIANTLIST/delimiter=,
14+
environment/project/com.qnx.qcc.toolChain.1753360482/EXCLUDE_VARIANTLIST/operation=append
15+
environment/project/com.qnx.qcc.toolChain.1753360482/EXCLUDE_VARIANTLIST/value=r
16+
environment/project/com.qnx.qcc.toolChain.1753360482/append=true
17+
environment/project/com.qnx.qcc.toolChain.1753360482/appendContributed=true
18+
environment/project/com.qnx.qcc.toolChain.1828784634/CPULIST/delimiter=,
19+
environment/project/com.qnx.qcc.toolChain.1828784634/CPULIST/operation=append
20+
environment/project/com.qnx.qcc.toolChain.1828784634/CPULIST/value=x86
21+
environment/project/com.qnx.qcc.toolChain.1828784634/VARIANTLIST/delimiter=,
22+
environment/project/com.qnx.qcc.toolChain.1828784634/VARIANTLIST/operation=append
23+
environment/project/com.qnx.qcc.toolChain.1828784634/VARIANTLIST/value=g
24+
environment/project/com.qnx.qcc.toolChain.1828784634/append=true
25+
environment/project/com.qnx.qcc.toolChain.1828784634/appendContributed=true

NfcTool/Makefile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
QMAKE_TARGET = NfcTool
2+
QMAKE = $(QNX_HOST)/usr/bin/qmake
3+
TARGET = $(QMAKE_TARGET)
4+
5+
6+
all: Makefile $(QMAKE_TARGET)
7+
8+
clean:
9+
$(MAKE) -C ./arm -f Makefile sureclean
10+
$(MAKE) -C ./x86 -f Makefile sureclean
11+
12+
13+
Makefile: FORCE
14+
$(QMAKE) -spec unsupported/blackberry-armv7le-qcc -o arm/Makefile $(QMAKE_TARGET).pro CONFIG+=device
15+
$(QMAKE) -spec unsupported/blackberry-x86-qcc -o x86/Makefile $(QMAKE_TARGET).pro CONFIG+=simulator
16+
$(MAKE) -C ./translations -f Makefile update release
17+
18+
FORCE:
19+
20+
$(QMAKE_TARGET): device simulator
21+
22+
device:
23+
$(MAKE) -C ./arm -f Makefile all
24+
25+
Device-Debug: Makefile
26+
$(MAKE) -C ./arm -f Makefile debug
27+
28+
Device-Release: Makefile
29+
$(MAKE) -C ./arm -f Makefile release
30+
31+
simulator:
32+
$(MAKE) -C ./x86 -f Makefile all
33+
34+
Simulator-Debug: Makefile
35+
$(MAKE) -C ./x86 -f Makefile debug

NfcTool/NfcTool.pro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ CONFIG += qt warn_on debug_and_release cascades
66
INCLUDEPATH += ../src
77
SOURCES += ../src/*.cpp
88
HEADERS += ../src/*.hpp ../src/*.h
9-
#LIBS += -lnfcapi
10-
LIBS += -lnfc -lnfc_bps
9+
LIBS += -lnfc -lnfc_bps -lbbsystem -lQtNfcSubset
1110

1211
lupdate_inclusion {
1312
SOURCES += ../assets/*.qml

NfcTool/README.md

Lines changed: 10 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# NFC Tag Reading and Writing Sample
1+
# A Compendium of NFC Samples
22

33
The purpose of this application is to demonstrate how to use selected
44
BlackBerry 10 NFC APIs. The Release History section gives details of
@@ -19,81 +19,34 @@ the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).
1919

2020

2121
**Release History**
22+
23+
* **V4** - Added support for sending ISO7816 APDUs and handling Transaction Events
2224
* **V3.1** - Modified for Beta 3 release compatibility
2325
* **V3** - Added ability to emulate virtual NDEF Tags
24-
* **V3** - Added ability to emulate virtual NDEF Tags
2526
* **V2.1** - Refactored to exploit features in BlackBerry Dev Alpha Device 10.0.6
2627
* **V2** - Added transfer of vCard using SNEP
2728
* **V1** - Reading and Writing NDEF tags
2829

2930
**Known Issues**
30-
1. Reading a tag when the app is not running causes the app to be launched but the event log is not automatically switched to. Read tag with app already running
31-
and the event log is correctly shown.
32-
2. Work is in progress to add functionality relating to UICC secure element APIs. This is not yet complete and so the code is not yet connected to the UI.
31+
32+
None.
3333

3434
**Dependencies**
3535

36-
1. BlackBerry Dev Alpha Device Software **10.0.9**
37-
2. BlackBerry 10 Native SDK **10.0.9**
36+
1. BlackBerry Dev Alpha Beta 3 Device Software **10.0.9**
37+
1. BlackBerry 10 Native SDK **10.0.9**
3838

3939
**How to Build NfcTool**
4040

41-
We took the decision to distribute only the contents of the **"src/"** and **"assets/"**
42-
directories along with the **"NfcTool.pro"** file with this example.
43-
44-
We've found it to be the more reliable technique whilst the meta-data associated with
45-
an NDK project is still subject to change between versions of the NDK. You are less
46-
likely to run into issues with a project if you create it as a new empty project
47-
in your workspace and copy files into it rather than import a project with a
48-
structure from an older version of the IDE.
49-
50-
Here's what you should do:
51-
52-
* Create a new empty Cascades C++ project in your workspace called **"NfcTool"**
53-
* **File** > **New** > BlackBerry Cascades C++ Project
54-
* Enter Project Name: **NfcTool** > **Next**
55-
* Select: **Standard empty project** > **Finish**
56-
* You've now got a clean project set up appropriately for your version of the IDE
57-
* Delete the **"app.cpp"** and **"app.hpp"** files from the project's **"src/"** directory -- we don't need them
58-
* Replace contents of the **"src/"** and **"assets/"** directories in the project by the contents of **"src/"** and **"assets/"* from this repo
59-
* Replace **"NfcTool.pro"** in the project by the one in this repo
60-
* This file just ensure that the **"libnfc.so"** and **"libnfc_bps.so"** libraries are available to the build process since they're not included in the library path by default.
61-
* You'll also now have a **"bar-descriptor.xml"** which is correct for your verion of the IDE.
62-
* You need to make sure it's populated with your own **Debug Token**
63-
* Also, if you want to ensure that the application has the correct icon and startup splash screen (I'm sure you do!) open the **"bar-descriptor.xml"** file, select the **"Application"** tab and choose:
64-
* **"assets/images/generic\_tag.png"** as the **Icon image**
65-
* **"assets/images/splash\_landscape.png"** and **"assets/images/splash.png"** as the **"Landscape"** and **"Portrait"** splash screen images respectively.
66-
* In BlackBerry Dev Alpha Device Software 10.0.6 the **Invocation Framework** is now used to register an application to be notified when an NFC NDEF tag is presented to the device. You need to add this registration to your **"bar-descriptor.xml"** file. The registration that we use in this sample application is shown in the code section below.
67-
68-
Add this stanza to your **"bar-descriptor.xml"** file at the end, just before the closing **"&lt;/qnx&gt;"** tag. The meaning of the various fields is described in the article that accompanies this code sample.
69-
70-
- - -
71-
...
72-
<invoke-target id="com.example.NfcTool">
73-
<type>APPLICATION</type>
74-
<filter>
75-
<action>bb.action.OPEN</action>
76-
<mime-type>application/vnd.rim.nfc.ndef.1.Sp</mime-type>
77-
</filter>
78-
<filter>
79-
<action>bb.action.OPEN</action>
80-
<mime-type>application/vnd.rim.nfc.ndef.1.T</mime-type>
81-
</filter>
82-
<filter>
83-
<action>bb.action.OPEN</action>
84-
<mime-type>application/vnd.rim.nfc.ndef.1.U</mime-type>
85-
</filter>
86-
</invoke-target>
87-
...
88-
- - -
89-
41+
Simply Import the project into a workspace in your NDK. Of course you should review the project after it's been imported paying particular attention to the settings in the **bar-descriptor.xml** file. It should be changed to reflect values in the **&lt;author&gt;** and **&lt;authorId&gt;** elements that are appropriate for you.
9042

9143
**But I don't want to build it myself**
9244

9345
If you don't want to build this sample application yourself we've included a
9446
pre-build and signed BAR files for each version. You can find them in the
95-
folder "installable-bar-files" as follows:
47+
folder **"/installable-bar-files"** as follows:
9648

49+
* **NfcTool-4\_0\_0\_2.bar** -- Signed BAR file for Version 4.0 (V4.0) of the application ( requires BlackBerry Dev Alpha Device Beta 3 Software 10.0.9 )
9750
* **NfcTool-3\_0\_0\_51.bar** -- Signed BAR file for Version 3.0 (V3.0) of the application ( requires BlackBerry Dev Alpha Device Software 10.0.6 )
9851
* **NfcTool-2\_1\_0\_2.bar** -- Signed BAR file for Version 2.1 (V2.1) of the application ( requires BlackBerry Dev Alpha Device Software 10.0.6 )
9952
* **NfcTool-2\_0\_0\_1.bar** -- Signed BAR file for Version 2 (V2) of the application ( requires BlackBerry Dev Alpha Device Software 10.0.4 )

NfcTool/README.md.bak

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)