How to catch Android share intents limited to specific URLs using intent-filter?

前端 未结 1 1098
我在风中等你
我在风中等你 2021-02-20 16:36

I can hook my app into the \"Share page\" feature using the following intent-filter:


  

        
相关标签:
1条回答
  • 2021-02-20 17:17

    But I would like to go a little further and limit the filter to intents with specific URLs in them, for example URL of a YouTube video.

    What you are asking for makes no sense to me as written.

    Perhaps you really mean:

    But I would like to go a little further and limit the filter to ACTION_SEND requests where the body extra contains a specific URL

    In which case, that is impossible, sorry.

    Or, perhaps you really mean:

    But I would like to go a little further and limit the filter to ACTION_SEND requests issued from random pieces of software that happen to be thinking of a specific URL at the time user happened to press "share", such as sharing the current YouTube video being played in the YouTube app

    In which case, that is impossible, sorry.

    If neither of those guesses really hit what you are asking for, please consider editing your question.

    0 讨论(0)
提交回复
热议问题