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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:00:25+00:00 2026-05-26T16:00:25+00:00

I log in in my application with linkedin and twitter. These two client pass

  • 0

I log in in my application with linkedin and twitter. These two client pass by a webview and come back in my application (I use onNewIntent() to get the data from them). The problem is: I can’t have two onNewIntent() in one activity.. How can I do both of them in the same activity?

Here my code:

    @Override
protected void onNewIntent1(Intent intent2) {
    super.onNewIntent(intent2);
    Uri uri = intent2.getData();
    try {
        String verifier = uri.getQueryParameter("oauth_verifier");
        AccessToken accessToken = twitter.getOAuthAccessToken(requestToken,
                verifier);
        String token = accessToken.getToken(), secret = accessToken
                .getTokenSecret();

        System.out.println("ACCESSSSSSSS"+accessToken+token);
    } catch (TwitterException ex) {
        Log.e("Main.onNewIntent", "" + ex.getMessage());
    }

}


@Override
protected void onNewIntent(Intent intent) {

    String verifier = intent.getData().getQueryParameter("oauth_verifier");

    LinkedInAccessToken accessToken = oAuthService.getOAuthAccessToken(liToken, verifier);
    client = factory.createLinkedInApiClient(accessToken);
    client.postNetworkUpdate("LinkedIn Android app test");

    Person p = client.getProfileForCurrentUser(EnumSet.of(ProfileField.FIRST_NAME, ProfileField.LAST_NAME, ProfileField.ID));

    System.out.println("Token  "+accessToken.getToken());       
    System.out.println("Secret  "+accessToken.getTokenSecret());
    System.out.println("NOM: "+p.getLastName() + ", PRENOM: " + p.getFirstName());

    String user_id = p.getId();
    String first_name = p.getFirstName();
    String last_name = p.getLastName();
    String oauth_token = accessToken.getToken();
    String oauth_token_secret = accessToken.getTokenSecret();

    //Verification du login/password
    new LoginLinkedin().execute(user_id,oauth_token,oauth_token_secret,first_name,last_name);

    }
  • 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-26T16:00:26+00:00Added an answer on May 26, 2026 at 4:00 pm

    You cannot do this. Because onNewIntent must be overriden from the parent class the system will only ‘see’ the onNewIntent that actually overrides a parent method. The above code should cause a error because the use of the @Override method on onNewIntent1 is not valid.

    What you need to do is determine where the intent came from by observing its current data and then either running your twitter or linked in code. This observation should be made inside a single unified onNewIntent method.

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

Sidebar

Related Questions

I developed two .jar for my application (LOG.jar and STRING.jar). I use these jar,
We use the log4net to log the winform application's event and error. Our customer
When I use the following code to write to Application Event log, everything works
So we've produced a windows service to feed data to our client application and
In an android app I am trying to get my application log messages and
What is an application log? How is it different from Error Log? What kind
I'm working with an application that logs to Windows Application Log regularly (viewable through
I recently took over management of a Windows 2003 server. The application log is
I'm writing a log collection / analysis application in Python and I need to
The following code will log in my application to a server. That server will

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.