how to retrieve user locations using MAC address or IMEI no of devices in rhodes?

2,735 views
Skip to first unread message

sharu

unread,
Mar 14, 2012, 9:42:17 AM3/14/12
to rhomobile
Hi ,

In my app i am am trying to track the user Geo location using User MAC
address , i went through the http://docs.rhomobile.com/mapping-tutorial
document but there they have not explained how to retrieve user
location using MAC Address ,can anyone explain me how i am new to
rhodes

Thank you

Jon Tara

unread,
Mar 14, 2012, 12:19:35 PM3/14/12
to rhom...@googlegroups.com
You can't get user location based on MAC address. The MAC address of your device is not useful for determining location.

On devices where the platform supports it, you can determine location based on the devices IP address (NOT MAC address) and/or the MAC addresses of WiFi nodes around the device. On those devices, this is built-in to the platform's geolocation system. If GPS is not available, the device might use cell-tower triangulation, MAC addresses of surrounding WiFi nodes, or device IP address.

The MAC address of surrounding WiFi nodes is useful because their are databases of WiFi MAC address based on where they have been previously located by roving vans. The IP address of the device is useful because it is usually associated with a particular Internet gateway. IP address is the least accurate, because it might only be able to locate to a city or region.

You can't select which technology is used, at least on iOS. If you can on other platforms, Rhodes doesn't support selecting which technology is used, in any case.

sharu

unread,
Mar 26, 2012, 1:51:37 AM3/26/12
to rhomobile
Hi Jon Tara ,


U told we can determine location based on the devices IP address or
the MAC addresses of
WiFi nodes around the device . can we get IP address or the MAC
addresses of
WiFi  using  system.get_property or is there any method to find it

Jon Tara

unread,
Mar 27, 2012, 12:27:40 PM3/27/12
to rhom...@googlegroups.com
1. MAC address is not useful for determining location.

2. IP address can be useful for determining location, because it can sometimes be associated with a known location, in a very broad sense (country, region, city). The OS already does this for you when you ask it to determine location. If GPS, cell tower, and WiFi data is not available, it will fall back to IP address.

3. If you want to determine IP address or MAC address for some other purpose, or want do your own IP-to-location lookup against some database, you can determine IP address and MAC address using the socket support in Ruby:

http://www.ruby-doc.org/stdlib-1.9.3/libdoc/socket/rdoc/index.html
Reply all
Reply to author
Forward
0 new messages