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. layout_gravity Problem

I have a TextView inside a ScrollView (TextView DOES NOT scroll by
itself).  However, I am aligning the text at the bottom of the
TextView using android:layout_gravity="bottom".  When I do this the
ScrollView won't scroll.  What can I do to fix this?  This is inside
an AbsoluteLayout.  Here is the XML of the part I'm talking about:

<ScrollView
android:id="@+id/chatview"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="203px">
        <TextView
        android:id="@+id/chatscreen"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="2px"
        android:layout_y="2px"
        android:layout_gravity="bottom">
        </TextView>
</ScrollView>

--~--~---------~--~----~------------~-------~--~----~

2. ScrollView and TextView

I've found this on here before by my example is a little different.  I
have put a TextView inside a ScrollView so I could scroll the text
(TextView DOES NOT scroll itself).  HOWEVER, I am using
"android:layout_gravity:bottom" so all the text in the TextView will
align at the bottom.  However, this is making it so the ScrollView
never scrolls.  Can you PLEASE help me out?  Thanks!  Here's my XML
layout:

<ScrollView
android:id="@+id/chatview"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="203px">
        <TextView
        android:id="@+id/chatscreen"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="2px"
        android:layout_y="2px"
        android:layout_gravity="bottom">
        </TextView>
</ScrollView>

--~--~---------~--~----~------------~-------~--~----~

3. browser fails to open URL in emulato build

4. Found the problem with the getFromLocationName method

5. Using a web site intent and browser windows?

6. Listactivity refreshing exiting to original list when screen flips

7. How to design a layout