Android Question NFC binary data

Discussion in 'Android Questions' started by Nickelgrass, May 19, 2015.

  1. Nickelgrass

    Nickelgrass Active Member Licensed User

    Hello,
    I am trying to read a NFC card.

    So far I figured out that I need this permission:
    Code:
    ' NFC Permission
    AddActivityText(activity, <intent-filter>
        <action android:name=
    "android.nfc.action.TAG_DISCOVERED"/>
        <category android:name=
    "android.intent.category.DEFAULT"/>
    </
    intent-filter>)
    But I did not figure out how to get the binary data. The NFC and NFCforeground Libraries did not supply any data in the result.
    Code:
    Dim List_NdefRecords As List
            List_NdefRecords = nf.GetNdefRecords(
    Activity.GetStartingIntent)
              
    Log (List_NdefRecords)
    It just gives an empty array. How can I get non ndef data?

    Thanks!

    Regards!
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Are you reading a NDEF tag? Otherwise it will not work with the NFC library.
     
  3. Nickelgrass

    Nickelgrass Active Member Licensed User

    No, I think its just binary data. I dont get an ndef event from the intent filter in the manifest if its set to ndef. How can I read the binary data?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    NFC library only works with NDEF tags.
     
  5. Nickelgrass

    Nickelgrass Active Member Licensed User

    Is there no way to read binary data? Perhaps with a java library?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    You can use base 64 encoding to store binary data.
     
  7. Nickelgrass

    Nickelgrass Active Member Licensed User

    Reading binary data was in referance to NFC. Is there a way to read NFC binary data with Java? There are apps who can read all types of cards so I guess the hardware suports it.
     
  8. Erel

    Erel Administrator Staff Member Licensed User

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