To follow up on this, the code that Mark provided pretty much has
everything you need to do the filtering. When the user clicks an item
in the presentation list, Mark has something like:
ResolveInfo launchable = mAdapter.getItem(position);
ActivityInfo activity = launchable.activityInfo;
ComponentName name = new ComponentName
(activity.applicationInfo.packageName, activity.name);
and you can do something like this to check if it's the Facebook app:
if (activity.name.equals("com.facebook.katana.ShareLinkActivity")) {
// modify intent data EXTRA_TEXT to only contain a link for
example.
}
of course you're back to seeing the bad behavior again if facebook
releases an update and changes that package/activity name,
Thanks,
Mark
On Dec 16, 6:57 pm, Mark Wyszomierski <[email protected]> wrote:
> @Mark
> Thanks for the link, that's basically exactly what I need to do this.
>
> @Craig
> Yeah, it definitely looks like an issue with the Facebook app. I have
> to find a workaround for this, my users will just think it's a bug
> with my app rather than Facebook. One other benefit is that I can use
> this workaround to possibly customize the text sent to some of the
> well-known twitter apps (shorten to ~100 characters). Of course, I
> guess this only works if their package names stay the same.
>
> Thanks
>
> On Dec 16, 6:51 pm, CraigsRace <[email protected]> wrote:
>
>
>
> > FYI: This is really a bug with Facebooks Facebook app (it incorrectly
> > directs to the mobile link sharing). If you use ACTION_SEND and chose
> > other Facebook apps (I think I tested FBabble), it works.
>
> > On Dec 17, 10:41 am, "Mark Murphy" <[email protected]> wrote:
>
> > > > How could I find the cool little icons that each app uses to go with
> > > > my own picker dialog?
>
> > > getApplicationInfo() or getActivityInfo() on PackageManager should have
> > > what you need.
>
> > > You can also take a look at my Launchalot sample for some ideas:
>
> > >http://github.com/commonsguy/cw-advandroid/tree/master/Introspection/...
>
> > > > I don't like doing this, I wish they did not
> > > > implement facebook like this..
>
> > > Ideally, there would be a MIME type for URLs, but I'm not aware of one.
>
> > > --
> > > Mark Murphy (a Commons Guy)http://commonsware.com
> > > Android App Developer Books:http://commonsware.com/books.html
--
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