Open Android app from URL using intent-filter not working

前端 未结 3 1802
遇见更好的自我
遇见更好的自我 2020-11-28 08:27

I have an Android app that people use as a replacement for a website. Hence, when users encounter an URL to the website, I want to give them the option to \"open the URL\" i

3条回答
  •  难免孤独
    2020-11-28 09:24

    I thought I will post this here since I spent some time looking into why my intent filter did not work. It turns out that it was working all along but matches are exact. Thus if you register your intent for http://myexample.com and you click in http://myexample.com/blah it will not work.

    Adding the following fixed the issue:

    
    

    So the intent filter looks like:

    
                
                
                
                
                
                
    
    

提交回复
热议问题