I am trying to start an activity from HostApduService everytime it receives an Apdu command.
The problem that I am facing is that it is starting activity when app is in foreground but it is not starting when app is in background or in a killed state.
I checked other questions on stack overflow but most of them dont have an answer and those that have are not working for me.
I have already tried the notification approach and that is working fine for me but as per Android Documentation, HostApduService is allowed to start UI from background. - https://developer.android.com/guide/components/activities/background-starts
The app has a service that is bound by the system. This condition applies only for the following services, which might need to launch a UI: AccessibilityService, AutofillService, CallRedirectionService, HostApduService, InCallService, TileService, VoiceInteractionService, and VrListenerService.
Can anyone please help me here?