0

I have an application which interacts with an RFID reader through NFC/HCE. The HostApduService service itself is properly configured, set as START_STICKY, and in a normal state everything works fine. However, if I kill the app, then in a cold service start, processCommandApdu is not executed. If I try the same intent right after that, it will be executed successfully in all subsequent attempts.

I've also created a very simple app with just the service to test this behavior. In this dummy app, the processCommandApdu function is executed even in a cold service start after killing the app.

This leads me to believe that processCommandApdu might require the service to be already in memory or have specific startup requirements in order to work at that first cold start.

Could anyone shed some light on this behavior?

0

Browse other questions tagged or ask your own question.