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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:14:30+00:00 2026-05-20T23:14:30+00:00

Been having trouble with my application that finds a users location and displays it

  • 0

Been having trouble with my application that finds a users location and displays it to the screen. The application just crashes both on the emulator and on my phone whilst debugging.

logcat gives me this:

03-26 15:41:37.958: ERROR/AndroidRuntime(871): Uncaught handler: thread main exiting due to uncaught exception
03-26 15:41:37.988: ERROR/AndroidRuntime(871): java.lang.NullPointerException
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at com.finalyear.fitnessapp.fitnessMapActivity$GeoUpdateHandler.onLocationChanged(fitnessMapActivity.java:62)
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:179)
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:112)
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:128)
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at android.os.Looper.loop(Looper.java:123)
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at android.app.ActivityThread.main(ActivityThread.java:4603)
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at java.lang.reflect.Method.invokeNative(Native Method)
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at java.lang.reflect.Method.invoke(Method.java:521)
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
03-26 15:41:37.988: ERROR/AndroidRuntime(871):     at dalvik.system.NativeStart.main(Native Method)
03-26 15:41:40.018: ERROR/ActivityManager(87): fail to set top app changed!
03-26 15:41:51.238: ERROR/MapActivity(933): Couldn't get connection factory client

My code is:

public class GeoUpdateHandler implements LocationListener {

    @Override
    public void onLocationChanged(Location location) {
        int lat = (int) (location.getLatitude() * 1E6);
        int lng = (int) (location.getLongitude() * 1E6);
        GeoPoint point = new GeoPoint(lat, lng);
        mapController.animateTo(point);
        mapController.setCenter(point);

    } 

Any help would be great been stuck on this for a few weeks now.

  • 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-20T23:14:31+00:00Added an answer on May 20, 2026 at 11:14 pm

    My first thought is that your location is being passed in as null, which you could check for.

    Why that’s happening? Did you set the location request in your manifest?

    Check this thread:
    Location Null Pointer

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

Sidebar

Related Questions

I've been having trouble getting my ASP.NET application to automatically log users into the
We have been having serious trouble getting an application we devlop running with UAC
I've been having some trouble with Xcode. Every time I launch my application, it
I've been having quite a bit of trouble getting an MVC2 web application to
I have a Windows Forms application that I'm working on, but I'm having trouble
I'm having trouble getting jQuery to load inside a file that has been imported
I having trouble in dividing the HTML frames. I have been using the following
i ave been having trouble with a simple select sql query. using php PDO.
I'm working on an ASP.NET MVC2 web application, and I'm having trouble getting the
I have been having a bit of trouble with this issue with a while

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.