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

  • Home
  • SEARCH
  • 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 8251375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:12:56+00:00 2026-06-08T00:12:56+00:00

While using facebook in Android to log in/register, it takes a while for facebook

  • 0

While using facebook in Android to log in/register, it takes a while for facebook to send the request. Thus, how do I pause the activity(show a process dialog) till I get the facebook id/username of the user who is trying to register? I can’t do this in the base Listener as it is a background process.

I tried out using AsyncTask but I’m either confused how to do it or it can’t be done. Mostly the former. I did this:

  public class FacebookOperation extends AsyncTask<Void, Void, Void>
        {  





        @Override
        protected void onPreExecute()
        {  
            super.onPreExecute();



                mFacebook = new Facebook(APP_ID);
                mAsyncRunner = new AsyncFacebookRunner(mFacebook);
                reg = "facebook";
                SessionStore.restore(mFacebook, Register.this);
                SessionEvents.addAuthListener(new SampleAuthListener());
                //SessionEvents.addLogoutListener(new SampleLogoutListener());

        } 
        @Override 
        protected void onProgressUpdate(Void... values) {
            super.onProgressUpdate(values);

         }

        @Override 
        protected void onPostExecute(Void result)

        { 


               fillFormFb(); //Fills the form with the data from fb
        }

        @Override
        protected Void doInBackground(Void... params) {
            mLoginButton.init(Register.this, mFacebook,permissions);


            return null;
        }

          }
  • 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-08T00:12:57+00:00Added an answer on June 8, 2026 at 12:12 am

    Use AsyncTask to run your process in background.. you can show your progressbar while loading the operation.

    public class FacebookOperation extends AsyncTask<Void, Void, Void>
    {  
    @Override
    protected void onPreExecute()
    {  
        super.onPreExecute();
        dialog.setMessage("Please wait...");
        dialog.setCancelable(false);
        dialog.show();
    
    } 
    @Override 
    protected void onProgressUpdate(Void... values) {
        super.onProgressUpdate(values);
        // Things to be done while execution of long running operation is in progress. For example updating ProgessDialog
     }
    
    @Override 
    protected void onPostExecute(Void result)
    
    { 
          //Post Execute
           dialog.cancel();
    }
    @Override
    protected Void doInBackground(Void... params) {
    
      // Your operation..Dont Edit Any Views here
    
        return null;
    }
    

    }

    EDIT

    I think you can follow this link to integrate facebook with your app. It will helpful for you.

    Hope it helps

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

Sidebar

Related Questions

While using the Facebook SDK for Android, I realise Facebook uses their own dialogs
While surfing facebook and using the Firebug network debugger I noticed that facebook's AJAX
I'm currently trying to add the facebook apps request from our java server using
i am using facebook api in my android project {error:{type:OAuthException,message:Error validating access token: Session
Using Facebook's Graph API, I've been successful at publishing to a user's feed while
I am using new new Facebook-ios-sdk did everything what is informed in README.mdown. while
How can I get firstname and last name of facebook user while using f-connect?
I'm writing an iPhone app that's using Facebook Connect. While testing, you normally embed
I am using OAuth Dialog for Facebook permission to access a users' email, birthday
While using perl debugger, is there any way to step out of the current

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.