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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:10:12+00:00 2026-05-25T03:10:12+00:00

In my application I want to save some string data into an array. This

  • 0

In my application I want to save some string data into an array.

This data should then be fetched by the another activity in a ListView.

I am using a database to store the data. But every time I’m storing data in different tables. Now as per my knowledge it is not possible to fetch all the available tables from a defined database.

So what I’m trying to do is, store the table name into the Array while it is created. And displaying it in the ListView.

Now when I press on the perticular ListIndex, it will fetch the data of that table.

Is this possible?

  • 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-05-25T03:10:13+00:00Added an answer on May 25, 2026 at 3:10 am

    Use a Map of Table Name against Array of Data

        // Store
        Map<String, String[]> storage = new HashMap<String, String[]>();
        String[] items = {"one","two","three"}; // Your Data
        storage.put("tableName", items);        // Your table name
    
        // Retrieve a specific table
        String[] tableItems = storage.get("tableName");
        for(String s : tableItems){
            Log.i("TAG", "item name: "+s); // Will loop and print one , two then three
        }
    
        // Retrive all
        Set<String> allTables = storage.keySet();
        for (String table : allTables) {
            for(String s : storage.get(table)){
                Log.i("TAG", "table name: " + table + "item name: "+s);  // Will loop through each table, (we only have one) and print one , two then three
            }
        }
    

    EDIT

    For your comment about sending table names:

        String[] items = {"tableOne","tableTwo","tableThree"}; // Your Data
        Intent intent = new Intent(this, Activity2.class);
        intent.putExtra("sendIntentTableName", items);
        startActivity(intent);
    
        ... onCreate(){
            String[] tableNames = getIntent().getStringArrayExtra("sendIntentTableName");
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to save some custom data into application configuration file and I need
I want to save the contents of my Flex application form into a word
I want to create a Java Desktop Application and want to employ some mechanism
In my application I want to open some files with the correct default programmes,
I have some reference data in a text file (~5MB) that I want to
I made some save bean functionality in my Java Web Application (JSF1.2, RichFaces). It
I want to use an event like as i have some value in string
I want to write a web application and want to use Ruby. I have
in my application i want to support both mass memory and memory card. but
In a Java application I want to be able to take a timestamp at

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.