B4A Library NFC library

Discussion in 'Additional libraries, classes and official updates' started by Erel, Feb 12, 2012.

  1. DonManfred

    DonManfred Expert Licensed User

    Please find an updated Library attached.
    Just changed the subname. Set version to 1.26
     

    Attached Files:

    raphaelcno, lemonisdead and Jmu5667 like this.
  2. BW17

    BW17 Member Licensed User

    Hello,

    Sorry for my very bad english...

    Is it possible to get the physical adress (serial number) of the tag with NFC library ?

    If yes, how do this please.

    Thanks in advance.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Check the output of Log(Activity.GetStartingIntent.ExtrasToString). It will print all the available information.
     
  4. BW17

    BW17 Member Licensed User

    Many thanks Erel,

    But i don't understand why scanning the same tag 3 times, the "android.nfc.extra.ID" is never the same ?
    It is not the tag ID ?

    Bundle[{android.nfc.extra.NDEF_MESSAGES=[Landroid.os.Parcelable;@424bb968, android.nfc.extra.ID=[B@424bcef8, android.nfc.extra.TAG=TAG: Tech [android.nfc.tech.NfcA, android.nfc.tech.MifareUltralight, android.nfc.tech.Ndef]}]
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (main) Resume **
    Bundle[{android.nfc.extra.NDEF_MESSAGES=[Landroid.os.Parcelable;@424f71e8, android.nfc.extra.ID=[B@424f7400, android.nfc.extra.TAG=TAG: Tech [android.nfc.tech.NfcA, android.nfc.tech.MifareUltralight, android.nfc.tech.Ndef]}]
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (main) Resume **
    Bundle[{android.nfc.extra.NDEF_MESSAGES=[Landroid.os.Parcelable;@4250f2d0, android.nfc.extra.ID=[B@4250f4e8, android.nfc.extra.TAG=TAG: Tech [android.nfc.tech.NfcA, android.nfc.tech.MifareUltralight, android.nfc.tech.Ndef]}]
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Try this code:
    Code:
    Dim id() As Byte = Activity.GetStartingIntent.GetExtra("android.nfc.extra.ID")
    Dim bc As ByteConverter
    Log("id: " & bc.HexFromBytes(id))
     
  6. BW17

    BW17 Member Licensed User

    Thanks again Erel.

    Works fine !
     
  7. Jmu5667

    Jmu5667 Well-Known Member Licensed User

    Nearly finished our first NFC app, combination of B4A, VB6, SQL Server.

    upload_2015-8-14_8-55-32.png
     
    DonManfred and Erel like this.
  8. Jmu5667

    Jmu5667 Well-Known Member Licensed User

    We will be staring work on iBeacons next week :)
     
  9. fabpalma

    fabpalma Member Licensed User

    Erel, what about using your library also to emulate NFC tags ?
    Starting from Android 4.4 there is this possibility.
    Here there is the code (I don't know how to do a library from this Java code....)

    http://developer.android.com/samples/CardEmulation/index.html

    I would use my Sony Smartwatch as NFC tag ....

    Regards.
    Fab
     
  10. coslad

    coslad Well-Known Member Licensed User

    I need it too !!!
     
  11. bioident

    bioident Member Licensed User

    What new in NFC 1.26 ?
     
  12. raphaelcno

    raphaelcno Active Member Licensed User

    GeTagtUID has been renamed to GetTagUID ("t" has been moved).
     
    DonManfred likes this.
  13. bioident

    bioident Member Licensed User

    ok thanks

    I have question
    How can I change key A ,B NFC from NFC library.
    I want save data on card and I have to change security code.
     
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