Hi All,

I have a query to ask.This piece of code i have come across in one of
the posts (http://android-developers.blogspot.com/search/label/How-to
by Romain Guy )  in which author has said

"simple way to find out whether the system contains any application
capable of responding to the intent you want to use".

public static boolean isIntentAvailable(Context context, String
action) {
    final PackageManager packageManager = context.getPackageManager();
    final Intent intent = new Intent(action);
    List<ResolveInfo> list =
            packageManager.queryIntentActivities(intent,
                    PackageManager.MATCH_DEFAULT_ONLY);
    return list.size() > 0;
}

But this code is working only if my androidmanifest.xml file has the
particular intent{isIntentAvailable(this,action =
("com.android.aaaa")--this string is defined as intent filter in my
androidmanifest.xml )}.

However this is not working if i am trying to find out an intent which
is in some other apk and this "other apk" is installed in my
system.Can i do this using the code shown above or it is not possible?

regards,
ani

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to