Issue with Apex Manager app

I’m using Apex Manager on android as a TOTP reader and it works well.
On my Apex there’s also an NDEF record. When I try to communicate with the TOTP applet offten it reads the NDEF record and I can’t read TOTP which is disturbing.

Will there be an update soon or should I dive into the code and disable NDEF reading for the time of reading OTP?


Can you expand on what you mean by reading the NDEF record? Screenshots would be helpful as well if possible.

Just so you are aware, the apex manager app will scan your Apex and generate OTP codes at that particular time, and if you decide to look at them you can tap OTP to see them but they have already been generated and passed to the phone.

So the question is, exactly when is your phone attempting to read the NDEF record? Is it during the initial scan of the apex or subsequent scans when inside the OTP screen?

Also exactly what is your phone doing to indicate that it is reading the ndef record? Is it popping up the operating system scan notification? Is it opening a browser?

Finally, what other NFC applications are on your phone and are these shown as options when trying to scan your Apex… or does it simply open the intent that is relevant to the content of your NDEF record?

1 Like

I have installed the NXP TagInfo app, but didn’t open it.

The process is the following:
Turn on NFC > Open ApexManager > Reach Apex
50% that it will read the NDEF record and another 50% that it will keep on screen the Apex Manager
If it keep on screen then
Chose OTP > 50% it showes OTP codes and 50% it reads the NDEF again.

I’m sorry if I was not understandable

The thing what I want to reach is when ApexManager is on screen don’t try to read the NDEF.
Is there a way to do it like add a feature to the app, etc?

1 Like

This is an interesting one. My experience with having the NFC share applet installed alongside OTP doesn’t match yours - my only gripe is that Apex Manager doesn’t boot automatically on tap. Using a “boot app” NDEF record requires a second tap to read.

Developer Waffle™️

Apex Manager does not define any static intent filters for NFC, meaning: “If Apex is not in the foreground, NFC events are handled by any other app”.
Apex Manager (likely) uses “foreground dispatch”, a mode where dynamic intent filters can be created temporarily, or, all events can be handled. It’s the same as normal behaviour, except Apex is placed first.
I expect Apex Manager does not define any filters for foreground dispatch.
There aren’t any useful filters you can apply in Android that would uniquely identify the Apex Flex, and defining any filters might make detection unreliable, as it is unclear how foreground dispatch with filters interacts with any other intent-receiving-NFC-applications.

I believe there are only a few possible causes of your issue:

  • Apex Manager does not have foreground dispatch enabled 100% of the time
    (which then falls through to “default” behaviour)

  • There is some other app installed that has permission to draw on top of other apps and also claims foreground dispatch
    (I have never seen this myself, but may be possible)

  • Your Apex Flex is not behaving as expected, so any of Apex’s foreground intent filters (if any) don’t catch your tag when scanned
    (This would then fall through to normal behaviour)

My questions:

  • Are you certain you don’t have any other NFC-enabled apps installed? No Tasker running in the foreground, nothing at all?

  • What version of Android are you running, and what hardware are you using?
    (Implementations of NFC on non-stock Android, or certain devices, can be real shit™️)

Perfect thanks for explaining

Sorry could you explain a bit more what you mean here?

I would like to be able to quickly get to my one-time-passwords, being able to open Apex Manager directly to it when I tap would be sweet.

Right now, nothing happens when tapping my Apex unless I add the NFC Share applet and write a “Launch Application” record. That will open Apex Manager, but it won’t take me through to the applets page until I re-tap my Apex.

I reckon this is due to Apex Manager not listing static NFC intent filters. IE. Even though the OS is correctly launching Apex Manager, it’s not forwarding the NFC tag (even though it’s still present), so there’s nothing for Apex Manager to talk to.

Screen Recording
  1. I show the empty NFC Share applet (FWIW, without the share applet, nothing happens on tap)

  2. I write a “Launch Application” NDEF record to it

  3. I scan my Apex, opening Apex Manager. I keep it held in place.

  4. Apex Manager doesn’t recognise it until I re-tap.

1 Like

Perfect explanation thanks

So for opening on scan from home screen, you are correct, I would need to enable the foreground dispatch system and add intent filters for any NFC scan actions. That said, the app currently intentionally does not do this. I think me and @amal agreed that we didn’t want it to override any other NFC applications or interfere with androids default NFC handling, and that we would just require the user to open AM first.

Now, if you guys would like, I can add an option under settings that would enable AM to be the default NFC handler on tag scan from home screen or whatever. Is this something y’all would want?


As for your issue @wolfy, that is odd. I have seen this happen when the coupling of your device to your tag isn’t ideal, so for that possibility, what phone are you using if you don’t mind me asking?

If it’s not related to coupling, as @SteffanDonal asked, what NFC related applications do you have installed on your phone?

Additionally, if you don’t mind @wolfy, would you mind sending me a logcat from AM settings after you scan and get the error you’re experiencing?

Alternative suggestion!
Add an option to write an NDEF record with a custom mime-type that Apex Manager is filtering for so that it’s not a setting, but rather just always on. At least then you won’t need to set Apex Manager as a global handler… I wish Android would allow for smarter NFC control :stuck_out_tongue:

we’ll prob go this route … and update the nfc sharing function to write this record?