Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8475761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:58:52+00:00 2026-06-10T17:58:52+00:00

I wanna develop a app manager, and implements function like this: edit different type(with

  • 0

Can I edit .txt file opening app programmatically?

I wanna develop a app manager, and implements function like this: edit different type(with different suffix) opening app, or clear default. Is this possible in Android?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:58:53+00:00Added an answer on June 10, 2026 at 5:58 pm

    You can use:

    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setData(<The URI of the data you want to open>);
    intent.setType(<MIME type>); // Optional        
    startActivity(intent);
    

    This will show you the appliation choser dialog with the applications that can open the data based on the URI scheme/path and/or the MIME type.

    You can also use Intent.ACTION_EDIT instead of Intent.ACTION_VIEW if you want to edit the data.

    EDIT: Nothing much to show, to open a TXT file you can use:

    File file = new File(Environment.getExternalStorageDirectory(), "test.txt");
    Uri uri = Uri.parse("file://" + file.getAbsolutePath());
    
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setData(uri);        
    startActivity(intent);
    

    If there is any application associated with TXT files, the Android OS will prompt you to chose an app, if there is only 1 application capable of opening the specified file type, it will open it using that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanna develop an addon (basically a hack) for IPhone native phone app. My
I wanna create android animation like shown on this example. Only one change I
I wanna do something like the safari app when fill a form, so when
I have develop an Android app, this app through a Apache Client send latitude
I wanna develop android application for different types of languages. So I have used
I wanna implement comments view like this: Is there any open source project doing
Wanna to split a screen for my app with two LinearLayouts. What parameters should
I wanna to achieve an effect like a fired blue ball (ball with energy)
I wanna show some text (and images) in browser but this text shouldn't be
I wanna know is this possible I pass get parameters for a javascript file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.