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. There are no secret APIs

I just read this article:

Andy Rubin says, "A lot of guys have private APIs. We don." And
"There are no secret APIs".

Maybe he has a different version of Android than I do because I know
of several hidden/private/unpublished API's.
Anybody tried to power the screen off lately?!? It's a private API.

What am I suppose to make of this?


2. Error in 'Hello, World'-XML example...


Section: Upgrade the UI to an XML Layout
First example of XML code, line 3:


Should be;


according to this:

Reason for posting here:
Tried to find an email to the webmaster of Android Developers site but
failed. Therefore I'm posting it here in hope that someone knows who
to contact where to change the 'Hello, World'-XML guide.

Reason for wanting the error corrected:
A more smooth introduction to developing android apps. No need to
frustrate the becoming developer with official incorrect code :)




3. Need Compatibility Test Suite code

4. Define layout at runtime

5. Activity idle timeout for HistoryRecord

6. phoneStateListener

7. Read local XML file