Android Force Location of Apps - android

I work in QA for an company that helps market applications. Currently I have been tasked to ensure location dependent apps function if correctly (ie if im in russia the app displays the russian content and if i change to us the app updates to the us content)
I have tried numerous items to accomplish this but get no where.
What i have tried:
Proxy. Setting this up via wifi to several locations. Both the app and the device still show my current location.
Apps: I have tried all of the following apps and they all give the same result as above.
Fake Location
AutoProxy
Fake GPS
I have enabled developer mode on the devices, and have ensured that "Mock Locations" is checked.
Use case 1:
A developer whats us to test his app which is only available in england. Google Play still sees me in US
Use case 2:
A developer releases a game where the background changes based on your location if i cant force the location change I cant verify this feature works.
Im guessing the fails so far are due to the fact that the location being called in our test apps is network location not GPS?
Any help would be awesome. Even if you could just point me in a direction.
Thank you Greatly
J
Update:
Ok, Thanks to the answers about google play and mock locations. So with those in mind lets think about it from another perspective. If the app is not calling for mock location, Is there anyway to force a mock location override? im trying to cover all the bases here, One app for sure does not use this method, so I still need to find a way around.
depending on how they are calling for the location, I would think (remember im knew here) that using a proxy would work, however as stated above, i'm not getting anywhere there either. Did try a few free proxy's from hidemyass but even the browser wouldn't work with them.

Yes, network location does not get faked by mock location providers. I don't know why not, but it only fakes GPS. In addition, your app has to request the MOCK permission to get it. If it doesn't have this permission, setting a mock location will not actually fake anything to the app. This is for security purposes, so a malicious app can't start broadcasting the wrong location to the phone.

Related

What are the requirements to comply with the background location rules from the Play Store?

I have a similar issue to this post How to make my Android app comply with the "Background Location Policy" but that post doesn't have an answer.
I have a web browser app, which on occasion will ask for location permissions if the user visits a website that requests that. App targets API 29. The app manifest has <uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION" /> which is API 23 and higher because I didn't want to force location permission on older phones.
Today I got an email saying I have until March to fix this, but I don't understand what I have to do, I'm not requesting background location anywhere.
Anyone have any idea what I have to do?
Edit: I have read the help center, and I'm wondering if that my issue is the ACCESS_FINE_LOCATION, maybe something is accessing it on the background. I don't know how I would prevent ad networks from that if they do it. I already pause the WebViews the app is not on the foreground so websites should not be using it.
Edit2: Is there maybe a way I can log background location access so that I can monitor my app a few days to see if it happens?
I would like to answer my own question in case someone else is searching for this. I can't say that I know for certain this is correct but it has worked for me so far.
First, on this answer https://stackoverflow.com/a/65894488/704836 I was told to use AppOpsManager to log background location requests. After doing that I found a few places where that takes places. I will discuss those below:
Ad networks. I have ad network initialization on my Application.onCreate() and a lot of those accessed location. So when triggering a BroadcastReceiver, they would check location.
WifiManager.getConnectionInfo() - this will trigger a location request. Same deal as above, I had one of those on Application.onCreate().
After removing those calls the Play store stopped complaining.

Requesting Permissions from Xamarin Android Service

Using Xamarin Android, I need to be able to access location updates from within a service.
I have tried the native Android.LocationManager, Plugin.Geolocator, and Xamarin.Essentials.Geolocation, but none of them seem to provide location updates.
If I do it inside an activity, it works fine, but I have a requirement to post location updates from a service which launches at boot time.
Yeah, I know it's a "privacy violation" or whatever, but the app is only used on company devices for a specific internal use.
I saw somewhere that requesting permissions from a service "is tricky," so I know it's possible, but the guy didn't elaborate on how to do it.

Unable to understand android location feature

In my app I need to determine user location. So I am using location manager. In my code, I first check for availability of network provider and GPS provider. I prefer networkprovider first, else I use GPS provider to get the location.
In an android device, there are three options available for location setting:
high accuracy(gps+wifi+mobile network)
battery saving(wifi+mobile network)
device only(GPS)
When within my house(WIFI on), I observe that first two options work but third one doesn't. So I ventured out of house(WIFI gone,no internet), and made observations again at a fixed point. There again, first two options worked but not the third.
Why is it so?GPS is supposed to work in open space.So I should get location for GPS too.
Then I got into a vehicle, and tested again. But now none of the options work.Even first two options stopped giving result.
Why this behaviour? I expect all three options to work outdoor. But GPS never works, and first two work only when I am stationery. Does movement plays a role here?
I am not able to comprehend the overall behaviour.

How to track currier/package by using android GPS?

I am currently working on a GPS tracking App for track packages and parcels right from android smart-phone.
After user finishing put their tracking nO., I would like to be able to analyses this data and find their item information.It also can be track location on GPS to view current location in map-view.
-What would be a good way to smooth the track?
I know that I'll need to implement the tracking in a service, and probably show a notification to user for to easier to know thier item have arrived.
-I have read : Create an Android GPS tracking application
and
https://code.google.com/p/open-gpstracker/
-and also, what is the best way to do connect GPS tracking information with the user data that already have in the website?
like my refr.ex :https://play.google.com/store/apps/details?id=br.com.tribotech.trackpack&hl=en
Firstly, you need to know the API of the package carrier you intend to track packages for. Package carriers always provide an API for programmers to get information about parcels.
Examples
UPS: https://www.ups.com/upsdeveloperkit
NZ Post: http://www.nzpost.co.nz/products-services/iphone-apps-apis/tracking-api
etc..
Then write your app to use these API's. Some carriers may provide a GPS based tracking system, which is what you want for your tracking thing.

GPS work on emulator, but not on device

I made a application that works fine on the emulator (using telnet and geo fix), but on the device the callbacks of the LocationListener are not called at all.
I already checked permission ( on manifest.xml), checked if GPS is active (it is, and works fine in google maps, and the satellite drawing shows up when my app turns on).
Someone has any clue on what may be happening?
Did you:
(1) make a release key on your machine?
(2) get a RELEASE API key from Google based on the MD5 fingerprint generated by your release key?
(3) build that Google key into your code or xml?
(4) sign your application with the release key?
Unless you remember getting a second (release) key from the Google site, that's the problem.
On second thoughts the GPS should still work, it's just that you wouldn't get the map
If your program isn't calling your onLocationChange method then you probably are inside or somewhere where you can't get a GPS signal. Try moving outside somewhere with a clear view of the sky.
Which methods have you defined in your location listener? Because the onProviderDisabled and onProiderEnabled functions should work even without a GPS signal.
The issue was indeed related to accuracy, the GPS do not work when it is not accurate.
But manually loading Wi-Fi was failing.
The correct solution is use the Criteria class, and then find the "best provider" automatically based on the Criteria. It will accept bad accuracy values, also last values when more accurate, and whatnot, mimicking the behavior of the GPS on Google Maps APP.

Categories

Resources