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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:19:16+00:00 2026-06-13T04:19:16+00:00

For my application there is one tab host with 5 different activities for 5

  • 0

For my application there is one tab host with 5 different activities for 5 tabs. One of those is actually an activity group, which contain 4 child activities, and users can go back and fro for these child activities.

Now one of the child activities is used to post tweet. The OAUTH thing is fine. However I find that the callback cannot actually point back to the activity but the parent activity group or even the tab activity. I am not sure where does it points to but the outcome is that when the user authorize my twitter app, and return to the android app, the activity will be started all over and called onCreate instead of onResume or onNewIntent. This causes an infinity loop , asking the user to authenicate again and again. I have tried to add android:launch:singleInstance but this does not help.

If I do not start the activity as a child but a new activity, everything is fine.I can get back to onNewIntent and successfully post tweets. So I am quite sure the cause is activity group or tab activity.

I am actually not very familiar of how intent filter works under tab / activity group, can anyone explain the case for me?

Manifest.xml

<activity android:name="TwitterAct" android:launchMode="singleInstance">
        <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:scheme="myapp" android:host="twitteract" />       
        </intent-filter>
</activity>

TwitterAct

private final String CALLBACKURL = "myapp://twitteract"; 

Thanks

  • 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-13T04:19:18+00:00Added an answer on June 13, 2026 at 4:19 am

    This works for me: render the oauth web page in a WebView you control rather than launching out to the browser app.

    The oauth web page, when it calls its callback, will actually be replacing itself in the webview, where your WebViewClient can catch that expected URL, process the results, and finish() the webview (removing it from the activity stack).

    In other words, your manifest entries can go away. Your callback can be any URL, so long as you recognize it in the WebViewClient you create.

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

Sidebar

Related Questions

I'm building a tab bar application in which there are three tabs, each of
I have made a swings application but there is one problem in that which
In my application one frame is there on which one button is there. If
I have a .NET forms application using a tab control with several tabs. There
I'm working on an Android Application which uses the Tab Host icons downloaded from
I have a tab based application in which one tab is available in both
My app is a tab bar application running on iPad. One of the tabs
I have a simple Crud application where there is one filed called Category. During
In my application there are 2 options to open the app. One of them
I have a server application with such structure: There is one object, call him

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.