NFC, TAG_DISCOVORED intent is only send via startActivity()

by z_z_z_z » Sat, 12 Feb 2011 06:07:02 GMT

Sponsored Links

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 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. Copy file from apk to file system


I have a simple question. I would like to add a file to the .apk bundle, and
upon installation copy this file to the device filesystem. How can I do



2. Compiling Error: package does not exist

I want to have a notification on the status bar drop down. Clicking on
it will launch another activity( I got the
following error while compiling the code:

package does not exist
Anyone knows why?

3. Alas US patent laws may be hampering functionality...

4. How to prevent my application being closed on clicking the back button on emulator

5. Recording Audio with MediaRecorder on G1

6. **********HOUSE DESIGNS************

7. ***********ACTORS MASALA************