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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:51:24+00:00 2026-06-13T22:51:24+00:00

From the Android launcher source code, if ((intent.getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) { //reset

  • 0

From the Android launcher source code,

if ((intent.getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) !=
        Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) {
    //reset homescreen to default page
}

The launcher resets the homescreen to default page if the startActivity intent does not have the flag FLAG_ACTIVITY_BROUGHT_TO_FRONT.

The flag is only not set if there is already an instance of the activity being started at the top of the stack.

Is there a way to trick the launcher into thinking it’s already running in the top of the stack (causing it to reset the homescreen pages) when it is launched from another app? (not from home key press).

  • 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-13T22:51:25+00:00Added an answer on June 13, 2026 at 10:51 pm

    Follow my understanding about your question. I think FLAG_ACTIVITY_NEW_TASK flag can help you. The document say:

    When using this flag, if a task is already running for the activity you are now starting, then a new activity will not be started; instead, the current task will simply be brought to the front of the screen with the state it was last in

    And If there is already an instance of the activity are running. Method :

    protected void onNewIntent(Intent intent)
    

    will be called. So, you can reset your home screen from this method whenever there are a new intent come.

    Hope it help.

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

Sidebar

Related Questions

I meet a problem when read the source code of Android 2.2 default Launcher.
I want to customize the Launcher of android (from source of google), my question
I wanted to start a service from a Broadcast reciever which takes android.intent.action.BOOT_COMPLETED. When
I am using: windows7, eclipse, sdk up-to-date, avd from android 2.3.3 & milestone <-the
I've built Android from source and would like to launch directly into my application
I have an application without launcher activity that works properly from Android 1.5 to
I am modifying the Android Home (Launcher) application and configured an eclipse project from
I am working with android source. I am sending a broadcast from one of
From Android widget screen guidelines, http://developer.android.com/guide/practices/ui_guidelines/widget_design.html , we know that, home screen has 4*4
Starting from Android 3.2 I have this strange problem. It's very easy to reproduce:

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.