GPS features for Mono for Android - c#

I am wanting to know a couple of pieces of info before I dive in to do some Android programming.
I am wanting to make an app that will get the GPS locations of other users of an Android phone. Is this easy to do?
Also, is it easy to make an equivalent of a Tom Tom GPS application to guide you to places via a map?
And last question... Can I obtain my current location as a GPS coordinate and find the location of any shops, banks, service stations etc close to me via a map?

That's actually a whole set of questions on the subject of combining GPS with other services.
Most of this stuff actually goes beyond using the Android OS and extends into databases and online services.
Can I get the GPS coordinates of nearby phones?
To answer your first question: Yes, you can track GPS locations of phones. The big thing with this is that you need the phones to push their GPS coordinates to a server. The next step is then to ask the server, using your own GPS coordinates as the point of interest, what other GPS coordinates have been recorded in, let's say 200m. However, I must point out that this only works when you build an app for it and ask people to install it and run it. Also, there's a bit of a privacy issue with it as it's not really a mainstream thing to ask people for their GPS locations for no good reason let alone store that information on a server.
Can I create a personal navigation app like Tom Tom?
Yes, of course you can create a personal navigation app. There's open street maps that feature a lot of the worlds mapping data for free. Check out their website for more info: http://www.openstreetmap.org/
Can I retrieve the location of nearby shops, banks and other venues?
Yes that's possible, you can retrieve your current location in Android and combine that with a search engine that supports GPS. The first step in the process is getting the user location. There's a pretty good API guide on how to determine the user's location over on Google. Sadly, noone has yet written a blogpost (at least not that I've found) about it specifically for Mono for Android. It doesn't really matter though, as the java code is easy to convert into C#. Check the API guide here: http://developer.android.com/guide/topics/location/strategies.html
You can combine this piece of tech with services like the google maps API and query for adresses near a specific location. There's a few options here ( Given GPS coordinates, how do I find nearby landmarks or points-of-interest? ), I personally really like asking four square for venues near a location, because that one is actively maintained by a huge croud. Makes for a much more up to date experience.

Related

Getting GPS from user's phone to verify they are in the United States

I'm making an app and I want to restrict it to the United States via GPS on the users phone. (I know permission will have to added to get access to their GPS) Geolocking on Google Play doesn't really do anything because of the huge access to VPNs to bypass that.
How would I go about to getting their location via their GPS and making sure they are ACTUALLY in the United States.
This game is being coded within Unity in C# language. I don't expect a full on copy-pasta code but more of a direction to be pointed towards weather its documentations or other examples that you have seen. Just a nice little nudge in the right direction.
GPS is a Polar Coordinate System. Just find the min/max ranges you want your users to be restricted to and treat it like a bounding box (but, obviously, with polar coordinates).
That said, given that spoofing a GPS is even easier than spoofing a Geo-IP, I have to ask, why is this such a big deal for you?
Spoofing GPS is easy, starting with a long list of Fake GPS apps and all the way to actually transmitting RF GPS signals using a software-defined radio and GitHub's gps-sdr-sim. When spoofing is done right, it is not trivial to know you are being spoofed. There are several software solutions out there trying to solve this problem - a quick Google search will give you some options.

how to create a mapping app in C#

I want to create an app in C# that can display a map of a city (Belfast, Northern Ireland in this case) and overlay on top of the map the routes of the local bus service, Translink. This would work by the user entering into a search box a departure and destination location, clicking an "execute button, resulting in the route appearing on the map. I would likely use of either Google Maps or the OpenStreetMaps system to display said maps. If possible I would also like to track the actual busses themselves in real-time, either through GPS or estimation based on the timetable and average bus speed. All of this I would like to do in C#.
I would like to ask if it is possible to make this in C#. It is the programming language I am most familiar with. I would greatly appreciate it if I could be directed to any guides or examples of such systems, especially home-grown ones. The last objective may be too specific so I wouldn't mind being pointed to examples without that feature, but I would be thankful if I could. Also, if there are examples, but they are not C# based, I wouldn't mind it too. It would just be preferable if if it could be based in C# or at least within Visual Studio or Java Eclipse.
Thank you.

API for getting names of nearby shops from GPS location on a smartphone

