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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:33:06+00:00 2026-06-10T12:33:06+00:00

I have splash activity that should download data from the url parse it and

  • 0

I have splash activity that should download data from the url parse it and pass it to main activity , while downloading i created layout with logo and spining gif loaded in webview ,but when i start app nothing happend ,it wont start main activity here is the code

public class Init extends Activity {

static final String DEFAULT_URL = "http://api.androidhive.info/music/music.xml";

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.init);

    WebView loader = (WebView) findViewById(R.id.loader);
    loader.loadUrl("file:///android_asset/index.html");

    new LoadingTask().execute(DEFAULT_URL);

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
}

public class LoadingTask extends AsyncTask<String, String, String>{
    XMLParser parser = new XMLParser();
    @Override
    protected String doInBackground(String... params) {
        // TODO Auto-generated method stub
        String URL = params[0];
        String xml = parser.getXmlFromUrl(URL); // getting XML from URL
         // getting DOM element
        return xml;
    }

    protected void onPostExecute(String result){
        Intent startApp = new Intent("com.example.androidhive.HOME");
        startApp.putExtra("xmlstring", result);
        //finish();
    }


}

}

  • 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-10T12:33:08+00:00Added an answer on June 10, 2026 at 12:33 pm

    add

    startactivity(startApp);
    

    in post execute to go to next activity

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

Sidebar

Related Questions

Splash I have main activity UI startup operations that take between 5-10 seconds (that
I have an app that displays a splash screen. The splash screen activity creates
I have a splash screen that I would like to fade in, while my
I have a splash activity, and this activity downloads some XMLs from the internet.
I have a simple application that starts with a splash screen activity that plays
I have a splash activity (A) that calls a listview activity (B) which calls
I wrote a splash activity with an async call to download JSON from a
I have a 2 part splash screen that I've been trying to get to
I have a large activity that contains 100 or more buttons. But it's working
I have the main activity which launches a loading screen activity. When the loading

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.