Skip to content

Commit 6d865d9

Browse files
committed
Interim release which simple upgrades the application for use with the
beta 3 OS release
1 parent 843f09e commit 6d865d9

Some content is hidden

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

46 files changed

+1909
-546
lines changed

NfcTool/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,24 @@ the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).
1212
* [Cascades for BlackBerry 10](https://bdsc.webapps.blackberry.com/cascades/)
1313
* [BlackBerry Native SDK for Tablet OS](https://bdsc.webapps.blackberry.com/native/)
1414

15-
1615
**Author(s)**
1716

1817
* [John Murray](https://github.com/jcmurray)
1918
* [Martin Woolley](https://github.com/mdwoolley)
2019

2120

2221
**Release History**
23-
22+
* **V3.1** - Modified for Beta 3 release compatibility
23+
* **V3** - Added ability to emulate virtual NDEF Tags
2424
* **V3** - Added ability to emulate virtual NDEF Tags
2525
* **V2.1** - Refactored to exploit features in BlackBerry Dev Alpha Device 10.0.6
2626
* **V2** - Added transfer of vCard using SNEP
2727
* **V1** - Reading and Writing NDEF tags
2828

29+
**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.
2933

3034
**Dependencies**
3135

@@ -66,7 +70,6 @@ Here's what you should do:
6670
- - -
6771
...
6872
<invoke-target id="com.example.NfcTool">
69-
<require-source-permissions>invoke_across_perimeters</require-source-permissions>
7073
<type>APPLICATION</type>
7174
<filter>
7275
<action>bb.action.OPEN</action>
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
/* Copyright (c) 2012 Research In Motion Limited.
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
import bb.cascades 1.0
16+
import "common"
17+
18+
Page {
19+
content: MenuContainer {
20+
onCreationCompleted: {
21+
animation.play ();
22+
}
23+
Container {
24+
preferredWidth: 768
25+
preferredHeight: 1280
26+
27+
layout: DockLayout {
28+
}
29+
30+
Container {
31+
layout: StackLayout {
32+
}
33+
34+
topPadding: 20
35+
leftPadding: 20
36+
horizontalAlignment: HorizontalAlignment.Left
37+
verticalAlignment: VerticalAlignment.Top
38+
39+
Label {
40+
text: " Welcome to NFC Tool V" + _about.appVersion
41+
textStyle {
42+
base: SystemDefaults.TextStyles.TitleText
43+
fontWeight: FontWeight.W100
44+
color: Color.White
45+
}
46+
}
47+
48+
Label {
49+
text: "Demonstrates the BlackBerry 10 NFC APIs"
50+
enabled: false
51+
preferredWidth: 650
52+
textStyle {
53+
base: SystemDefaults.TextStyles.BodyText
54+
fontWeight: FontWeight.W100
55+
fontStyle: FontStyle.Italic
56+
color: Color.White
57+
lineHeight: 1.1
58+
}
59+
}
60+
61+
ImageView {
62+
layoutProperties: StackLayoutProperties {
63+
}
64+
imageSource: "asset:///images/generic_tag_larger.png"
65+
onTouch: {
66+
if (event.isDown ()) {
67+
animation.play ()
68+
}
69+
}
70+
attachedObjects: [
71+
SequentialAnimation {
72+
id: animation
73+
animations: [
74+
FadeTransition {
75+
duration: 1000
76+
fromOpacity: 0.0
77+
toOpacity: 1.0
78+
},
79+
RotateTransition {
80+
toAngleZ: -10
81+
duration: 125
82+
},
83+
RotateTransition {
84+
toAngleZ: 10
85+
duration: 250
86+
},
87+
RotateTransition {
88+
toAngleZ: -10
89+
duration: 250
90+
},
91+
RotateTransition {
92+
toAngleZ: 10
93+
duration: 250
94+
},
95+
RotateTransition {
96+
toAngleZ: 0
97+
duration: 125
98+
}
99+
]
100+
}
101+
]
102+
}
103+
104+
Label {
105+
text: "Written by:"
106+
enabled: false
107+
preferredWidth: 650
108+
textStyle {
109+
base: SystemDefaults.TextStyles.SmallText
110+
fontWeight: FontWeight.W100
111+
fontStyle: FontStyle.Default
112+
color: Color.White
113+
}
114+
}
115+
Label {
116+
text: "John Murray (@jcmrim)"
117+
enabled: false
118+
preferredWidth: 650
119+
textStyle {
120+
base: SystemDefaults.TextStyles.SmallText
121+
fontWeight: FontWeight.W100
122+
fontStyle: FontStyle.Default
123+
color: Color.White
124+
}
125+
}
126+
Label {
127+
text: "Martin Woolley (@mdwrim)"
128+
enabled: false
129+
preferredWidth: 650
130+
textStyle {
131+
base: SystemDefaults.TextStyles.SmallText
132+
fontWeight: FontWeight.W100
133+
fontStyle: FontStyle.Default
134+
color: Color.White
135+
}
136+
}
137+
}
138+
139+
Container {
140+
layout: StackLayout {
141+
}
142+
leftPadding: 20
143+
bottomPadding: 20
144+
verticalAlignment: VerticalAlignment.Bottom
145+
horizontalAlignment: HorizontalAlignment.Left
146+
147+
Label {
148+
text: "NFC Tool V" + _about.appVersion
149+
enabled: false
150+
preferredWidth: 650
151+
textStyle {
152+
base: SystemDefaults.TextStyles.SmallText
153+
fontWeight: FontWeight.W100
154+
fontStyle: FontStyle.Default
155+
color: Color.White
156+
}
157+
}
158+
Label {
159+
text: "© 2012 Research In Motion Limited."
160+
enabled: false
161+
preferredWidth: 650
162+
textStyle {
163+
base: SystemDefaults.TextStyles.SmallText
164+
fontWeight: FontWeight.W100
165+
fontStyle: FontStyle.Default
166+
color: Color.White
167+
}
168+
}
169+
}
170+
}
171+
}
172+
}
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
/* Copyright (c) 2012 Research In Motion Limited.
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/import bb.cascades 1.0
15+
import "common"
16+
17+
Page {
18+
content: MenuContainer {
19+
id: apdu
20+
objectName: "apdu_details"
21+
signal apduRequested()
22+
Container {
23+
layout: StackLayout {
24+
}
25+
Label {
26+
text: "ISO7816-4 APDU"
27+
textStyle {
28+
base: SystemDefaults.TextStyles.BigText
29+
color: Color.LightGray
30+
fontWeight: FontWeight.Bold
31+
}
32+
}
33+
Label {
34+
text: "Enter hex values only"
35+
textStyle {
36+
base: SystemDefaults.TextStyles.SubtitleText
37+
fontWeight: FontWeight.W100
38+
color: Color.White
39+
}
40+
}
41+
Label {
42+
text: "AID:"
43+
textStyle {
44+
base: SystemDefaults.TextStyles.BodyText
45+
color: Color.LightGray
46+
}
47+
}
48+
TextArea {
49+
id: txf_aid
50+
objectName: "txf_aid"
51+
hintText: "Enter AID value"
52+
text: _apdu._aid
53+
textStyle {
54+
base: SystemDefaults.TextStyles.SmallText
55+
}
56+
}
57+
Label {
58+
text: "Header:"
59+
textStyle {
60+
base: SystemDefaults.TextStyles.BodyText
61+
color: Color.LightGray
62+
}
63+
}
64+
Container {
65+
layout: StackLayout {
66+
orientation: LayoutOrientation.LeftToRight
67+
}
68+
Label {
69+
text: "CLA:"
70+
verticalAlignment: VerticalAlignment.Center
71+
textStyle {
72+
base: SystemDefaults.TextStyles.SmallText
73+
color: Color.LightGray
74+
}
75+
}
76+
TextArea {
77+
id: txf_cla
78+
objectName: "txf_cla"
79+
hintText: "Enter CLA value"
80+
text: _apdu._cla
81+
textStyle {
82+
base: SystemDefaults.TextStyles.SmallText
83+
}
84+
}
85+
Label {
86+
verticalAlignment: VerticalAlignment.Center
87+
text: "INS:"
88+
textStyle {
89+
base: SystemDefaults.TextStyles.SmallText
90+
color: Color.LightGray
91+
}
92+
}
93+
TextArea {
94+
id: txf_ins
95+
objectName: "txf_ins"
96+
hintText: "Enter INS value"
97+
text: _apdu._ins
98+
textStyle {
99+
base: SystemDefaults.TextStyles.SmallText
100+
}
101+
}
102+
Label {
103+
verticalAlignment: VerticalAlignment.Center
104+
text: "P1 P2:"
105+
textStyle {
106+
base: SystemDefaults.TextStyles.SmallText
107+
color: Color.LightGray
108+
}
109+
}
110+
TextArea {
111+
id: txf_p1p2
112+
objectName: "txf_p1p2"
113+
hintText: "Enter P1 P2 values"
114+
text: _apdu._p1p2
115+
textStyle {
116+
base: SystemDefaults.TextStyles.SmallText
117+
}
118+
}
119+
}
120+
Label {
121+
text: "Lc:"
122+
textStyle {
123+
base: SystemDefaults.TextStyles.BodyText
124+
color: Color.LightGray
125+
}
126+
}
127+
TextArea {
128+
id: txf_lc
129+
objectName: "txf_lc"
130+
hintText: "Enter Lc value or leave blank"
131+
text: _apdu._lc
132+
textStyle {
133+
base: SystemDefaults.TextStyles.SmallText
134+
}
135+
}
136+
Label {
137+
text: "Command data:"
138+
textStyle {
139+
base: SystemDefaults.TextStyles.BodyText
140+
color: Color.LightGray
141+
}
142+
}
143+
TextArea {
144+
id: txf_command
145+
objectName: "txf_command"
146+
hintText: "Enter command byte values"
147+
text: _apdu._command
148+
textStyle {
149+
base: SystemDefaults.TextStyles.SmallText
150+
}
151+
}
152+
Label {
153+
text: "Le:"
154+
textStyle {
155+
base: SystemDefaults.TextStyles.BodyText
156+
color: Color.LightGray
157+
}
158+
}
159+
TextArea {
160+
id: txf_le
161+
objectName: "txf_le"
162+
hintText: "Enter Le value or leave blank"
163+
text: _apdu._le
164+
textStyle {
165+
base: SystemDefaults.TextStyles.SmallText
166+
}
167+
}
168+
}
169+
}
170+
actions: [
171+
ActionItem {
172+
id: send_apdu_action
173+
title: "Issue APDU"
174+
imageSource: "images/iso7816_small.png"
175+
ActionBar.placement: ActionBarPlacement.OnBar
176+
onTriggered: {
177+
console.log("Issue APDU Triggered");
178+
apdu.apduRequested();
179+
}
180+
}
181+
]
182+
}

0 commit comments

Comments
 (0)