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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:09:01+00:00 2026-06-17T23:09:01+00:00

I have 3 activities (MainActivity, TwitterActivity, WebBrowserActivity). WebBrowserActivity uses for showing web info from

  • 0

I have 3 activities (MainActivity, TwitterActivity, WebBrowserActivity).
WebBrowserActivity uses for showing web info from twitter.

Manifest:
1.

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

2.

   <activity
    android:name=".TwitterActivity"
 android:label="@string/app_name"
 android:launchMode="singleInstance" >

<!-- Used for OAuth callback -->
<intent-filter>
    <action android:name="android.intent.action.VIEW" />

    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />

    <data
        android:host="callback"
        android:scheme="x-bker-oauth-twitter" />
</intent-filter>
</activity>

3.

  <activity android:name=".TwitterWebBrowser" />

Starting twitter:

  Intent myIntent = new Intent(mContext, TwitterActivity.class);    
  mContext.startActivity(myIntent);

When twitt is posted I close TwitterActivity (using finish(); method) and MainActivity shows. Than I press Home Button and goes to Android, than press home button and press my app icon, and I goes to TwitterActivity, but I need to go to MainActivity. How do this?

It is only on android version 2.3.7 and below.

  • 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-17T23:09:03+00:00Added an answer on June 17, 2026 at 11:09 pm

    In your manifest entry for the TwitterActivity, change android:launchMode="singleInstance" to android:launchMode="singleTop".

    I think you are setting launchMode because you want to be able to jump out to the Twitter app or web page to authorize the user from TwitterActivity, and then return back to the same instance of your TwitterActivity when done. In that case, TwitterActivity will be at the top of your task stack, so singleTop will tell the system to reuse it.

    The problem with singleInstance is that it makes the activity the only activity in the task, which probably explains why the recents menu is launching the TwitterActivity. (more info in activity element docs).

    If you really need to use singleInstance, you should consider assigning it to its own task and excluding it from recents, for example (use your own name for taskAffinity):

    <activity
      android:name=".TwitterActivity"
      android:label="@string/app_name"
      android:launchMode="singleInstance"
      android:taskAffinity="com.example.twitter"
      android:excludeFromRecents="true">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my android app, I have two activities mainactivity and erroractivity main activity starts
My Application has 3 activities (MainActivity,SampleActivity,TempActivity) and Application have to start from MainActivity because
I have two activities. In first I come to the second activity from first
I have two activities in my android app. MainActivity and SettingsActivity. MainActivity loads index.html
i have two sub activities apart from main activity. The sequence of calls go
I have 2 activities in my android app - mainActivity and mapActivity. And I
I have an android application where there are 3 activities: MA – MainActivity (Launched
I have an Android app with a main tab activity, and several activities within
I have four activities namely, Demo_tabActivity.java [main activity] Tabhost.java The below two activities are
I have four activities namely, Demo_tabActivity.java [main activity] Tabhost.java The below two activities are

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.