I saw only two people who made an extension for NFC, so Congratulations @Marco_Perrone
And @Taifun please take a look at this. Thank you
I saw only two people who made an extension for NFC, so Congratulations @Marco_Perrone
And @Taifun please take a look at this. Thank you
Thank You very much Salman
thank you for your contribution...
please edit your post and add a little bit of documentation...
which properties, methods and events are available? how to use it?
thank you
added in the extensions directory... https://puravidaapps.com/extensions.php
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
This is the new version of my MifareInfo extension.
In this version I have added some feautures:
Provide all the info data of the last Mifare Tag approached
True to read a block, false to write a block
Provide the Key A necessary for the Mifare Classic Authentication after this it is possible Read or Write a block if the Key is correct and has the permission to do it.
The default Key A is FFFFFFFFFFFF
The Mifare Tag must be near the Android device
Read the Block specified (after the authentication) with a number between 0 and the number of blocks minus 1
The Mifare Tag must be near the Android device
The extension calculate the Sector to authenticate
Write the Block specified (after the authentication) with a number between 1 and the number of blocks minus 1.
The Mifare Tag must be near the Android device.
The extension calculate the Sector to authenticate
The data to be written must not be greater than 16 bytes, HEX format.
If You write less than 16 bytes the extension add 0 tho the remain bytes
N.B. Not all the blocks are equal in a Mifare Tag, every sector has blocks for user data and a block called sector trailer, here are stored the authentication key and the access bits. So You must pay attention to write data in the correct block or your Mifare Tag could become unavailable. Before to start write data is good to read this document to understand how Mifare Tag works https://www.nxp.com/docs/en/data-sheet/MF1S50YYX_V1.pdf
Here my latest files:
mifare.info.aix (15.9 KB) Extension
MifareInfo.txt (15.0 KB) Source file
MifareInfo.aia (27.7 KB) Project test
N.B. After You install the .apk the first time You approach a Mifare Tag to your device a pop-up wil ask You if You want to use the default NTAG Info app or our MifareInfo (or your project) , You must select MifareInfo (or your project) otherwise when You approach a Mifare Tag the intent will not go to our app
Here the new extension with Mifare Ultralight support
Hi everybody,
I improved my extension and I added the support for Mifare Ultralight technology, it is different from Mifare Classic (obviously). There are 3 differents types of ultralight tags:
The memory is divided into pages and each page is 4 bytes, in the memory there are some special bytes for the uid, for the password and so on, and obviously the bytes for the user.
For more information:
With this new extensions I added some functions and updated of old ones.
Get the UID of Mifare Classic and Mifare Ultralight
Get the Type of Mifare Classic and Mifare Ultralight
Offset number of the page to read.
Page contains the 4 pages read starting from the offset specified in the previous property
Write a page in a Mifare Ultralight Tag
Page: the page number of the tag
DataToWrite: the data (4bytes)
If Your tag is not protected You can use the functions above as are.
Instead if your tag is protected or You want to enable the authentication I developed the functions for Mifare Ultralight EV1 (for now)
Write the password (4bytes) and the pack (2bytes) in the special pages of the tag.
How does it work? When You try to authenticate if the password is correct the tag reply with the pack and if the pack has the value that You expect means that the tag is correct (the extension do the check for You)
After You wrote the Password and the Pack, You can enable the Protection starting from the page number.
Enable: true or false (enable or disable the protection)
PageNumber: usally 4 because is the first page for user data
The Password value to use when the tag is protected
The Pack value to use when the tag is protected
Obviously when the protection is enable You need to authenticate before to change the password, pack or disable the protection.
Here my latest files:
mifare.info.aix (21.8 KB) Extensions
MifareInfo.txt (30.0 KB) Source code
MifareInfo.aia (38.3 KB) Project test
Best Regards
Marco
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
Hi Marco, thank you for your contribution... somehow I missed your extension update... let me suggest you to follow the naming conventions and update your extension accordingly,,, thank you...
Taifun
Did you tested with chinese uhf tag readers long range?
Hi @Benoit_De_Guffroy,
no I did not try, but i think it cannot work(but this is my opinion) fort two reason
@Marco_Perrone I have downloaded your aia version from the post written on May 21. After building it and loading the APK it doesnt want to install with a message "App not installed as package appears to be invalid". I have tried a few versions and I have tried resetting the phone. Other builds work. Could it be that some permissions in the new SDK or something else changed in the meantime?
Hi @duv, I have the same project installed in my smartphone and works without problem.
I just compiled and tried again on my smartphone without problem (it always the same project)
Sorry I am not authorized to upload APK.
Maybe a problem with the Android version? My Android is 10.
Best Regards
Marco
Hi @Marco_Perrone Thanks for the quick replay and for testing. It seems that it is an android version problem. I am running 13 and according to the internet this is a likely problem. It seems like some permissions are missing in the APK file but I dont know anything about android programming to figure out what needs to be changed
Hi @Marco_Perrone, your extension is excellent, we use it for a lot of phone authentication but it doesn't seem to work with phones on Android 12 and up. I have tried everything recommended by AI2 Stuff (for example: android:exported="true" to the Manifest) and I can't install APK to the phone and can't upload AAB to the Google Play store. Do you plan on fixing this issue to work with Android 12 and up?
Thank You @Leppke,
the main problem is I don't have an Android 12 device at this moment so I cannot reply the issue.
I cannot tell You when, but when I will have an Android 12 or 13 device I will check.
Sorry I understand that this is not the answer that You want, but I will try to solve in the next future.
Best Regards
Marco
Hi @Leppke,
Do You have the same problem with my Project Test? This is to understand if the problem is related to my extension or something else in your app that I don't know.
Thank You
Marco
Hi @Marco_Perrone,
Thank you for your reply. We only use the getuid block of your extension and if I try without it, it works. When I try to upload the AAB Bundle with your extension to the Google Play Console, I get an error message which directs me to this website to fix the issue: Behavior changes: Apps targeting Android 12 | Android Developers. You could try testing your extension on the Google Play Console or try an Android 12+ emulator.
Thank you
Hi,
I also tried to update my app bud when I install the build on my Andoid 13 phone I get the error:
The Application wasn't installed, because the whole package looks unproperly
If I get a older build it installs fine, bud if I build it today I get the error. I deleted the Mifare Extension and then it installs again. I also tried the MifareInfo.aia bud it haves the same problem.
The culprit is probably to do with the SDK version used by appinventor as mentioned here: Application is OK, but I can't install it (APK) on my (Android13) smartphone - #25 by ewpatton
Could you have a look to fix you’re amazing extension so it is usable again on android 13?
Have a great day!
Greetings,
Sander
If you want a “quick” fix, I got it working. You have to add android:exported="true"
to the AndroidManifest.xml like said here: Android 12 changes - #2 by Anke
I did this the following way:
Build and download your APK to your PC.
Download and open the program APK editor studio: APK Editor for PC and Mac – APK Editor Studio
In APK editor open your APK file.
In the left screen select the tab “File System”.
Click on “AndroidManifest.xml”
In my case, add
android:exported="true"
to the line
<activity android:launchMode="singleTask" android:name=".Screen1">
so you get:
<activity android:launchMode="singleTask" android:exported="true" android:name=".Screen1">
In the top-bar click “save-APK”.
Now try it out if it works.
Thit works for me, hope it helps.