Android Question NFC in Service

fabio55

Member
Licensed User
Longtime User
I need NFC scanning to be available among several activities my APP has. So I thought a good place to put it is the service module. Is it possible? But how? My working code is now in an activity and in particular in Activity_Resume (as in this tutorial). How should I move the code in the starter service?
 

fabio55

Member
Licensed User
Longtime User
What should I write in the manifest code then?
Something like

AddActivityText(main, <intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain" />
</intent-filter>)

ok this is the solution!
 
Last edited:
Upvote 0
Top