We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96a2392 commit ef0b0aaCopy full SHA for ef0b0aa
16/SensorDemos/src/com/oreilly/demo/pa/ch16/NFC233.java
@@ -185,6 +185,11 @@ private void writeTag() {
185
}
186
187
final Ndef ndefref = Ndef.get(mytag);
188
+
189
+ if(ndefref == null) {
190
+ Toast.makeText(this, "Tag is not Ndef: NULL", Toast.LENGTH_SHORT).show();
191
+ return;
192
+ }
193
194
if(!ndefref.isWritable()) {
195
Toast.makeText(this, "The tag is not writable!", Toast.LENGTH_SHORT).show();
0 commit comments