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. D-GPS Enabled Android Phones

Looking for a development phone which has D-GPS.

The Bad - this will only work outdoors
The Good - Will not need a phone plan to use A-GPS

Looks like the only phone with D-GPS is the Geeksphone ?


2. Problems with local network broadcast.

I'm trying to write a simple game-room api and am having trouble
broadcasting to the local network's broadcast ip.  I got the code for
getting the broadcast address and how to send stuff to it here:

and used it like this:

        int PORT = 55555;
        int DISCOVERY_PORT = 55556;

public void broadcast(String message) throws Exception {
                InetAddress ina = mContext.getBroadcastAddress(); // this is 
                Log.v("ADDRESS", ina.getCanonicalHostName());
                DatagramSocket socket = new DatagramSocket(PORT);  // here's 
the error occurs
                DatagramPacket packet = new DatagramPacket(message.getBytes(),
                                .length(), ina, DISCOVERY_PORT);

I get an error " The address is already in
use".  I thought at first this was because my local network was
blocking ports, but once I got onto my home network which blocks
nothing it still had the same issue.  Is there something extra I have
to include to get it to send a packets to the broadcast ip?  Thanks in
advance for any replies.


3. divx dan android 2.1 (galaxy spica_

4. Keep account information after application uninstall

5. Andwobble

6. add text to a drawable? (maps question)

7. How to add my own Audio codec to AudioRecord?