NFC make me cry

116 views
Skip to first unread message

BierGarten100

unread,
Dec 18, 2019, 1:41:51 PM12/18/19
to MIT App Inventor Forum
Hello,

can anyone tell me how can i use the Sensor Nearfield correctly?
Nearfield readmode is "off".

When i push a button, i tell him go "on".

So... i put a nfc card under my phone an its give me a sound *piep*.
When i tell the block ".TagRead" set a label to message.
Nothing to do.

And Writing Text on my NFC Card doesnt work too.

Taifun

unread,
Dec 18, 2019, 1:54:08 PM12/18/19
to MIT App Inventor Forum
did you do the  NFC Cup Game tutorial?

also generally a good idea is to search the forum before asking

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.        

BierGarten100

unread,
Dec 18, 2019, 3:02:56 PM12/18/19
to MIT App Inventor Forum
did you do the  NFC Cup Game tutorial?

Screenshot_20191218-205823.jpg 


Yes. But the App doesnt work for me. I have NFC Cards with this informations:

Screenshot_20191218-205742_NFC Tools PRO.jpg

The Serial Number is for every card other.

BierGarten100

unread,
Dec 18, 2019, 3:20:07 PM12/18/19
to MIT App Inventor Forum
EDIT: I have one card what sroted this information

Screenshot_20191218-211500_NFC Tools PRO.jpg


(NDEF)
This card works i think for reading and writing but look whats happen

Screenshot_20191218-211429_NFC.jpg

When i click on the "Neues Tag erkannt" in english "New Tag recognized" comes a window with no information or with "empty string" text.

SteveJG

unread,
Dec 18, 2019, 3:27:35 PM12/18/19
to mitappinv...@googlegroups.com
Here is what the Forum discussions know about using NFC  https://groups.google.com/forum/#!searchin/mitappinventortest/nfc%7Csort:date  Perhaps there is something useful in the topics?  It appears you did not READ the links in Taifun's post.  Advice is there.   If some tags provide a response and others do not, there is a reason.   Either improper coding or possibly a NFC tag that is using a special format?

You stand a better chance of getting advice if you post an image of the pertinent Blocks in your app so we can 'see' what you are trying to do.

When you get the window with no information, have you attempted to see what is returned in your Blocks using DoIt.   Do you know what DoIt does?

Here are some resources to help you learn to use the AI2 tools  A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  

How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .


ALSO Note:

NearField

Non-visible component to provide NFC capabilities. For now this component supports the reading and writing of text tags only (if supported by the device)

In order to read and write text tags, the component must have its ReadMode property set to True or False respectively.

Note: This component will only work on Screen1 of any App Inventor app.

Properties

LastMessage
ReadMode
TextToWrite
WriteType

Events

TagRead(text message)
Indicates that a new tag has been detected. Currently this is only a plain text tag, as specified in the manifest. See Compiler.java.
TagWritten()
Event for TagWritten

Methods

none

BierGarten100

unread,
Dec 18, 2019, 4:46:49 PM12/18/19
to MIT App Inventor Forum
Hey i think the NearField makes issue.

I have start a new clean projekt and put 1 label, 1 textbox, 2 buttons, 1 notifier and 1 nearfield in my projekt.
My Block's:

blocks (4).png

The App crash!

Without a NearField ... the app still work.

BierGarten100

unread,
Dec 18, 2019, 5:01:17 PM12/18/19
to mitappinv...@googlegroups.com
I change the Blocks like this

blocks (5).png

it works... BUT... It comes a action selection witch app call the action.
I used my app and then comes a "Runtime Error: API cannot be called while activity is paused"
But which "activity" is "paused". I cry more and more. I think AppInventor need a Update?!

TimAI2

unread,
Dec 18, 2019, 5:09:20 PM12/18/19
to MIT App Inventor Forum
Does TagRead work ?

BierGarten100

unread,
Dec 18, 2019, 5:53:04 PM12/18/19
to MIT App Inventor Forum
Yes. But when its Read... i must select a aplication what can handle it. (so i select my own app)
After this selection its tell me the NFC Tag and this Error.
I can only close the application or clicking on the screen for ignoring.

But I don't want this mistake to come.
Why does he come over and over again?
I haven't paused the app. And what API does it mean?

BierGarten100

unread,
Dec 19, 2019, 3:41:11 PM12/19/19
to MIT App Inventor Forum
Cant no one help me?`
Why is this error every time there?

TimAI2

unread,
Dec 20, 2019, 6:39:50 PM12/20/19
to MIT App Inventor Forum
Continuing on new community....
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages