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 a TextView background included in wrap_content measurement?

I have a PNG being used for a TextView background. The TextView is set
to wrap_content for width/height. The problem is, I cannot get it to
be smaller than the original pixel dimensions of the background PNG,
this leaves my text floating in the middle, as if I've used padding.

<TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:maxWidth="250dip"
        android:minWidth="150dip"
        android:text="Sample text"
        android:background="@drawable/my_png"
        android:gravity="center_vertical"
/>

It turns out that if I make the PNG into a nine-patch, the TextView
behaves as I expect, and the width/height of the TextView is then
allowed to be smaller than the physical dimensions of the background
PNG being used. So this is a workaround for now.

Does anyone know whether I should report this as a bug (targetting
1.6)? Or is the background drawable supposed to be taken into account
as part of the content width/height unless using a nine-patch?

-- 

2. connecting to google map data api using http protocol

hi,

since the gdata doesn't work on android, i'm trying to use http
protocol.

Retrieving the map feed from this
http://maps.google.com/maps/ms?hl=en&ie=UTF8&oe=UTF8&num=200&start=200&vps=1&jsv=282d&msa=33&msid=106069377598790155454.0004720325247dc0c953a&abauth=4caac8b6s7fLDxa4oy-0GX5xHS8iZJIEeWo,
using httpget is fine.

But if i want to update this map , how should i proceed using
httpPost?

I am still unsure  how to authenticate and set the appropriate headers
for httpPost after reading
http://code.google.com/apis/maps/documentation/mapsdata/developers_guide_protocol.html#Authenticating

can someone please give me some pointer?

thanks!

-- 

3. Froyo and kernel version

4. Paid apps in new countries are live!

5. want to access APIs android_view_surface.cpp from my native code

6. want to access APIs android_view_surface.cpp from my native code

7. Voucher IM