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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:16:54+00:00 2026-06-18T16:16:54+00:00

This is my web service data. [ { msgid: 1, title: Lorem Ipsum is

  • 0

This is my web service data.

[
    {
        "msgid": "1",
        "title": "Lorem Ipsum is simply text",
        "dt": "05-SEP-2012"
    },
    {
        "msgid": "2",
        "title": "Lorem Ipsum is simply ",
        "dt": "16-NOV-2011"
    },
    {
        "msgid": "3",
        "title": "Lorem Ipsum is simply text",
        "dt": "13-SEP-2012"
    },
    {
        "msgid": "4",
        "title": "Lorem Ipsum is simply text2",
        "dt": "26-SEP-2012"
    },
    {
        "msgid": "5",
        "title": "Lorem Ipsum is simply text",
        "dt": "30-SEP-2012"
    },
    {
        "msgid": "6",
        "title": "test message ",
        "dt": "12-OCT-2012"
    },
    {
        "msgid": "7",
        "title": "test message ",
        "dt": "01-OCT-2012"
    }
]

How can I fetch this data to app in Android using JSON parsing?
what is the java code for this data can u help me….plz….

  • 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-18T16:16:56+00:00Added an answer on June 18, 2026 at 4:16 pm

    public class Original_list extends Activity {

     TextView web;
     ArrayList<String>  id1,question1 ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.list);
     web = (TextView)findViewById(R.id.web1);
     id1 = new ArrayList<String>();
     question1= new ArrayList<String>();
    try {
        JSONArray jary = new JSONArray(readTxt());
        for(int i = 0 ;i<=jary.length();i++)
        {
            JSONObject jread = jary.getJSONObject(i);
            String   id = jread.getString("question");
            Log.d("value of id", ""+id);
            id1.add(id);
            String name = jread.getString("answer");
            Log.d("value of id", ""+id);
            question1.add(name);
            Log.e("id","question is"+id);
          Log.e("id","question is"+name);
        }
    } catch (JSONException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }   
     web.setText(""+id1+""+question1);
        web.setMovementMethod(new ScrollingMovementMethod());
    }
    
    private String readTxt(){
    
             InputStream inputStream = getResources().openRawResource(R.raw.details);
    
             ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    
             int i;
          try {
           i = inputStream.read();
           System.out.println("what"+i);
           while (i != -1)
              {
               byteArrayOutputStream.write(i);
               i = inputStream.read();
               System.out.println("what_next"+i);
              }
              inputStream.close();
          } catch (IOException e) {
           // TODO Auto-generated catch block
           e.printStackTrace();
          }
    
             return byteArrayOutputStream.toString();
            }
    

    }

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

Sidebar

Related Questions

How can I get data from this web service using PHP? I need a
I am trying to send data to this web service . With the following
I built a web service. This web service need to cache a data. Data
Purpose of this web service is to server html/javascript/css/binary data inside simple XML document
So we have this web service that uses an homemade data access framework and
I have this web service : using System.Web.Services; namespace Contracts { [WebService(Namespace = http://tempuri.org/)]
I have a Web Service and an Android application that uses this web service.
My Situation I have developed a web service for document analysis This web service
I've .NET web service using C#, and I post the result from this web
In sharepoint my web part is calling a web service. This web service does

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.