Ok, so ive setup mock location in dev tools then set a fake location in special app, in gmaps it seems working, but in my courier app it just shows that location isn't enabled, however it is. I am just interested why it doesn't work as intended. Thank you.
Without faking it seems working fine.
And i dont have source code for this app, sure.
Related
I know React-Native has support for Geolocation, but what I need is for people to see my geolocation. Like they download the app and see where my phone is. Not theirs - mine. Pretty much an app that shows where I am and where people can find me. Is that possible?
Edit: I need this to be realtime. So a person can download my app and watch my every step.
It depends on your usecase.
case 1)
You want to keep track of your own location within the same App. Then react-native shouldn't be your choice. You would need to update your location even in background mode, but this is currently not possible.
case 2)
You track your own location with a native app/or something else and you use react-native just to allow people to "follow you". Then react-native would be sufficient. You just need to send your current location from a server to your mobile app. Inside your react-native app you then need to display your current position. Therefore you could use react-native-maps
I have a GPS navigation application for Android 2.3.3 which I have been working on. I am currently trying to simulate locations via a GPX file through DDMS. While this works perfectly find on the android emulator, I am unable to get it working on an actual device.
I am able to see the device on the under the "Devices" tab, but I am unable to send any mock location data, or GPX data as the options are under "Emulation Control" tab are grayed out.
I have noticed that previous questions on StackOverflow mention that it is not possible, however the Google docs titled "Using DDMS" - http://developer.android.com/tools/debugging/ddms.html state the following (at the bottom of the page)
Setting the location of the phone
If your application depends on the location of the phone, you can have
DDMS send your device or AVD a mock location. This is useful if you
want to test different aspects of your application's location specific
features without physically moving. The following geolocation data
types are available to you:
I am just wondering how to send fake location data to a device via DDMS.
Thank you for your help in advance, and I really appreciate it.
Bilzac, your understanding is correct. Simply put, Android's documentation is misleading. Many developers have been confused by this. You cannot load a gpx file and send to device like you do on the emulator contrary to what the documentation suggests.
Possible if you activate mock locations on your device.
Than add ACCESS_MOCK_LOCATION permission to your manifest.
You can write now your own MockLocationManager which generates mocj locations.
Easiest way is to you use an app which generates mock lactions for you. GPS Route Simulator works quite fine. Possible to store kml files on the sdCard or defines own routes
I'm thinking about developing an app for android or ios, but the whole purpose of the app is a game based on locations, like foursquare. the problem is that the game would be very unfair if people could spoof their locations with fake ones, and I was wondering if there is any way to make sure that the locations they give me are where they actually are.
Is this possible in any way, or will I just have to trust the user that they are using their real gps location, and not a hacked software to change it?
Thanks in advance
There is no general code/API solution for iOS and Android.
One thing that makes this difficult is that, even if the device API guaranteed accurate location, Android devices can be "rooted" and iOS devices can be "jailbroken" allowing the end user to modify the API implementation.
I would like to start looking at development for Android applications (nothing huge, just for learning). Before I begin, I would like to find out whether or not development on the Android phone I use daily would be corrupted or changed in some way if I used it as a development device.
I probably won't put anything on the Market, but I would just like to test out how everything "works" with Android development.
Any help that will guide me is great.
Thanks.
It shouldn't cause any problems at all. The only problem I can imagine is that you have to enable installation of applications from unknown sources (i.e. not the marketplace). You just need to be sensible not to go installing applications from dodgy places.
No, not at all! Sorry for the shortness of the answer, but that's it.
The only problem I can think of is writing to internal memory more than usual, but if you install a lot of new apps, the effect will be the same, so it's nothing special. And as alextsc said, if you write something and it doesn't work, just remove it, and that's all.
Not at all. But even better, when you set everything up (Eclipse, the Android SDK and the ADT Eclipse plugin) you'll also get an Android emulator that you can test your development projects on virtually.
Still, it's just fine (and recommended) to do testing on an actual device, but if you're just playing around, you can likely just use the emulator and only deploy to your device if the end result is something you'd like to show off to your friends!
Best of luck!
Hey in addition to the above answers,
You should actually test on your device when you are making an app that uses one of the following :
GPS, or wi-fi to get user location
when you want to use any phone sensor in your app
when you are trying to integrate camera/ camcorder in your app
also you might need to actually test phone call/sms functionality integrated in an app
otherwise the emulator just works fine
I am facing a problem while working on Android Emulator. I am interested in setting the mock location through the LocationManager class and reading the geolocation in the Webview. I cannot read the location in the Webview where the location is read through the HTML5 geolocation API. I have tried on different versions of Android emulator (for API level 8, 12). I looked into previous questions at stackoverflow, but no luck. Let me know if I am missing anything.
I noticed the following issues in my implementation:
(In the logcat) WebChromeCliet was notified that the geolocation service failed to start.
I tried to set mock location through geo fix telnet command. I did not notice any corresponding information in the logcat messages.
Similar problem I noticed in the Android Browser. The browser also did not detect the location after geo fix command.
FYI, in my code,
1. The project settings include ACCESS_MOCK_LOCATION, ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION
The emulator has the settings for "mock locations" and "GPS support". I also enable
geolocation and gps provider.
I will appreciate any help or suggestions.
In order to use html5 geolocation you have to use uses-permission android.permission.ACCESS_FINE_LOCATION. The html5 geolocation does not work when just coarse location is requested.
Alternatively, it might or might be possible to use uses-feature android.hardware.location.gps for an optional use, even though I haven't managed to have the html5 geolocation working with uses-feature (is it a limitation of the Android SDK?).