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

The Archive Base Latest Questions

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

HI Am working for the application using tabs through entire app.In that one particular

  • 0

HI Am working for the application using tabs through entire app.In that one particular tab am integrated facebook and twitter.its After clicking facebook button it shows the login screen of facebook and login success also working fine but when the login completed i want to redirect to another activity for that i used the following code in onComplete()

                   View view = Socialtab.group.getLocalActivityManager()  
                       .startActivity("Items", new Intent(Social.this,MainActivity.class)
                       .putExtra("name", name)
                       .putExtra("email", email)
                       .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))  
                       .getDecorView();
                    Socialtab.group.replaceView(view); 

it is showing the exception at the following line

.startActivity("Items", new Intent(Social.this,MainActivity.class)

and my logcat error is follows:

    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.karmakexpo/com.karmakexpo.MainActivity}: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1618)   
at android.app.ActivityThread.startActivityNow(ActivityThread.java:1524)

at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)

at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)    
at com.karmakexpo.Social.jsonParsing(Social.java:353)   
at com.karmakexpo.Social$SampleRequestListener.onComplete(Social.java:258)  
at com.karmakexpo.facebook.AsyncFacebookRunner$2.run(AsyncFacebookRunner.java:238)

Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

at android.os.Handler.<init>(Handler.java:121)
at android.app.Activity.<init>(Activity.java:698)

at com.karmakexpo.MainActivity.<init>(MainActivity.java:56)

at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1409) at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1610)
... 6 more

I have googled and did not get any solution please give the solution
Thanks in advance..

  • 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-13T00:19:58+00:00Added an answer on June 13, 2026 at 12:19 am

    try as using runOnUiThread :

      Social.this.runOnUiThread(new Runnable() {
    
        @Override
        public void run() {
         // TODO Auto-generated method stub
                        View view = Socialtab.group.getLocalActivityManager()  
                   .startActivity("Items", new Intent(Social.this,MainActivity.class)
                   .putExtra("name", name)
                   .putExtra("email", email)
                   .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))  
                   .getDecorView();
                   Socialtab.group.replaceView(view); 
        }
       });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a web application, and I am using the JQuery UI Tabs
I'm working on a security camera application using the webcam that takes a photo
I have an Android application that I've been working on, and it's implemented using
I'm working on an application using OpenGL and C++ that parses some structured input
I'm working on one application ( using PHP, javascript ). Below is the short
I'm working on an application in which tabs are implemented using FragmentActivity . Since,
Currently i ma working in Android application, Using TabHost to set Five tabs, then
I have an application with tabs. In one tab I need to put data
Currently i am working in simple Android application, using Tabhost, to create three tabs
Currently i am working in Android application, Using Tabbar to set five tabs, then

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.