Android How to create Intent Filter for custom file extension that does NOT make it part of a chooser for everything on the phone

前端 未结 4 1308
暗喜
暗喜 2020-12-03 03:57

I have seen numerous answers on here about creating an intent filter for a custom file extension, but none of them seem to be answering my question:

I have an intent

4条回答
  •  长情又很酷
    2020-12-03 04:36

    The only way to solve this problem is add scheme and host attributes to your intent filter:

    
      
      
      
      
         
      
    
    

    That is because in documentation says that android:pathPattern only works if has an scheme and host defined. http://developer.android.com/guide/topics/manifest/data-element.html

    Hope it helps.

提交回复
热议问题