Open file by default

I will try it. But i have another question. After openning the file how will the app know which file is opened?

For what kind of format you app is designed to oprate, and for that file processing capability you had informed/registred your app to android that your app has this capability to process a specific kind of file, like MS Word is designed to process .doc file version.

Intent mean what is your app's intention to perform.

And, each file-extention is a protocol, how zero and one is organized at memory level, and your app would have that processing mechanism to process that protocol/file-extention.

when file(text format) opened in the app, it reads it and executes specific tasks. (like python)

Then it should work other way also, by opening it from outside of app, as you asked,

Why not just open your app, then open a file, it is much easier....

Sure, i thought adding this feature, but wanted to know if i can open from directly files.