Skip to content Skip to sidebar Skip to footer

Onresume Method For Android Services

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 implemen

Solution 1:

Here you are :)

I also suggest to take a look here: http://developer.android.com/guide/topics/nfc/index.html for more documentations, examples and code

<serviceandroid:name="com.myexample.ServiceName" ><intent-filter><actionandroid:name="android.nfc.action.NDEF_DISCOVERED" /><categoryandroid:name="android.intent.category.DEFAULT" /></intent-filter><intent-filter><actionandroid:name="android.nfc.action.NDEF_DISCOVERED" /><categoryandroid:name="android.intent.category.DEFAULT" /><dataandroid:mimeType="application/com.example.android.beam" /></intent-filter></service>

UPDATE: this is a complete example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.html

Post a Comment for "Onresume Method For Android Services"