intent.action_send and intent chooser

by tnull » Tue, 20 Jul 2010 22:20:44 GMT

Sponsored Links
 When creating an intent with action send to send some data, is there a
way to filter the results that are included in the activity chooser
that is created using Intent.createChooser? I have not seen a way to
do this other than setting the mime type, but it is not flexible

For example, there is a situation when I want e-mail apps to be the
only results in the activity chooser dialog. Setting the type to "text/
html" successfully filters this down to email apps, except when
bluetooth is enabled. Bluetooth appears in the list as well, but this
is not desirable. Surely there is a way to have a little more control
over the results?


intent.action_send and intent chooser

by Mark Murphy » Tue, 20 Jul 2010 22:31:06 GMT


What are "e-mail apps"?

Only on your test environment(s). Anyone can create an application
that supports ACTION_SEND of text/html -- this it not something
exclusive to "e-mail apps". I would not be the least bit surprised if
there are others on certain devices or out on the Market.

Write your own chooser dialog, using PackageManager.

Mark Murphy (a Commons Guy)  |  | 

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!


Sponsored Links

intent.action_send and intent chooser

by tnull » Tue, 20 Jul 2010 23:39:13 GMT

 With e-mail apps, I just meant I was looking to filter the results to
e-mail clients, not necessarily anything that can handle "text/html",
which I realized wouldn't work when bluetooth popped up.

Thank you for the tip on creating my own dialog using PackageManager,
I will look into that.


Other Threads

1. Android architecture.. better for one activity over multiple?

Hi all,

I've been learning Android.. almost done with my 3rd book now.. have a
pretty good idea of the beginner things like the life cycle, etc. One thing
that kind of perplexes me is the benefits of using multiple activities each
with their own lifecycle events in them. In a normal Swing, or other UI
based app,  you usually have a single class with events to handle create,
start/stop, pause/resume, destroy, etc. From that class you can spawn
threads to do the work, change the UI, etc etc. With Android, it seems that
apps have potentially many activities. Maybe I am doing something wrong, but
each time I open a new activity represented by a new class.. that Activity
"takes over" the event processing of the app. So each and every Activity
class requires all the event methods.. just in case a user happens to hit
the BACK button at one stage of my app over another. I know I can put the
common save/load routines into a base class that extends Activity, and have
all my activites extend it.. which is probably what I will do.. but it seems
strange to me that each dialog, every screen, etc is it's own activity and I
more or less need to duplicate the code to handle pause/resume, start/stop,
etc events for each activity in case it's the one running. If I have a
splash activity that starts the main screen, then the user goes to high
scores, I have to handle the events for pause/resume, etc.. and so forth for
every screen in my game, or app. Is this what most everyone is doing? OR am
I missing the boat on this issue and there is a better way to allow say, a
single Activity to handle the full app lifecycle events from Android, and
spawning other activities ignore all those things.. knowing that the main
app activity handles the issue of saving/restoring data if need be?

Please, enlighten me if I am missing something on this. Seems like a lot of
extra coding to build what seems to be a normal Android app. Again, I
realize I can copy/paste, or subclass Activity and extend my own "common"
Activity.. I am just wondering what many of you are doing out there for this



2. Nexus One is HUGE!

Mantab ukurannya
Sama milestone besar mana yah

*masukkan list dech

the screen size, that is :)

Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to

To request to subscribe to this group:


3. Setting apn

4. opencore crashes on mydroid-donut emulator

5. about android_power

6. libwebcore - Broken Pipe

7. GTUG 2