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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:32:48+00:00 2026-06-09T15:32:48+00:00

Need good and simple example of android app that requires login on google auth

  • 0

Need good and simple example of android app that requires login on google auth that I can use in my app.
I’m new to OAuth so I’m trying every example I get.

I have already made autentication with facebook, got users name and all basic info.
On facebook I worked on this example: http://blog.doityourselfandroid.com/2011/02/28/30-minute-guide-integrating-facebook-android-application/

But when I try from this example: http://blog.doityourselfandroid.com/2011/08/06/oauth-2-0-flow-android/
Registered app and imported project into eclipse over git just can’t run. Followed everything step by step. Always getting error on JsonFactory.

code:

private void performApiCall() {
    try {
        JsonFactory jsonFactory = new JacksonFactory();
        HttpTransport transport = new NetHttpTransport();

        CredentialStore credentialStore = new SharedPreferencesCredentialStore(prefs);
        AccessTokenResponse accessTokenResponse = credentialStore.read();

        GoogleAccessProtectedResource accessProtectedResource = new GoogleAccessProtectedResource(accessTokenResponse.accessToken,
                transport,
                jsonFactory,
                OAuth2ClientCredentials.CLIENT_ID,
                OAuth2ClientCredentials.CLIENT_SECRET,
                accessTokenResponse.refreshToken);

        final Latitude latitude = new Latitude(transport, accessProtectedResource, jsonFactory);
        latitude.apiKey=OAuth2ClientCredentials.API_KEY;

        LatitudeCurrentlocationResourceJson currentLocation = latitude.currentLocation.get().execute();
        String locationAsString = convertLocationToString(currentLocation);
        textView.setText(locationAsString);
    } catch (Exception ex) {
        ex.printStackTrace();
        textView.setText("Error occured : " + ex.getMessage());
    }
}

error code:

08-11 21:45:33.606: W/dalvikvm(464): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
08-11 21:45:33.606: E/AndroidRuntime(464): Uncaught handler: thread main exiting due to uncaught exception
08-11 21:45:33.606: E/AndroidRuntime(464): java.lang.NoClassDefFoundError: com.google.api.client.json.jackson.JacksonFactory
08-11 21:45:33.606: E/AndroidRuntime(464):  at com.ecs.android.sample.oauth2.LatitudeApiSample.performApiCall(LatitudeApiSample.java:79)
08-11 21:45:33.606: E/AndroidRuntime(464):  at com.ecs.android.sample.oauth2.LatitudeApiSample.onCreate(LatitudeApiSample.java:61)
08-11 21:45:33.606: E/AndroidRuntime(464):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-11 21:45:33.606: E/AndroidRuntime(464):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
08-11 21:45:33.606: E/AndroidRuntime(464):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
08-11 21:45:33.606: E/AndroidRuntime(464):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
08-11 21:45:33.606: E/AndroidRuntime(464):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
08-11 21:45:33.606: E/AndroidRuntime(464):  at android.os.Handler.dispatchMessage(Handler.java:99)
08-11 21:45:33.606: E/AndroidRuntime(464):  at android.os.Looper.loop(Looper.java:123)
08-11 21:45:33.606: E/AndroidRuntime(464):  at android.app.ActivityThread.main(ActivityThread.java:4363)
08-11 21:45:33.606: E/AndroidRuntime(464):  at java.lang.reflect.Method.invokeNative(Native Method)
08-11 21:45:33.606: E/AndroidRuntime(464):  at java.lang.reflect.Method.invoke(Method.java:521)
08-11 21:45:33.606: E/AndroidRuntime(464):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
08-11 21:45:33.606: E/AndroidRuntime(464):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
08-11 21:45:33.606: E/AndroidRuntime(464):  at dalvik.system.NativeStart.main(Native Method)
08-11 21:45:33.616: I/dalvikvm(464): threadid=7: reacting to signal 3
08-11 21:45:33.616: E/dalvikvm(464): Unable to open stack trace file '/data/anr/traces.txt': Permission denied

If someone know what is problem or can post some links of projects with source code and good explanation.

My app only need to login over google auth and get name of user.

  • 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-09T15:32:49+00:00Added an answer on June 9, 2026 at 3:32 pm

    You are missing a jar file in your project, it appears:

    java.lang.NoClassDefFoundError: com.google.api.client.json.jackson.JacksonFactory
    

    So, you may want to find it from here:

    http://code.google.com/p/google-api-java-client/
    

    If you have the library then you may just need to check the jar file to have it exported, and you can find a screenshot of how to do that in this answer:

    https://stackoverflow.com/a/9937414/67566

    If you go to Configure Build Path then under the Order and Export
    tab, verify that the checkbox by your jar files are selected, and that may solve your problem.

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

Sidebar

Related Questions

Good evening, i need to know how can i have one .h file that
Good afternoon. I have been making a small openGL based app for android that
I am writing a simple Android app and have a database that will send
I am in desperate need of good tutorials on Content Providers in Android. I
I need recommendations on a good Unit Testing book for use with ASP.NET MVC.
Good evening. I'm developing an android application that uses Facebook SDK. I've no problem
I am trying to do a simple weather widget for Android, that provides temperatures
Ok so Ive spent the last two days looking for a good simple example
I need a very simple and clear example of how to create an OCX
Good day to all, Can some one guide me in displaying a simple post

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.