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. Does android support .gif format??

Hello everybody,
I want to know whether android 2.2(froyo) supports .gif or not.
If not then what is the substitute of this.
I want to use some animated images, and as for as my knowledge is concerned
it neither support .gif nor .swf.
I am a bit new to android.
Please help me out.

Thanks and regards,


2. zlib / inflate / partial sync / hanging

Good Morning,

I recently got stuck playing around with xmpp and stream compression
(essentially a zlib initialization).
There is an alternate implementation, jzlib, which most apps use for
this purpose. XMPP recommends a flush after each package. This is
especially needed during feature negotiation and login.

Results so far:
- jzlib / ZOutputStream / send + flush: works
- jzlib / ZInputStream / receive: works
- DeflaterOutputStream / send + jdk7 flush: works
- InfalterInputStream / receive: hangs

You may wonder how to overcome the 5+ year old gzip problems of the
JDK: Android 2.2 ships with some JDK7 features, including a *working*
flush implementation. You should just use reflection to check the

Anyway, the receive path seems to be broken. I was unable to receive
complete xml fragments with the DeflateInputStream. It always blocked
before receiving the last few hundred(!) bytes. JZlib/ZInputStream
works like a charm. I tried to feed the inflater with single byte
reads but still no receive of the last few bytes. I would guess that
the lookahead got messed up somewhere and that android is waiting for
a never-coming extra byte.

I'm not sure if the native code is broken as well, but I would highly
appreciate ideas for a workaround. Pulling jzlib for zlib reading
looks wired....

Thanks in advance,
  Ren Treffer


3. AppWidgetProvider - Multiple widgets

4. automotive related project ideas

5. usb connection issues

6. Find Friend Location Java Example - Latitude?

7. onPause not being followed by onStop and onDestroy...