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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:52:09+00:00 2026-06-05T03:52:09+00:00

I want to start my application automatically when the phone boots. I declared a

  • 0

I want to start my application automatically when the phone boots.
I declared a BroadcastReceiver in the manifest file.

<receiver android:name=".Autostart">  
<intent-filter>  
    <action android:name="android.intent.action.BOOT_COMPLETED" />  
</intent-filter>  

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

I made a java file for the receiver.

Autostart.java

public class Autostart extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
    if ("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {  

    Intent pushIntent = new Intent(context, MushTouchActivity.class); 
    pushIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(pushIntent);
    }
}

}

But, the application does not launch when I switch my phone on. Can anyone tell me what I am missing here ?

  • 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-05T03:52:11+00:00Added an answer on June 5, 2026 at 3:52 am

    try your if statement like this:

        if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)){
    
    
            Intent i = new Intent(context, MushTouchActivity.class);
            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    
            context.startActivity(i);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to start my application when phone startup I just follow tutorial from
I want to know if it's possible in android to start application using QR
Possible Duplicate: Start android application without activity I want to do a download tool
I am developing a gps tracking for Android i want my application to start
In my Windows Phone application( silverlight application ), I want the user to automatically
I have a rails application and I want to start the server automatically whenever
I am successfully able to start my Android app automatically on boot using BroadcastReceiver
I want to start an application which will use ajax push, however the web
i want to start an application on receiving sms from a particular number. i
I want to put Start and End image with overlay in an iPhone/iPad application.

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.