Thanks for the pointer! I'm having a hard time trying to disambiguate
the default email application from the default sms application as they
both use the intent filter:
android.intent.activity.SENDTO, is there a way to programmatically
separate sms activities from email activities?
This is what I'm doing:
ArrayList <IntentFilter> ifList = new ArrayList<IntentFilter>();
ArrayList <ComponentName> cnList = new ArrayList<ComponentName>();
getPackageManager().getPreferredActivities(ifList, cnList, null);
// Iterate through all of the components in the
preferredActivity
list
for (int idx=0; idx<cnList.size(); idx++)
{
IntentFilter intFilter = ifList.get(idx);
ComponentName cName = cnList.get(idx);
// Iterate through each intent filter for each component
for (int jdx=0; jdx<intFilter.countActions(); jdx++)
{
Log.w("My app tag", cName.getClassName() + " " +
intFilter.getAction(jdx) + " " + intFilter.getDataScheme(jdx));
}
}
On Dec 16, 3:13 pm, TreKing <[email protected]> wrote:
> On Thu, Dec 16, 2010 at 1:58 PM, neuromit <[email protected]> wrote:
> > Is it possible for me to discover which app they selected and then set the
> > SendSMS button drawable to the icon for that application?
>
> Maybe. I would try this for
> starters:http://developer.android.com/reference/android/content/pm/PackageMana...<android.content.IntentFilter>,
> java.util.List<android.content.ComponentName>, java.lang.String)
>
> ---------------------------------------------------------------------------
> ----------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en