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
enough.

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)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

_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. is it ok to use key store for release as the key store for debugging android application?

ladies and gentlemen,

is it possible and ok to reconfigure eclipse ide to use the key store
for formal releasing app as the key store for debugging the app?

i am asking this because i find it very very tedious to switch between
signing my app using release and debug keys, and between change the
map keys in my app source code. what a ridiculous step to have to do
this for developing/releasing an android application!!!

please advise. thanks!
--~--~---------~--~----~------------~-------~--~----~

2. Unable to run the application even once.

Hello, when I am trying to run the application for the first time, it
is giving error in console as:

[2009-08-25 12:47:24 - temp] ------------------------------
[2009-08-25 12:47:24 - temp] Android Launch!
[2009-08-25 12:47:24 - temp] adb is running normally.
[2009-08-25 12:47:24 - temp] Launching: info.temp.temp
[2009-08-25 12:47:24 - temp] Automatic Target Mode: launching new
emulator.
[2009-08-25 12:47:24 - temp] Launching a new emulator.
[2009-08-25 12:47:24 - Emulator] invalid command-line parameter:
SDAndroid
[2009-08-25 12:47:24 - Emulator] Android Emulator usage: emulator
[options] [-qemu args]
.
.
.
.
.
[2009-08-25 12:47:24 - Emulator]      -help-keyset-file       key
bindings configuration file
[2009-08-25 12:47:24 - Emulator]      -help-all               prints
all help content
[2009-08-25 12:47:24 - Emulator]


I tried clearing windows/preferences/Android/Launch/Default Emulator
Option textbox, but no luck. Earlier 'SDAndroid' was written in this
box.

pls help.........is some setting to do?

thanks
Nitin
--~--~---------~--~----~------------~-------~--~----~

3. Detect "running in" Android and access to Command Line parameters

4. Placement of camera preview

5. resizable framelayouts possible?

6. Resuming activity occurs WindowManager$BadTokenException

7. Auto Reply from David Kang of Crucialtec