I am trying to make a service which waits NFC tags and does something. I can do it with following code block in an activity but have no idea, even after researches, how to implement it in a service.
@Override
protected void onResume() {
super.onResume(); // Sticky notes received from Android if
enableNdefExchangeMode();
if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {
do_something();
}
}
I want to do this in a service. i can not use super.onResume(). What should I use instead of this, or how to do it?
Any helps will be appreciated. Thanks already for your helps