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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:25:16+00:00 2026-05-20T17:25:16+00:00

I have an Android application which, among other things, also publishes updates on Facebook.

  • 0

I have an Android application which, among other things, also publishes updates on Facebook.

I created my code according to this example and it works perfectly fine. The only difference in my code and the one in the link above is that I also extended onActivityResult as mentioned on the official Facebook SDK for Android page.

    @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    facebookClient.authorizeCallback(requestCode, resultCode, data);
}

Sometimes however, I get a null pointer exception on the line where I call the “facebook.authorizeCallback()” within the onActivityResult() method.

This has never occurred on any of my mobile phones or emulators. However, I keep getting user crash reports, mostly from Droid and T-Mobile myTouch 3G phones. I tried a lot but was unable to reproduce the problem. Any body have any idea what could be wrong ?

  • 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-20T17:25:17+00:00Added an answer on May 20, 2026 at 5:25 pm

    By looking in Facebook.java code it seems that the DialogListener and is kept as a private parameter in the class… when calling authorizeCallback() you assume that the DialogListener exits and isn’t null. BUT if your phone is short on memory (like my G1 is) your calling activity is killed to vacate memory for the facebook login process those erasing your DialogListener when you call the autherizeCallback function you’ll get a null pointer exception or the callback is ignored.
    This might be the cause of your problem.

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

Sidebar

Related Questions

I have created an application for Android that has an activity that has a
I have an Android application which grabs some data from an external XML source.
I have a android application which needs username and password to login. I need
Hello I have an android application which has a service running. After 20 mins
I have two threads in an Android application, one is the view thread, and
I'm having a bit of a problem with my Android application. I have 2
I'm doing some Android development, and I much prefer Visual Studio, but I'll have
Have you guys had any experiences (positive or negative) by placing your source code/solution
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a

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.