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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:11:56+00:00 2026-05-26T05:11:56+00:00

I wrote a simple program in that retrieves google home page. the code is

  • 0

I wrote a simple program in that retrieves google home page. the code is below:

HttpConnection conn = (HttpConnection) Connector.open(url, Connector.READ_WRITE);
conn.setRequestMethod(HttpConnection.GET);
int responseCode = conn.getResponseCode();
if(responseCode == HttpConnection.HTTP_OK){
    InputStream data = conn.openInputStream();
    StringBuffer raw = new StringBuffer();
    byte[] buf = new byte[4096];
    int nRead = data.read(buf);
    while(nRead > 0){
        raw.append(new String(buf, 0, nRead));
        nRead = data.read(buf);
    }
    dest.updateDestination(raw.toString());

}
else
    dest.updateDestination("responseCode="+ Integer.toString(responseCode));            
    }
    catch(IOException e){
        e.printStackTrace();
        dest.updateDestination("Exception:"+e.toString());
    }

This is my main screen:

MenuItem getDataAction = new MenuItem("GetData", 100, 10){
        public void run(){
            String URL = "http://www.google.com";
            ServiceRequestThread svc = new ServiceRequestThread(URL, (MyScreen)
                    UiApplication.getUiApplication().getActiveScreen());
            svc.start();
        }
    };
    addMenuItem(getDataAction);
}

public void updateDestination(final String text){
    UiApplication.getUiApplication().invokeLater(new Runnable(){
        public void run(){
            output.setText(text);
        }
    });
}

When i am running my application on the simulator, i am getting the exception that is caught as Exception:java.io.IOException:Radio is Off I am using eclipse IDE. Should i change any properties in the eclipse or simulator. why am i getting this exception. What is the solution. Thank 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-05-26T05:11:57+00:00Added an answer on May 26, 2026 at 5:11 am

    In the simulator menu, go to Simulate -> Network Properties and look at the available networks to make sure “In Coverage” is ticked. Also in on the simulated device, go to the Manage Connections menu and make sure you have the Mobile Network enabled.

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

Sidebar

Related Questions

I wrote a simple program that reads the characters from external device (bar code
I recently wrote a program that used a simple producer/consumer pattern. It initially had
I just wrote my first OpenMP program that parallelizes a simple for loop. I
I wrote a simple program that using Class::ArrayObjects but It did not work as
The problem is this: I wrote a simple program that uses FFMPEG. compile as
I wrote a simple program that accesses a file called input.txt and pushes its
I have been looking at Reflection.Emit recently. I wrote a simple program that generates
I wrote a simple WinForm program in C# that displays the time, updating every
I wrote a simple python program that looks to me like it should be
I wrote a simple program that sorts in O(n). It is highly memory inefficient,

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.