Mime type for .txt files?

后端 未结 2 1314
走了就别回头了
走了就别回头了 2021-02-03 16:56

I´m trying to share a .txt file with share intent. If I set \"text/plain\" as mime type, it reads the content like text not like text file, then the options given i

相关标签:
2条回答
  • 2021-02-03 17:04

    You can try the specific mime:

    text/plain
    

    or, the more general text mime:

    text/*
    
    0 讨论(0)
  • 2021-02-03 17:05

    simple and complete example code (less than 50 lines) for app that android will present to the user along with menu list of compatible apps (polaris, browser, etc) when opening a TXT file.

    disclaimer: in case user hasnt previously determined a default app

    note; TXT may be changed, you can customize your extensions, if you generate the files that your app consumes.

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