Thanks for the response Mark... So, I'm reading about AsyncTask and
trying to get my head wrapped around how this will all fit together.
And just to make sure I'm not trying to do something that is not
possible with api access.....

I can have a program start up on boot then begin a background thread
that will listen to certain system events and when those events happen
I could send a notification alert (actually, would really like to pop
a dialog box or some other view up over what is currently showing on
the phone's display)

Thanks again,
Josh



On Jun 8, 4:36 pm, Mark Murphy <[email protected]> wrote:
> Josh wrote:
> > Thanks for the reply.  I have one more somewhat similar question.  Is
> > it possible to create an app that spawns a background / worker thread
> > that listens for incoming text messages / emails / and then shows some
> > alert?  I'm understanding how to create a worker thread called from a
> > service with a handler for communication, but I don't understand (know
> > if it is possible) to set up a broadcastreceiver or listener
> > (broadcast receiver is what I'm really after) in that thread.
>
> First, BroadcastReceivers are not "set up" in a thread. They are tied to
> the main application thread. If your BroadcastReceiver is registered via
> registerReceiver() in Java code, it can use AsyncTask, a
> LinkedBlockingQueue, or some other background thread mechanism. If your
> BroadcastReceiver is registered via the manifest, you will need to have
> it pass control to an IntentService, since manifest-registered
> BroadcastReceivers should not be starting threads.
>
> Second, there is no broadcast Intent for emails.
>
> Third, there is no documented broadcast Intent for SMS messages.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to