Is it possible to print available Intents installed on phone?

by Eric » Thu, 19 May 2011 07:56:46 GMT


Sponsored Links
 I installed an app today that I would like to call out to from my app,
if it turns out the app I installed has a public intent published.  Is
there a way for me to determine this information, either
programmatically or through a facility on the system?   I fooled
around a bit with PackageManager, but it only seems to report on
system-level intents, not installed applications.

In general, I think it would be useful to know all of the public
Intents installed on a phone, and the data-structure those Intents
expect.  I see there's an 'openintents' website, but I'm wondering if
it's possible to check a given phone for available intents?

-- 



Re: Is it possible to print available Intents installed on phone?

by Mark Murphy » Thu, 19 May 2011 08:07:43 GMT


 


You can call queryIntentActivities() or similar methods on
PackageManager to see what responds to a given Intent.


queryIntentActivities() and kin support any Intent, AFAIK. If you have
evidence to the contrary, that's probably a bug, so please post a
sample project and symptoms to  http://b.android.com .


The latter is impossible; the former is merely not supported.


No, sorry.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

Android App Developer Books:  http://commonsware.com/books 

-- 


Sponsored Links


Re: Is it possible to print available Intents installed on phone?

by Eric » Thu, 19 May 2011 08:20:30 GMT


 Thank you.

-- 



Re: Re: Is it possible to print available Intents installed on phone?

by Dianne Hackborn » Thu, 19 May 2011 09:26:40 GMT


 Note there is not really a concept of "published intents."  An app describes
intent filters, which match intents.  An intent filter is not an intent --
it is a rule for matching intents.  It generally matches an arbitrary number
of intents, and may be used to specify multiple flavors of an intent
together.  They really only provide information given some intent you
already have, asking whether it matches the filter.







-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 



Re: Is it possible to print available Intents installed on phone?

by MarcoAndroid » Thu, 19 May 2011 18:16:52 GMT


 Not programmatically but you can look here for published intents for
apps:  http://www.openintents.org/en/intentstable 
Maybe the app you refer to is in the list. Else, you could maybe ask
the app builder to add their Intents to that site?





-- 



Other Threads

1. [WTShare] WiMAX on HTC EVO 4G?

baru dapet teaser secuil.. mgknkah nanti bisa pake SitraWiMAX di EVO 4G? :o

http://twitter.com/#!/Shinzul/status/15786750567780352
@Shinzul <http://twitter.com/#%21/Shinzul>: Attention all
#htc<http://twitter.com/#%21/search?q=%23htc>-evo
#CyanogenMod <http://twitter.com/#%21/search?q=%23CyanogenMod> users! I and
@toastcfh <http://twitter.com/toastcfh> have successfully ported wimax!

-- 
===============
"

2. how to change child list color in ExpandableList

This code is from  \samples\android-8\ApiDemos\. This is example of
ExpandableList. But here when the list item is expanded it's hard to
visually distinguish where the child item ends and next group item
begins. So what I want is give different color to child and icon in
front of both child and group.



public class ExpandableList1 extends ExpandableListActivity {
    private int mGroupIdColumnIndex;

    private String mPhoneNumberProjection[] = new String[] {
            People.Phones._ID, People.Phones.NUMBER
    };


    private ExpandableListAdapter mAdapter;


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Query for people
        Cursor groupCursor = managedQuery(People.CONTENT_URI,
                new String[] {People._ID, People.NAME}, null, null,
null);

        // Cache the ID column index
        mGroupIdColumnIndex =
groupCursor.getColumnIndexOrThrow(People._ID);

        // Set up our adapter
        mAdapter = new MyExpandableListAdapter(groupCursor,
                this,
                android.R.layout.simple_expandable_list_item_1,
                android.R.layout.simple_expandable_list_item_1,
                new String[] {People.NAME}, // Name for group layouts
                new int[] {android.R.id.text1},
                new String[] {People.NUMBER}, // Number for child
layouts
                new int[] {android.R.id.text1});
        setListAdapter(mAdapter);
    }

    public class MyExpandableListAdapter extends
SimpleCursorTreeAdapter {

        public MyExpandableListAdapter(Cursor cursor, Context context,
int groupLayout,
                int childLayout, String[] groupFrom, int[] groupTo,
String[] childrenFrom,
                int[] childrenTo) {
            super(context, cursor, groupLayout, groupFrom, groupTo,
childLayout, childrenFrom,
                    childrenTo);
        }

        @Override
        protected Cursor getChildrenCursor(Cursor groupCursor) {
            // Given the group, we return a cursor for all the
children within that group

            // Return a cursor that points to this contact's phone
numbers
            Uri.Builder builder = People.CONTENT_URI.buildUpon();
            ContentUris.appendId(builder,
groupCursor.getLong(mGroupIdColumnIndex));
 
builder.appendEncodedPath(People.Phones.CONTENT_DIRECTORY);
            Uri phoneNumbersUri = builder.build();

            // The returned Cursor MUST be managed by us, so we use
Activity's helper
            // functionality to manage it for us.
            return managedQuery(phoneNumbersUri,
mPhoneNumberProjection, null, null, null);
        }

    }
}

How to do this? Thanks

-- 

3. How to do Flow Control in RFCOMM Bluetooth in Android?

4. Mod X10 mini pro

5. VOOT : Kenaikan paspor per 1 Januari adalah tidak benar

6. [WTA] beli desire hd di spore

7. WTPamer, Galaxy Tab Mod