For getting Geographical Position of a user we have so many API's can any one tell me what is the concept behind this? How these api's can detect the geographical co ordinates of a user.
Please Explain
Thanks and Regards,
Sunny.
This depends entirely upon the API.
Some APIs are dependent on a piece of hardware (such as a smartphone) that utilizes an inbuilt GPS.
Other APIs attempt to use WiFi and/or IP data to attempt a crude calculation for your location. Google's MyLocation feature is an example of this, it uses information gathered by your browser to estimate your location. Here's a link to an article discussing Google's use of WiFi/IP to calculate users positions:
Google MyLocation
Others such as Google, Bing, or ESRI map based APIs allow you to query their maps to receive coordinate information about a specific address that the user inputs. If you already know users are going to access your application from a relatively small geographic area, you can submit the query on their behalf and use it to create a map based on this area (ie: a city, college campus, etc...), or to obtain a set of geographic coordinates when all you have are the addresses (ie: a list of restaurants, apartments, etc...).
Any particular API that you are talking about?
As far as I know, there are 2 ways in general
GPS-enabled devices: So the device itself that know its own geolocation through it's GPS system
Through who you are connected to: a) If you are mobile device, they can pinpoint your location through figuring out the towers you are connected to, or b) If you are on an internet / wi-fi connection, it can be figured out from there.
http://www.ehow.com/how-does_4965061_gps-work-mobile-phones.html
or
How does GPS in a mobile phone work exactly?
Related
I'm stuck with one scenario,
We have geofence coordinates created by client/user, and also have user's current location. So want to check that, whether user is belong to that geofence area(coordinates) or not?
We need to check it from backend/server side - Java is there.
Below are the GeoFence coordinates that may stored in our DB:
"42.43588461182335, -71.6158054921875",
"42.448988452992175, -71.61402648035278",
"42.44936844757593, -71.5879339510559",
"42.43299861648753, -71.59088339349671"
User's current location/coordinates which will sent by device to the backend:
42.440593799089996,-71.60585993854373
There are APIs available like (google map client for java) but they are related to Android and other mobile platform specific, not purely Java/backend specific. I want to compare these from server end.
So want some clue or any API that could be helpful to achieve the scenario.
any help would be appreciated, Thank you in Advance..! Have a Good Day.!
If the "backend DB" is MySQL, use PolygonFromText('POLYGON((...))') to define the fence if it is a polygon. There are other functions for other shapes.
Then use any of a few functions to see if a POINT is in the "Geometry".
https://dev.mysql.com/doc/refman/5.6/en/spatial-types.html
You will probably need a SPATIAL index to provide performance.
so let's say that i want to ban the country X from using my app, i banned it from the google play store but it can still be downloaded via VPN is there a way to ban this country using code (maybe trying to detect the user's location or something?)
my government has a very big problem with a neighboring country and i'll go to jail for like forever if i had users in it.
my government has a very big problem with a neighboring country and i'll go to jail for like forever if i had users in it.
There is no technological way that you can guarantee that your mobile application can't / won't be used by someone in another country. Anything that you do in your application can be defeated by a user with sufficient ingenuity / time.
You need to talk to a good local lawyer to find out precisely what your country's law means, and what you need to do to comply with it1. But if the law requires you to do things that are technically impossible, your safest bet may be to not write / publish any mobile apps. Seriously.
1 - It is unlikely that anyone here really knows. I certainly don't!
Locale.getDefault()
Gives you the locale information about the phone, this information come from settings and can be changed by user
but if you want ensure the user from specific country doesn't use you app just get the GPS position and in case of be that country close it
You can perform multiple checks like does a user's IP match banned country IPs, you can check mobile carrier, you can eventually make location check which of course will require user's permission.
While streaming twitter data, I found that there has been an obvious reduction in geo-referenced tweets (tweets with lat and lon). Is it because of the Foursquare information integration? Or are there any other issues?
Many thanks!
I worked on a Social Analytics by Location application last year. We sampled tweets from twitter with the intension of using the geolocation attributes to determine the sentiment by area. Unfortunately we found that only between 10-15% of tweets (based on our own findings) were actually geo-tagged which was not enough to provide an accurate depiction of sentiment. Instead we opted for using location indicative hashtags.
In saying that it depends on the sample size. We were trying to determine sentiment in areas such as buildings which had a small amount of active twitter users. If your aim is to find tweets within much larger areas such as Towns/Cities/Countries then 10-15% is probably enough for your needs.
To answer your original question: users are generally private unless they explicitly intend to checkin somewhere and so my guess is that the 10-15% of tweets that are geo-located are a result of users forgetting to disable geo-location or using a new/infrequently used device where it is not disabled. It can also be attributed to foursquare information integration as I'm sure users just overlook the fact that foursquare provides twitter with the geolocation information.
This article is an interesting read. It outlines an application developed by the University of SoCal that can help users identify if they are giving away sensitive/private location information with their tweets.
To the developers under J2ME.
Is it possible to get a list of all available WiFi points in the moment in Java? Class IAPInfo gives me just a list of available network connections, where there are different internet and other connections, such as internet.mts.ru etc. and besides there is the connection 'Search for WLAN' (like so) and there are no access points themselves there. Already seen examples of a list of WiFi points in C + + for Symbian, but I'm writing in Java. I need a list of access points to define an exact position of mobile phone. I know about cellular communications and GPS, but I also need WiFi.
You can't get a list directly from J2ME.
A better idea is to use JSR 179's LocationProvider which will use any means at its disposal to provide you with a location reading (this may or may not include WIFI locating).
I have to develop an algorithm for location based data grabbing and displaying it on a mobile device. I'm just a web programmer with some knowledge of php and mysql. I need to develop this algorithm. Please give some instructions on where to start the development.
You could have PointOfInterest table that relates to address.
Let say I want to find an ATM in Chicago. Then you perform a seach for all ATMs in chicago.
After you get your result set you perform distance calculation over each of them and check which is the closest one.
Here you may find a way how to calculate distance based on longitude/latitude coordinates
http://www.movable-type.co.uk/scripts/latlong.html