NFC... TAG_DISCOVORED intent is only send via startActivity()

by z_z_z_z » Fri, 04 Feb 2011 05:16:25 GMT


Sponsored Links
 Hello,

I have a device that is constantly sending NFC tags each of it has
only one characte "a" as rawdata , this is not the interesting part.
The problem is that I'm writing a Service that have a
BroadcastReceiver that is listening for the tag_discovered intent. The
idea is when the onReceive() method is called in the BR it will call
some methods in the service. So I've take a looked at the source of
NFCService.java and there the intent is fired with startActivity(). So
I cant use broadcast receiver. Is there any special reason to be made
like that, with startActivity() but not with sendBroadcast()? So in my
case I'm forced to use activity to catch the intent thet in it's
onCreate() it calls my broadcaste receiver via sendBroadcast() and
then at the end of the onCreate() it calls finish(). This solution is
very ugly one, because if I have some other application's Activity
running ontop it's onPause() method is colled.... terrible...

So am I missing something about the nfc apps in android and what are
your suggestions about my problem?

-- 



Other Threads

1. What does glGetString(GL10.GL_EXTENSIONS) return?

DEAR FRIEND PLEASE CONTACT MY MOBILE 9431794258

--~--~---------~--~----~------------~-------~--~----~

2. what is .config file to download from web server?

Hi Dear,

i need to download some files from web server and i just got to know
that i should have a config file on server which defines all the files
url.

wondering if anybody have sample of this download.config file?
--~--~---------~--~----~------------~-------~--~----~

3. Determine Google Street View Availability

4. display on map

5. How/where to submit the apps to ADC2?

6. how can change controll to main thread from new other thread?

7. What happens when more activities 'listen' to the same intent?