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

  • Home
  • SEARCH
  • 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 8954773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:23:12+00:00 2026-06-15T14:23:12+00:00

In my application, i want to display data that is saved in MY_SQL on

  • 0

In my application, i want to display data that is saved in MY_SQL on android application TextViews. How can i do it

my android application layout is:

     <LinearLayout 
         android:orientation="vertical"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:gravity="center">


    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/cus_name"
        android:gravity="center"
        android:clickable="true"
        android:focusable="true"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView
        android:id="@+id/cus_name_txta"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:textAppearance="?android:attr/textAppearanceLarge"/>

    </LinearLayout>

   <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:gravity="center">

    <TextView
        android:id="@+id/textView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="@string/contact_no"
        android:clickable="true"
        android:focusable="true"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView 
        android:id="@+id/contact_no_txta"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center" />

   </LinearLayout>

    <LinearLayout 
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:orientation="vertical"
       android:gravity="center">

    <TextView
             android:id="@+id/textView4"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/ticket_no"
             android:clickable="true"
             android:focusable="true"
             android:gravity="center"
             android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView 
        android:id="@+id/ticket_no_txta"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:textAppearance="?android:attr/textAppearanceLarge" />

   <requestFocus />

    </LinearLayout>

   <LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:gravity="center">

    <TextView
        android:id="@+id/textView5"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:clickable="true"
        android:focusable="true"
        android:gravity="center"
        android:text="@string/task_detail"
        android:textAppearance="?android:attr/textAppearanceLarge" />


         <TextView
             android:id="@+id/task_detail_txt"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:gravity="center"/>

    </LinearLayout>



     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:gravity="center"
         android:orientation="vertical" >

         <TextView
             android:id="@+id/textView6"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:gravity="center"
             android:text="@string/attend_by"
             android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView 
        android:id="@+id/attend_by_txta"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:textAppearance="?android:attr/textAppearanceLarge" />

My java code is:

public static String attend_by_txt;

TextView cus_name_txt, contact_no_txt, ticket_no_txt;
TextView task_detail_txt;
 EditText attend_by_txtbx;



@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.my_task);


    this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);


    cus_name_txt = (TextView)findViewById(R.id.cus_name_txta);

           contact_no_txt = (TextView)findViewById(R.id.contact_no_txta);

    task_detail_txt = (TextView)findViewById(R.id.task_detail_txt);

I want that when i click on customer_name, Contact_No, ticket_No, Task_detail. it display data that is saved in MY_SQL. Please guide me how can i retrieve data from database and display it in android. I’ll be very thankful to you.

  • 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-15T14:23:13+00:00Added an answer on June 15, 2026 at 2:23 pm

    This depends on whether you want your database to be local or stored on a remote server.

    If it is local, You’ll have to convert your MYSQL db to a SQLite db since this the one that Android supports.

    See here for instructions:

    Convert MySQL to SQlite

    Then you can access it using the native android methods. See db tutorial here:

    http://www.vogella.com/articles/AndroidSQLite/article.html

    If it is hosted on a remote server, then you’ll have to create REST API’s (by writing server side code using a language like PHP, Ruby, Python etc) that your Android app can consume to obtain the data from the db.

    There are other options that avoid REST API’s as well. See:

    How to get from a MySql server to an Android app?

    See here for a beginners tutorial on REST:

    http://net.tutsplus.com/tutorials/other/a-beginners-introduction-to-http-and-rest/

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

Sidebar

Related Questions

On one of our Java application screens, we want to display data loaded from
I want to create application which would display spatial data on Map. I'm thinking
I am writting an android application and i want to display a webpage inside
i want to display an alert at first launch of application, and that alert
Hi I want to display the data in the format that is represented in
I have a simple quiz application and I want display a nice timer /
I am working on a windows application where i want to display orkut user
I want to display the time (including seconds) in an application in a text
I want to display a popup windo on my rails application... Here is exactly
I want to display the ServiceMark (SM) symbol in my application. I use its

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.