Reputation: 635
Let's say I have an Android application (MainApp) that hosts an Activity
with the following responsibilities:
Activity
during NFC listening and close it once a result is available or CriticalNfcApp is aborted, this is not an option.
The user must always be able to navigate to other areas of MainApp without having to close the CriticalNfcApp Activity
first.Is it possible to realize a two-app system where:
Initially, I thought of using a ForegroundService
in the CriticalNfcApp project, which hosts an NFCAdapter
. However:
NFCAdapter
only supports creation by passing an instance of Activity
, so this does not seem to work.Another idea was to create a small invisible Activity
on top of the screen that shows nothing and instantiates the NFCAdapter.enableReaderMode(Activity,....)
. However:
Activity
. This does not seem to be a viable approach either.Upvotes: 0
Views: 40
Reputation: 10152
Upvotes: 0