I am looking for an API which returns a list of nearby shop/cafe/business names (with coordinates would be great but not needed) within a given radius (or simply "nearby" if available) - from a given set of coordinates (which could be the current location).
I am undecided as to which platform to use (native Android or iOS or non-native AIR for example or Javascript/ajax on a webpage) and so welcome any known apis. I would only expect the api to work on web-enabled devices.
Thanks in advance
I've used Foursquare Venue Explore API in one of my last projects. Maybe it fits in your case.

A lan pet Project

Its an idea i have had for many years and i want to finally start doing it.I am still a newbie , but i have enough experience to understand new things.The basic idea is this.There will be an animal.A spider for example, which can run across systems connected in lan.It comes and sits in one computer, and if the user nudges it it crawls away to visit a nearby or random computer, where it stays until nudged again.That's it.
Now i want to know the following things
1)Which languages are best for this one?I have some knowledge of C# and java.I can do flash animations also
2)What all should i search for to get started?
Its a nonsense project and has no use to anybody.But i will get immense pleasure if i see it work.I will be posting more questions as i progress.
This wouldn't be too difficult in C#. You could create a program (or service) that runs on the systems across the lan, and use WCF Discovery to find other copies of the program running on other systems.
When you want to make the spider move, just see which other systems are available, and send a message to that system that you want it to go there. You'd then make your spider crawl away, and on that system, crawl into place.

Using data from Google Maps in a C# Program for Windows Mobile

I'm making a charity Windows Mobile 6 app in C# to help those affected by Alzheimer's.
The aim is for this app to let the carer set a boundary by tapping in Google maps to set points. The carer would then put the windows mobile device in the patient's hand bag or coat, so that when the patient walks out on their own, thinking that they are "going home", the carer receives an SMS text with their position, heading and speed.
However, I don't know how to...
Switch from app to google maps for mobile
tap to select points
import the coordinates of that point to my C# program
use the coordinates to Calculate the boundary
Send the text with the position information
Switch back to my C# program
HTC's HD2 comes with a compass that uses this "tap to select a point then return to app" functionality, so surely it's possible for us too?
If anyone would be able to give me a hand my out I would be EXTREMELY grateful as this will help all those affected by Alzheimer's and other similar conditions. My Gran, for example, recently started trying to walk back to the property she lived in 20 years ago...
Thanks everyone! This means sooo much! I'll even come and buy you a drink to say thanks!
James
Whatever technical issues you're considering, I think you should realize that this type of usage is, AFAICS, contrary to the terms of service of google maps. See:
http://code.google.com/apis/maps/terms.html
That is, you may only use the google maps content if its accessible for everybody, not just whomever you hand out your program to:
Your Maps API Implementation must be generally accessible to users without charge.
If you're building it as a web app, it must be accessible through the internet, not intranet:
[your Maps API Implementation must not:] operate only behind a firewall or only on an internal network (except during the development and testing phase).
Some of the terms in header 10 also seem applicable:
[you must not (nor may you permit anyone else to):]
10.8 use the Static Maps API other than in an implementation in a web browser;
10.9 use the Service or Content with any products, systems, or applications for or in connection with:
(a) real time navigation or route guidance, including but not limited to turn-by-turn route guidance that is synchronized to the position of a user's sensor-enabled device;
Why would you want to kludge something together like that? Trying to have your app interface with another application for which you don't have source, whether it's Google Maps fopr Mobile or anything else, is difficult and should only be used as a last resort.
If this app is going to be free and not require users to log in, you can use the Bing Maps Web Service API directly from your application without cost. You could then use built-in GPS through the GPSID APIs as well, and you'd have control over what data goes where, what maps to draw, etc.
This seems like a much easier path to achieve what you're after.
As a side note, I gave a link above for the GPSID sample from Microsoft. I'd recommend looking at it and the native GPSID APIs but the managed wrapper Microsoft provided is, IMO, pure garbage, so you might consider wrapping the lower APIs yourself.
To restate the problem I believe you're trying to solve:
You've a use case when a carer will sent up a "virtual boundary" on a device. If that device leaves the bounded area, you'd like an alert sent via SMS sent to a predefined recipient, saying where that device is.
My suggestion would be to use something like OpenStreetMap maps (as they're free) for when you're setting up the virtual boundary. For their tiles (each 256px square), there is a relatively trivial method for converting between lat/long and pixel co-ordinates.
You might also be able to do what you want by cannibalising one of their existing Windows Mobile applications intended for surveying, such as OSMtracker, which already includes the map controls, downloads and the like, just leaving point 5 and part of point 4 on your list to tackle.

Categories

Resources