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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:22:35+00:00 2026-05-26T20:22:35+00:00

Background: I have started Android recently. I want to make an application for Android

  • 0

Background:

I have started Android recently. I want to make an application for Android that fetches data from a server and customizes it , displays it and then use Twitter to tweet the results. I am thinking to use (twitter4j API for this.).

Initially i have a PERL file on server that i need to call from my application’s interface. (I have modified code of HelloWorld.java available at (dev.android..). The PERL file which i have stored on the server has the output in form of print “” I would be using the collective print output and decode them in my application.

Now my code is as follows :

package com.example.helloandroid;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class HelloWorldAndroidActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView tv=new TextView(this);
        /*      tv.setText("Hello, World !! This is my First Android App .. Cheers");
        setContentView(tv);*/

        try {
            InputStream is = new URL("http://myserver.com:1941/cgi-bin/myperl.pl").openStream();
            BufferedReader in = new BufferedReader(new InputStreamReader(is));
            String str = in.readLine();
            in.close();
            tv.setText(str);
            setContentView("phew");
        } catch (MalformedURLException e) {
            //FAIL
        } catch (IOException e) {
            //FAIL
        }


    }
}

However i am not able to use the code to get the data from the server file as Eclipse emulator shows up but does not displays anything except the “shinny android logo”.

Is there any way i can read that file? Also i would like you seniors to suggest me some startup/dummies book fro Android development.

  • 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-26T20:22:35+00:00Added an answer on May 26, 2026 at 8:22 pm

    How long do you want for the emulator to boot up? It can take upwards of two minutes to boot up. It’s kind of slow in that respect. Try giving it a little time to actually get to the home screen. Also, is your logcat saying anything interesting?

    Also, you’re doing a network operation on the main UI thread. NEVER do this. You need to move your network operations on to a different thread. For more details, read Painless Threading.

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

Sidebar

Related Questions

Background: we have an application that generates reports from HTML (that may or may
I have an android app that uses a background service for uploading data. When
I have a background in LAMP development and have recently started learning sql server.
I have just started working on my first Android application and am going ok.
I recently started using android actionbars and contextual action bars (CAB). I have just
I come from a C# background, and have just started programming in Ruby. The
I am using Eclipse to develop an Android application that plots Bluetooth data. I
I have written an android service, that I need to run in the background
I want to have a background service running which gets started when an Image
I have an android app that will record data every x mins. The time

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.