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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:54:53+00:00 2026-06-10T23:54:53+00:00

How can I resume my app from its previous position. Note that it is

  • 0

How can I resume my app from its previous position.

Note that it is still active, just paused. So if I click the androids current app button, or the app icon it resumes fine.

But who do I do this from my widget..

I have the following:

// Create an Intent to launch Activity
Intent intent = new Intent(context, LoginForm.class);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);

This obviously launches the LoginForm as opposed to just resuming the application.

Does anyone know how to do this?

Edit:

Just to clarify, I dont want anything special. I basically want to mimic pressing the android icon launcher.

  • 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-10T23:54:55+00:00Added an answer on June 10, 2026 at 11:54 pm

    You’ve basically answered your own question 😉

    Just simulate what Android does when you launch the app:

    Intent intent = new Intent(context, LoginForm.class);
    intent.setAction(Intent.ACTION_MAIN);
    intent.addCategory(Intent.CATEGORY_LAUNCHER);
    PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
    

    or you could try this (assuming LoginForm is the root activity of your application and that there is an instance of this activity still active in the task stack):

    Intent intent = new Intent(context, LoginForm.class);
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
    

    Setting FLAG_ACTIVITY_NEW_TASK should just bring an exising task for the application from the background to the foreground without actually creating an instance of the activity. Try this first. If it doesn’t work for you, do the other.

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

Sidebar

Related Questions

I am using AsyncTask in my App. How can i make my Task resume
In my app I use the AudioToolbox framework so that I can use the
I have a Windows Phone 7 app deployed in the marketplace that updates its
In Unix we can suspend a process execution temporarily and resume it with signals
Can I authenticate with just Google account username and password instead of using OAuth?
I have an app that starts playing sounds and begins/resumes gameplay in the onResume()
i'm writing a delphi app that communicates with excel. one thing i noticed is
My wp7 app crashes when I come back from a task such as Map,
I'm implementing support for Lion's Resume feature in my OS X app. I have
I'm writing an iPad app that is a kiosk app. The iPad should be

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.