On Sun, Jul 22, 2012 at 10:48 AM, b0b <pujos.mich...@gmail.com> wrote:
> Thanks to the geniuses of this world, on some HTC phones (in the US only it
> seems), HTC
> has modified the default Intent Chooser to comply with some Apple absurd
> patents:
>
> http://www.theverge.com/2012/5/16/3024889/htc-one-x-evo-4g-lte-custom-android-build-apple-patent-linkify
>
> The consequence is that the user is presented with a custom Intent Chooser
> without the "Use by default for this action check box".
>
> It also has some side effect:
>
> I'm using this code to get the default video player app if any:
>
>         Intent intent = new Intent(Intent.ACTION_VIEW);
>         intent.setDataAndType(Uri.parse("http://1.2.3.4/video.avi";),
> "video/*");
>         ResolveInfo resolveInfo =
> context.getPackageManager().resolveActivity(intent,
> PackageManager.MATCH_DEFAULT_ONLY);
>
> It works fine on all device but when that HtcLinkifyDispatcher.apk is
> installed, above resolveInfo will point to HtcLinkifyDispatcher itself which
> when launched, display the custom HTC intent chooser.
> This makes knowing the default app for video impossible to know as this damn
> thing hooked the system.

IIRC, you can find out the default app via getPreferredActivities(),
though that certainly is tedious.

Also, you should not be getting a chooser at all --
HtcLinkifyDispatcher specifically does *not* show a chooser, but
rather ensures that control proceeds to a preferred activity even if
there are multiple choices. The whole point of HtcLinkifyDispatcher is
to avoid showing a chooser, as suppressing the chooser may avoid the
patent infringement.

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

Android Training in NYC: http://marakana.com/training/android/

-- 
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