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 1312
暗喜
暗喜 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:44

    I have the exact same problem, and in my case, both other answers don't work. The closest I came is when I combine both benjamin and sabadow's answers, -and- leave out the dot in the extension, so like this: (i'm using my custom ".trk" extension)

            
            
                
                
                
                
    
                
                
    
                
                
                
                
                
                
                
                
                      
            
            
                
                
                
                
    
                
                
                
            
            
            
                
                
    
                
            
    

    It's a bit long, but you might not need all lines, like the SENDTO and SEND_MULTIPLE actions. I just need it to work in all cases where it could work. Sadly it also triggers in some, but not all, other cases.

提交回复
热议问题