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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:39:46+00:00 2026-06-03T20:39:46+00:00

Can anyone guide me, Im trying to create a simple app that has splash

  • 0

Can anyone guide me, Im trying to create a simple app that has splash and main menu activity.

I have implemented both of the activity and whenever I run the emulator I can see the splash pop up but it never goes to the main menu activity.

I tried to change the XML file in manifest as below:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.book" android:versionCode="1"
    android:versionName="1.0">

    <uses-sdk android:minSdkVersion="7" />
    <application android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" android:name=".activity.StartApp">
 <activity 
        android:name=".activity.MainMenuApp"
        android:label="@string/app_name">

    </activity>

        <activity android:name=".activity.SplashApp" 
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

Can anyone suggest why the main menu did not show up?

Thanks.

Edit: SplashApp.java

import com.book.R;
public class SplashApp extends Activity {

private DBAdapter mDBAdapter;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.splash);
}

@Override
protected void onStart() {

    super.onStart();
    mDBAdapter = new DBAdapter(getApplicationContext());

    try{

... 
….      int sec = 1;
        new Handler().postDelayed(new Runnable(){
            public void run(){
                Intent intent = new Intent(SplashApp.this, MainMenuApp.class);
                startActivity(intent);

                finish();
            }
        }, sec * 1000);
    }catch (Exception e){
        e.printStackTrace();
    }
}
}

I found that the problem might be on my manifest file where it says:

package="com.book"

I am now able to load the splash activity but it won’t go to the main menu page?

  • 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-03T20:39:47+00:00Added an answer on June 3, 2026 at 8:39 pm

    If your main menu activity is actually an Activity, it should be also noted in the androidManifest.xml file (with or without intent filters):

    ...
    <activity android:name=".activity.MainMenu" 
        android:label="@string/main_menu">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    ...
    

    In case you are performing initialization tasks in the SplashApp activity, and the main functions of your applications reside in the MainActivity, you would find the DEFAULT intent filter useful though.

    edit1: remove the android:name attribute from the application tag in the manifest

    edit2: use SplashApp.this.finish() instead of simply finish(), because the this there refers to the Handler.

    SplashApp.java:

    package com.book.activity;
    
    import java.io.BufferedReader;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.util.ArrayList;
    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.os.Handler;
    import com.book.R;
    
    public class SplashApp extends Activity
    {
        private DBAdapter mDBAdapter;
    
        @Override
        protected void onCreate(Bundle savedInstanceState)
        {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.splash);
        }
    
        @Override
        protected void onStart()
        {
            super.onStart();
            mDBAdapter = new DBAdapter(getApplicationContext());
            try
            {
                ArrayList<BookBean> books = mDBAdapter.getAllBooks();
                if (books == null)
                {
                    InputStream instream = getAssets().open("bookdata.txt");
                    BufferedReader bf = new BufferedReader(new InputStreamReader(instream));
                    String line;
                    while ((line = bf.readLine()) != null)
                    {
                        String arr[] = line.split("***");
                        for (int i = 0; i < arr.length; i++)
                        {
                            String temp[] = arr[i].split("*");
                            BookBean book = new BookBean();
    
                            book.setDescription((temp[0]));
                            book.setName(temp[1]);
                            book.setYearPublished(temp[2]);
                            mDBAdapter.insertBook(book);
                        }
                    }
                }
                final int sec = 1;
                new Handler().postDelayed(new Runnable()
                {
                    public void run()
                    {
                        Intent intent = new Intent(SplashApp.this, MainMenuApp.class);
                        startActivity(intent);
                        SplashApp.this.finish();
                    }
                }, sec * 1000);
            }
            catch (Exception e)
            {
                e.printStackTrace();
            }
        }
    }
    

    androidManifest.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.book" android:versionCode="1"
        android:versionName="1.0">
        <uses-sdk android:minSdkVersion="7" />
        <application android:icon="@drawable/ic_launcher" 
            android:label="@string/app_name">
            <activity android:name=".activity.MainMenuApp" 
                android:label="@string/app_name" />
            <activity android:name=".activity.SplashApp" 
                android:label="@string/app_name">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>
    </manifest>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to launch the Main Activity from a broadcast receiver. Can anyone
hey all, Anyone guide me that how can i create cover Flow application for
i am trying to genarate XML from xsd using perl can anyone guide me
can anyone guide me int he right direction? What i'm trying to achieve is
Can anyone guide me what could be the problem in the mentioned below:- alt
Can anyone point me to a guide for creating inf files? In particular, I'm
Does anyone know of an ASP.NET guide to implementing OpenID and what information can
can anyone help me in trying to check whether JavaScript is enabled in client
I am trying to find a good example that can help me to understand
I am trying to learn Django (and Python) and have created my own app

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.