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. RT2070 Android2.1 Issue

Hi,All,i met rt2070 issue on andoid2.1.
anyone can give some good advice?


    mkdir /system/etc/wifi 0771 wifi wifi
    chmod 0771 /system/etc/wifi
    chmod 0660 /system/etc/wifi/wpa_supplicant.conf
    chown wifi wifi /system/etc/wifi/wpa_supplicant.conf

    mkdir /data/misc/wifi 0771 wifi wifi
    chmod 0771 /data/misc/wifi
    mkdir /data/misc/wifi/wpa_supplicant 0771 wifi wifi
    chmod 0771 /data/misc/wifi/wpa_supplicant

    chmod 0660 /data/misc/wifi/wpa_supplicant.conf
    mkdir /data/misc/wifi/sockets 0777 wifi wifi
    mkdir /data/misc/dhcp 0770 dhcp dhcp
    chown dhcp dhcp /data/misc/dhcp
    chmod 0777 /system/etc/Wireless/RT2870STA/
    chmod 0777 /system/etc/Wireless/RT2870STA/RT2870STA.dat

service wpa_supplicant /system/bin/wpa_supplicant -Dwext -ira0
-c/data/misc/wifi/wpa_supplicant.conf -dd
        user root
        group system wifi inet keystore

service dhcpcd /system/bin/logwrapper /system/bin/dhcpcd -d ra0
        group system dhcp wifi

on property:init.svc.wpa_supplicant=stopped
        stop dhcpcd

ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi


interface ra0
option subnet_mask, routers, domain_name_serv

android$ vim hardware/libhardware_legacy/wifi/wifi.c
static const char IFACE_DIR[]           = "/data/misc/wifi/wpa_supplicant";


WIFI_DRIVER_MODULE_PATH :=/system/lib/modules/rt3070sta.ko

# ls /data/misc/ -l
drwxrwx--- bluetooth bluetooth          2010-02-22 13:30 bluetoothd
drwx------ keystore keystore          2010-02-22 13:30 keystore
drwxrwx--- system   system            2010-02-22 13:30 vpn
drwxrwx--x wifi     wifi              2010-02-22 13:53 wifi
drwxrwx--- dhcp     dhcp              2010-02-22 13:30 dhcp

# ls /data/misc/wifi -l
# ls -l
drwxrwx--x wifi     wifi              2010-02-22 13:56 wpa_supplicant
drwxrwxrwx wifi     wifi              2010-02-22 13:56 sockets
-rw-rw---- system   wifi        29658 2010-02-22 13:32 wpa_supplicant.conf

i have granted permission to wifi communication,why also say can not connect

But following issue:
D/SettingsWifiEnabler( 1930): Received wifi state changed from Disabled to
[ 1371.988702] rtusb init --->
[ 1371.990961]
[ 1371.990968]
[ 1371.990972] === pAd = ccb02000, size = 462912 ===
[ 1371.990979]
[ 1371.995048] <-- RTMPAllocAdapterBlock, Status=0
[ 1372.002469] ra0 (usb): not using net_device_ops yet
[ 1372.008687] usbcore: registered new interface driver rt2870
D/WifiService( 1856): ACTION_BATTERY_CHANGED pluggedType: 1
E/WifiHW  ( 1856): Unable to open connection to supplicant on
"/data/misc/wifi/wpa_supplicant/ra0": No such file or directory
D/SettingsWifiEnabler( 1930): Received wifi state changed from Enabling to
[ 1376.985871] <-- RTMPAllocTxRxRingMemory, Status=0
[ 1377.008613] -->RTUSBVenderReset
[ 1377.010622] <--RTUSBVenderReset

our psychological growth is the movement from dependence to independence  to


2. Adding application to the source code

Hi all,

I want to modify Android sources to use a particular application I
made at some point, for research purposes.
I made my application and I know where I need to modifiy Android
sources to use it, but I do not know how to add the application I made
to the sources (other than adb install, because I want it to be, like
the other apps, in package/apps/) to be able to call my app anywhere
in the java part of the sources via an intent.
I tried to add src/ folder to the build path, but its only adidng my
app in the root part, plus res/ file is not embedded/added in this
process...How can i do that?

Best regards,



3. Sensitivity of SCROLL_STATE_FLING event

4. How to listen for ACTION_EXTERNAL_APPLICATIONS_AVAILABLE while Move2SD is enabled?

5. Emulator crashes when launching a new Activity

6. Can we access Java.util Map of a class in another class

7. Android 2.3 emulator crashed after a requestLocationUpdates call