Open file by default

No, i mean example by this.

Then again: Open file by default - #2 by Anke

Adobe Acrobat opens pdf for example. So i want when i click specific file extension, it will open in my app.

Show us what you've tried so far (your blocks).


This is my blocks.

What do these blocks have to do with opening a specific file (file type)?

They do nothing about openning file. When user opens file with this app will parse and do the actions. But I can't figure out how can i do this.

Then specify your question and last but not least the topic.

When I click html file, i want my app to be shown like this

Try Taifun's Sharing extension

I don't want to open files in other apps. I want to open files in my app.

Looks like you will need to edit your manifest.xml to make your app one of the default apps offered

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.