Android Fake GPS location apps do not work anymore

88,319

Solution 1

Make sure you have Allow Mock Location turned on in phone's Developer Options and try this app: https://play.google.com/store/apps/details?id=fr.dvilleneuve.lockito&hl=en

I'm using it when working on Geofencing and works great.

Solution 2

If mocked location seems to jump to real one during simulation, try to turn off wifi based locations (Settings / Location / Mode --> Device only).

Solution 3

I managed to fix this problem by disabling the "Fused Location" service on my phone. I used the Disable Service application which requires root privileges to run. After disabling the "Fused Location" service I stopped teleporting to my real location.

Solution 4

In Settings -> General -> Location -> Mode

I switched it from Battery Saving to High accuracy and then the mock location app started working.

Note, you also need to set your preferred Mock Location app in Developer Options, but even after doing that my app was showing my true location instead of the mocked location - now it's working like a champ!

Share:
88,319
rosu alin
Author by

rosu alin

I work at a programming firm from The Netherlands, Amsterdam named 100Grams Software B.V.. I am an Android Developer, making all kind of smartphone applications for clients and also working on a startup called Passenger. I also work a bit in C++/CX but I am new to it, so I might need help.

Updated on November 07, 2020

Comments

  • rosu alin
    rosu alin over 3 years

    I used to work with this application: https://play.google.com/store/apps/details?id=com.fakegps.mock&hl=en And before this with this one: https://play.google.com/store/apps/details?id=com.incorporateapps.fakegps.fre&hl=en Am working on a LG G3 and a Nexus 5, but in the last couple of days, the fake location doesn't work as it should. It doesn't always modify my location and sets in where I want. Or many times, it sets my location where I want for a couple of seconds and then resets to my real location. I'm working on a travel app, and this made it very simple to simulate trips and locations. Is there any other fake location app that actually works how it should? Or is there any other way to set the location of my phone, while the app is running?

    EDIT: YES! MOCK LOCATIONS is ON. Like i said: It DOES change my location, to the mock location I want, but it jumps back to my REAL location, after a couple of seconds. Depending, sometimes, it stays for minutes on the mock location, but then jumps for 1 second on my real location, and then goes back :) Now I know this, cause I log all the locations that I find, even more, draws the path, and I have lines that jump back to my Real location and then continue PICTURE: Pink = how it should be. Green = locations that I get and the path. As you can see, each a couple of locations that I get, it jumps back to my location https://www.dropbox.com/s/sszzrvhnwlq2bxr/Screenshot%202015-09-10%2015.47.20.png?dl=0

  • rosu alin
    rosu alin over 8 years
    Thanks, I will try it! And yes, I have mock locations allowed. Like I said, it does change my location, but it jumps back to my locations, It doesn't keep the mock location
  • SM3RKY
    SM3RKY over 8 years
    I still get the same issue, Lockito works within its own app but when the App I am building tries for location it get the real locaton, not the spoofed location. Any other ideas?
  • arsena
    arsena over 8 years
    @SM3RKY on what device are you testing? mock locations don't work on some devices no matter what app you use. and just to be sure check if you have mock locations on in developer options.
  • SM3RKY
    SM3RKY over 8 years
    Hey misho, Im using an LG G4, and a Samsung Galaxy S3. Neither seem to be able to mock locations for a consistent period and keep jumping between the current location and the fake location. While this is happening, when an App tries to get the location it fails and does not return either of the locations.
  • arsena
    arsena over 8 years
    @SM3RKY My Note 4 used to do exactly the same thing but I don't remember how I fixed it, I think I didn't do anything particular. Try testing on Android emulator. It definitely works on genymotion
  • Jago
    Jago almost 8 years
    In Android 6 there is no Allow Mock Locations option anymore; there is an option to choose the app which will fake the position instead.