Compdigitec Labs

« | Home | »

Check if an Intent can be used in Android

By admin | June 15, 2013

Intent intent = new Intent("org.openintents.action.PICK_FILE"); // or any other intent
// add other intent options here

if(context.getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY).size() > 0) {
    // we can use this intent
} else {
    // we can't use this intent
}

From: http://www.curious-creature.org/2008/12/15/android-can-i-use-this-intent/ [Romain Guy]

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: Mobile | 5 Comments »

5 Responses to “Check if an Intent can be used in Android”

  1. Buy colt guns Says:
    September 4th, 2023 at 13:54

    … [Trackback]

    […] Information on that Topic: compdigitec.com/labs/2013/06/15/check-if-an-intent-can-be-used-in-android/ […]

  2. โรงแรมสุนัขเข้าได้ Says:
    October 11th, 2023 at 05:53

    … [Trackback]

    […] Read More on to that Topic: compdigitec.com/labs/2013/06/15/check-if-an-intent-can-be-used-in-android/ […]

  3. Kardinal Stick Says:
    October 12th, 2023 at 19:15

    … [Trackback]

    […] Here you will find 30914 more Information on that Topic: compdigitec.com/labs/2013/06/15/check-if-an-intent-can-be-used-in-android/ […]

  4. Buy Crystal meth online Says:
    November 23rd, 2023 at 13:31

    … [Trackback]

    […] Read More to that Topic: compdigitec.com/labs/2013/06/15/check-if-an-intent-can-be-used-in-android/ […]

  5. super kaya 88 Says:
    December 2nd, 2023 at 05:31

    … [Trackback]

    […] There you can find 15116 more Information to that Topic: compdigitec.com/labs/2013/06/15/check-if-an-intent-can-be-used-in-android/ […]

Comments