question

tjcorcoran avatar image
tjcorcoran asked ketpat commented

NFC Dead Object

Frequently NFC service is not working in android app .,
Here is link of nfc utils code :
https://github.com/shaelhaldkar/BpNFCDemo

We are using NFC scanning in multiple times, in multiple screen, but when we redirect to another screen , nfc service dead.

Clover Android SDKRemote Pay Android
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ketpat avatar image
ketpat answered tjcorcoran edited

Android NFC on Clover devices is not capable of handling rapid on and off of the NFC adapter (which is what happens when there are multiple Activities using NFC in succession) . Clover devices can only handle one Activity reading NFC.

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tjcorcoran avatar image tjcorcoran commented ·

I tested with single activity but still getting same issue , sometime it's reading for 3 times, sometime its reading 6 time.So its not guarantee that it is reading tag continuously.
In our application we need to read NFC tag continuously .
Also CloverCFPActivity has been deprecated , and not provide implementation with fragment .

I check with android sdk (without clover SDK) , but it is also not reading tag continuously.
https://github.com/andijakl/NfcDemo

0 Likes 0 ·
ketpat avatar image
ketpat answered ketpat commented

We are working on fixing the NFC read flakiness that you have observed.

Flex 2 fix is ready and will be soon along with our usual software release.

We have not yet narrowed down the issues in Flex 1 and Mini 2. In the meanwhile there are some other things I would recommend you incorporate in your app


1) enableReaderMode is not supported by Clover SDK. enableForegroundDispatch and disableForegroundDispatch in onResume and onPause of the Activity are the only methods available to enable and disable the NFC field

2) You should add a broadcast receiver listening for ACTION_ADAPTER_STATE_CHANGED. Clover devices use that state machine differently.
STATE_TURNING_ON - non-payment NFC is available on the device, field is off
STATE_ON - non-payment NFC is available on the device, field is on

STATE_OFF - non-payment NFC is not available on the device


2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tjcorcoran avatar image tjcorcoran commented ·

Hello, can you advise if Flex 2 fix has been released yet? And how can we tell what software version is running on Flex. Thank you

0 Likes 0 ·
ketpat avatar image ketpat tjcorcoran commented ·

The release will start rolling out by the end of next week.

You can check the build version by going into Settings->System->About-> Build number


You should look for the following numbers in that build string:

02.05.0689 02.02.0634


Both those numbers are important.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community