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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:35:33+00:00 2026-06-17T02:35:33+00:00

I’m making an android application that uses internet data. I developed on min sdk

  • 0

I’m making an android application that uses internet data. I developed on min sdk version 2.2 but now I changed it to 3.0. My problem is that now some of the components don’t work. My guess is that some code in version 2.2 might be deprecated in 3.0. But I have no idea what to do to make it work.

For example, my ImageView is working in 2.2. But in 3.0 its not.

            //******satellite url
    private void satellite() {
        // TODO Auto-generated method stub
        ImageView imgView =(ImageView)findViewById(R.id.satellite);
        Drawable drawable = LoadImageFromWeb("http://www.pagasa.dost.gov.ph/wb/sat_images/satellite.gif");
        imgView.setImageDrawable(drawable);

    }

Another is my json parser. It also work perfectly in 2.2 but not in 3.0

//json stuffs , setText on textViews in main menu
    private void jsonStuffs() {
        // TODO Auto-generated method stub
    //JSON PARSER & HOME PAGE TEXTVIEWS

        client = new DefaultHttpClient();
        //new Read().execute("id");
        //http client codes only no parser !!
        GetMethodEx test = new GetMethodEx();
        String returned;
        try {
            returned = test.getInternetData();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        try{
            String jsonStr = test.getInternetData(); //punta sa GetMethodEx
                JSONObject obj = new JSONObject(jsonStr);

                //find temperature sa JSON sa webpage
                String temperature = obj.getString("temperature");
                TextView tvTemp = (TextView)findViewById(R.id.temp);
                tvTemp.setText(temperature);

                //find sunrise sa JSON sa webpage
                String sunrise = obj.getString("sunrise");
                TextView tvSunrise = (TextView)findViewById(R.id.sunrise);
                tvSunrise.setText("Sunrise: " + sunrise);

                //find sunset sa JSON sa webpage
                String sunset = obj.getString("sunset");
                TextView tvSunset = (TextView)findViewById(R.id.sunset);
                tvSunset.setText("Sunset: " + sunset);


        }
        //catch (JSONException e) {
             // e.printStackTrace();
            //} 
        catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
    }

I haven’t received any errors on this project. Just the data is not displaying, the imageview is not displaying etc.

I hope someone can help. Thanks in advance 🙂

  • 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-17T02:35:35+00:00Added an answer on June 17, 2026 at 2:35 am

    I think the reason is Android 3.0 and above, you need to do network operation like http request and all in seperate thread then the UI thread. You are directly using the code in UI thread so it works below HoneyComb. So you need to put a web request in seperate thread then UI. AsyncTask is a good option.

    For more detail check this link.

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I want to construct a data frame in an Rcpp function, but when I
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I am doing a simple coin flipping experiment for class that involves flipping 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.