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 9015941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:52:30+00:00 2026-06-16T03:52:30+00:00

So I am writing an Android app which performs certain calculations which involve dozens

  • 0

So I am writing an Android app which performs certain calculations which involve dozens of variables, and I want to let the user store the value of these variables in a file so that they can load those values into the calculation again in the future, without having to type them in all over again.

Ideally, what I want is to be able to have the users store their the values inside their device, presumably as files, and then browse these files later on, picking which ever one they want to upload into the calculations.

However, I’m not sure what the best way to implement this “browsing” is. My current, most likely primitive idea is to have a single file, always present, that stores the names of all the other files the user has saved, and a fragment that reads that one static file and displays all those file names in Buttons for the user to select at will. Is there a more robust or intuitive way of letting users browse available files or sets of data that doesn’t require such manual tinkering?

  • 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-16T03:52:31+00:00Added an answer on June 16, 2026 at 3:52 am

    When creating the files use the openFileOutput(String name, int mode) method.

    NOTE, the name must be file name only (no path) and the file will be created in the app’s own internal ‘files’ directory.

    When you want to enumerate the files, use getFilesDir() to get a File object with the path of the ‘files’ directory, then call listFiles() to get an array of files in that directory (as File[]).

    Iterate through the File[] to get the names of all files and use those to populate an ArrayAdapter<String> and use that to populate a ListView.

    When a user selects a file from the list retreive the file name from the selected list item then use openFileInput(String name) to open the file. NOTE, again name is file name only without a path.

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

Sidebar

Related Questions

I am writing an android app for which I want to write a function
I'm writing an Android app, which uses location services. I want to detrmine the
I am writing an Android app which communicates with a PHP backend. The backend
I am writing a small app in which android device tries to send a
I am writing an android app. I want to pass some data across the
I am writing an Android app, part of which will be a survey involving
I'm writing an Android app. I have a main method, which creates and runs
I'm looking at writing an app which will use text present on a user's
I'm planning to write an app for Android which performs a simple cell counting.
I am writing an Android app which submits a username and password to a

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.