Android Question NFC/NDEF newbie question

Discussion in 'Android Questions' started by JordiCP, Jun 5, 2016.

Similar threads

B4A Tutorial NFC - Reading and Writing
B4A Tutorial Reading NDEF data from NFC tags
B4A Tutorial Android Beam Tutorial
B4A Library NFC library
B4A Question NFC 2.01 & Android 7.0
  1. JordiCP

    JordiCP Well-Known Member Licensed User

    I have been able to write some plain text NDEF fields to NFC cards using external utilities. I have read that several mime types can be defined, so that the system can handle its content conveniently. B

    My question, perhaps obvious, is if it is possible to write URL NDEF fields so that, without need of any app, when Android reads the tag, opens the browser directly with the URL.

    If possible, I would like to do it first writing tags and then peer-to-peer. But first I need to know if it is possible. I think the answer is yes but would need confirmation and advice

    Any help will be welcome :)
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Yes.
    Code:
    WriteNdef(Array(nfc.CreateUriRecord("http://www.b4x.com")))
     
    JordiCP likes this.
  3. JordiCP

    JordiCP Well-Known Member Licensed User

    Never mind, I found it

    Keeping the browser open, it is redirected to the url contained in the nfc tag when it is read

    I like it ;)
     
  4. JordiCP

    JordiCP Well-Known Member Licensed User

    Thanks, I was writting before seeing this answer. My concern was about automatic intent handling by the browser.
    Now I can proceed with the app :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice