ARK-Builders / ARK-Navigator

Android app for navigation through your data
MIT License
15 stars 15 forks source link

Support plain text files #116

Closed kirillt closed 2 years ago

kirillt commented 2 years ago

The app should support previewing plain text files (.txt) and editing them in an external app.

kirillt commented 2 years ago

Open question: how should we determine if a resource is "plain text"? Ideally, we would like to treat not only files with .txt extension. Is it a good idea to take first N bytes, attempt conversion of them to UTF-8 and, in case of success, treat the file as plain text?

mdrlzy commented 2 years ago

I think we can use Apache Tika val fileType = Tika().detect(inputStream)