0

What I want is to give user the ability to run my application instead of default YouTube one when any application requests YouTube search. I've tried to play with intent-filter, but with no success. Intent looks like this (from DDMS): Starting: Intent { act=android.intent.action.SEARCH flg=0x10000000 pkg=com.google.android.youtube cmp=com.google.android.youtube/.app.froyo.phone.ResultsActivity (has extras) } from pid 4766. As you see, it contains no data field, so I can't easily add <data> element to my intent filter, as I do with URL interception.

Any help appreciated.

aplavin
  • 2,199
  • 5
  • 32
  • 53

1 Answers1

1

For the Intent that you have listed, it is impossible for you to "intercept" it, as it specifically identifies the component (cmp=com.google.android.youtube/.app.froyo.phone.ResultsActivity).

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • So isn't there any other way to intercept search request in default YouTube application? What if I create package with the same name in my app? – aplavin May 06 '12 at 12:32
  • @chersanya: "So isn't there any other way to intercept search request in default YouTube application?" -- not if that is the `Intent` that they use. "What if I create package with the same name in my app?" -- you can't, because that is not your app. – CommonsWare May 06 '12 at 12:45