Mifare Classic & Ultralight Extension

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:

  1. Build and download your APK to your PC.

  2. Download and open the program APK editor studio: APK Editor for PC and Mac – APK Editor Studio

  3. In APK editor open your APK file.

  4. In the left screen select the tab “File System”.

  5. Click on “AndroidManifest.xml”

  6. 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">

  7. In the top-bar click “save-APK”.

  8. Now try it out if it works.

Thit works for me, hope it helps.

Thank You @Sander_V,
I sent a message to @Leppke yesterday where I suggest to modify the manifest like this:
<activity android:launchMode="singleTask" android:name=".Screen1" android:exported="false">
I was waiting an answer before to write here but now you confirm that solve the problem.

Thank You for your tip

Ciao
Marco

Hi @duv @Leppke and @Sander_V ,
I just added the android:exported="true" in the extension , so You don't need to change the manifest.
Please download and try if your app works correctly.
mifare.info.aix (21.9 KB)

Ciao
Marco

1 Like

It works, thank you very much!

1 Like

Hi @Marco_Perrone, Sorry for the late reply, I have been on holiday. Your extension is great! It works fine! Thank you very much!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

Hello everyone,

I use the @Marco_Perrone extension for Mifare classic tags Mifare Classic & Ultralight Extension - Extensions - MIT App Inventor Community.

For my app I need to read multiple blocks in a row, without rescanning the tag. I tried several solutions like switching off and on read mode or hotswapping block-to-read id
image

If you have an idea of a solution it could save me a lot of time. I also searched for the extension source code to add those functionalities but in vain.

Hi @lieutenant_X,
I attach a sample that should help You to solve your problem.
I used a Clock to Read a MifareClassicBlock and everytime the clock is fired I add 1 to the variable Block to read the next Mifare block
Ciao
Marco
MifareReadWrite.aia (24.1 KB)

Thanks a lot, it works pretty well. Do you have a solution too to read a tag what triggered the app opening ? (if the app is set as the default one for Mifare tags, it opens automatically when one of them is detected by the phone).

Ciao @lieutenant_X, the extension when a tag is approched use the TAG_DISCOVERED action that is the lowest level to detect a tag, I was able to develop only this method.
To do what You need I have to develop TECH_DISCOVERED, I tried but with no success.

Ciao
Marco

The extension works well, but it lacks a block to detect whether an NFC card is currently in place. Any solution for that condition.