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. IPC Mechanism in android

Hi All,

I have an NDK application(written in C++) packaged as an executable
and deployed in android. I also have a Java apk file in the
application layer. Now my NDK app does some processing and outputs a
string of data in the format "name = value". Basically the output from
NDK looks like this:
name1 = value1
name2 = value2... Now i want each of these name value pairs to be
passed to java application one by one. Currently i am writing the
output from NDK to a file in sdcard and the java app reads from the
file. But i want to use an IPC mechanism which is devoid of explicit
file writing and reading and instead use something like sending and
listening to a socket. I am not sure what is the best way of passing
message between native code and java. Also i am not using JNI
interface as i have some issue with root permissions as the C++ Native
code runs as root userid and Java apk runs in application level and i
can't combine both of them. Please give me suggestions on how to
perform IPC between native code and java apk. I am using android
developer phone 1 as the device.

Thanks,
aravind

-- 

2. Content Provider for Private Database?

What are best practices?  My app will use a private database to store
debug information.  Should I create it as a content provider and do my
own data access that way or, since I do not intend to publish this
database for anyone else to use, there is no point?  Is best practice to
alway wrap database access through a content provider?

-- 
Jake Colman -- Android Tinkerer

-- 

3. How to fix the java.lang.UnsupportedOperationException

4. GPS not starting on Samsung Galaxy Spica i5700 (Portal)

5. [WTA] Saran HP basis Android kisaran 2-4jt

6. [WTPamer] Chocolate and Vanilla cupcakes..

7. capture tampilan android