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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:11:04+00:00 2026-05-26T23:11:04+00:00

I have an activity than can be called from my parent activity and from

  • 0

I have an activity than can be called from my parent activity and from other application via intent filter (i.e. ACTION_VIEW).

When I call finish() inside my activity, how to return to the correct caller?

i.e:
other application -> my activity -> finish() -> other application

currently if my main activity is still running, the finish() will return to my main activity, although it was called from other application.

  • 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-05-26T23:11:05+00:00Added an answer on May 26, 2026 at 11:11 pm

    Read up on Tasks – by calling the activity from a different task (/application), you’re bringing the existing Task to the foreground, which might include other Activities in the back stack that you don’t want. I would suggest specifying the android:taskAffinity of the Activity that can be started from other Applications. Since this will ensure that this Activity will be the only one in the Task, it doesn’t matter if it is started from within it’s own app, or another.

    EDIT: Figure 4 in the Tasks link shows your situation.

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

Sidebar

Related Questions

Specfically, I have an activity that can be called from the homescreen, OR can
I want to retrieve data from sqlite. user can have more than 1 score
I have the following problem: I have an Activity where a user can start
Going round in circles here i think. I have an activity called Locate; public
I have very little knowledge of generics other than how to 'use them'. In
I am trying to fill up my ListPreference from within my Activity rather than
I have three activities that I can call A, B and C. I want
I just got done writing an Android Activity that allows other Activities to call
I have an Activity in which user can update a specific information clicking in
I have an activity that extends ViewFactory. The activity does nothing more than act

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.