Why isn't my app on the list of apps to open txt file?

前端 未结 3 2066
面向向阳花
面向向阳花 2020-11-28 12:53

I have an text reader app that is designed to receive intent from Android system when I click on a text file to open it. But my app isn\'t on the list popped up by the syst

3条回答
  •  眼角桃花
    2020-11-28 13:49

    You need to associate your app with file extension. To do so, add these two line within intent filter and u'r good to go

    
    
    
    

    And your manifest would be look like this

    
        
            
            
            
            
            
            
        
    
    

    => this define that the file must be local, not from http or else

    => match any mime type

    => this is where you specify what extension you want to match

    Hope this help

提交回复
热议问题