Server APIs

This Server APIs are free for use in any Location Based System. Below you will find all the speficications needed. If you have further questions you can send an email to androidlocation@googlegroups.com

Index

Login: This APIs is used to login into the system, and the returns a URL with the session id. The URL returned is used to call all the other APIs.

UpdateLocation: This API is for update the current user location given by the session id.

Get Friends: This APIs is used to return all the Friends for a specific user given by the session id.

Get Nearest Friends: This APIs is used to return the Friends specified in a certain radius of a given location

Get Classes Type: This APIs is used to return all the Type of Classes of Objects available in the system

Get Types: This APIs is used to return all the Type of Objects available in the system

Get Nearest Objects: This APIs is used to return all the Objects in a certain radius of a given location

Get Nearest Objects by Type: This APIs is used to return the Objects of the type specified in a certain radius of a given location

Get Coordinates from Cell-ID: This APIs return the Latitude and Longitude based on the Cell-ID and LAC from a GSM Cell Tower. (comming soon)

Add Objects: This APIs adds an object into the Map in the given Coordinate.


Login

Usage: This APIs is used to login into the system, and the returns a URL with the session id. The URL returned is used to call all the other APIs.

URL: http://www.androidlocation.org/AndLocWS/AndroidLocation.aspx

Parameters:

action=doLogin

uname=username

pass=password

Returns:

http://www.androidlocation.org/AndLocWS/sessionid/AndroidLocation.aspx

Example Call:

http://www.androidlocation.org/AndLocWS/AndroidLocation.aspx?action=doLogin&uname=jdoe&pass=mysecretpassword

Example Result:

http://www.androidlocation.org/AndLocWS/(S(mpjiwc554scgys45xvhcka55))/AndroidLocation.aspx


UpdateLocation

Usage: This API is for update the current user location given by the session id.

URL: http://www.androidlocation.org/AndLocWS/sessionid/AndroidLocation.aspx

(This URL is the one returned by the Login API)

Parameters:

action=updateLocation

olat=latitude of the object 

olon=longitude of the object

Returns:

True (if the location was updated successfully) or False (if there was an error)

Example Call:

http://www.androidlocation.org/AndLocWS/(S(mpjiwc554scgys45xvhcka55))/AndroidLocation.aspx?action=updateLocation&olat=-34.58927778&olon=-58.42974722

Example Result:

True


Get Friends

Usage: This APIs is used to return all the Friends for a specific user given by the session id.

URL: http://www.androidlocation.org/AndLocWS/sessionid/AndroidLocation.aspx

(This URL is the one returned by the Login API)

Parameters:

action=getFriends

Returns:

objecttype;id;name;latitude;longitude;lastupdate;surname;

for each friend separated by semi-colon (;)

Example Call:

http://www.androidlocation.org/AndLocWS/(S(mpjiwc554scgys45xvhcka55))/AndroidLocation.aspx?action=getFriends

Example Result: 

0;2;Richard;-34.58927778;-58.42974722;16/02/2008;Nixon;0;2;Jack;-34.58927778;-58.42974722;16/02/2008;Bauer


Get Nearest Friends

Usage: This APIs is used to return the Friends specified in a certain radius of a given location

URL: http://www.androidlocation.org/AndLocWS/sessionid/AndroidLocation.aspx

(This URL is the one returned by the Login API)

Parameters:

action=getNearestFriends

latitude=latitude of the given location

longitude=longitude of the given location

radius=radius in meters around the given location

Returns:

objecttype;id;name;latitude;longitude;lastupdate;surname;

for each friend separated by semi-colon (;)

Example Call:

http://www.androidlocation.org/AndLocWS/(S(mpjiwc554scgys45xvhcka55))/AndroidLocation.aspx?action=getNearestFriends&latitude=-34.58927778&longitude=-58.42974722&radius=10

Example Result:

0;2;Richard;-34.58927778;-58.42974722;16/02/2008;Nixon;0;2;Jack;-34.58927778;-58.42974722;16/02/2008;Bauer


Get Classes Type

Usage: This APIs is used to return all the Type of Classes of Objects available in the system

URL: http://www.androidlocation.org/AndLocWS/sessionid/AndroidLocation.aspx

(This URL is the one returned by the Login API)

Parameters:

action=getTypeClasses

Returns:

id;name;

for each class typeseparated by semi-colon (;)

Example Call:

http://www.androidlocation.org/AndLocWS/(S(mpjiwc554scgys45xvhcka55))/AndroidLocation.aspx?action=getTypeClasses

Example Result:

1;Common;2;Government;3;Geography;4;Dining and leisure;5;Tourism;6;Transportation;7;Shopping and services;8;Health and care;9;Sport;10;Educational


Get Types

Usage: This APIs is used to return all the Type of Objects available in the system

URL: http://www.androidlocation.org/AndLocWS/sessionid/AndroidLocation.aspx

(This URL is the one returned by the Login API)

Parameters:

action=getTypes

Returns:

id;name;classid

each object type separated by semi-colon (;)

Example Call:

http://www.androidlocation.org/AndLocWS/(S(mpjiwc554scgys45xvhcka55))/AndroidLocation.aspx?action=getTypes

Example Result:

3;Office building or complex;1;4;Factory, production, farm;1;5;Other;1;6;Administrative building;2;7;Police;2;8;Fire depot;1


Get Nearest Objects

Usage: This APIs is used to return all the Objects in a certain radius of a given location

URL: http://www.androidlocation.org/AndLocWS/sessionid/AndroidLocation.aspx

(This URL is the one returned by the Login API)

Parameters:

action=getNearestObjects

latitude=latitude of the given location

longitude=longitude of the given location

radius=radius in meters around the given location

Returns:

objecttype;id;name;latitude;longitude;lastupdate

for each object separated by semi-colon (;)

Example Call:

http://www.androidlocation.org/AndLocWS/(S(mpjiwc554scgys45xvhcka55))/AndroidLocation.aspx?action=getNearestObjects&latitude=-34.58927778&longitude=-58.42974722&radius=10

Example Result:

0;2;Disco;-34.58927778;-58.42974722;16/02/2008;7;3;Market;-34.58027778;-58.12974722;16/02/2008


Get Nearest Objects by Type

Usage: This APIs is used to return the Objects of the type specified in a certain radius of a given location

URL: http://www.androidlocation.org/AndLocWS/sessionid/AndroidLocation.aspx

(This URL is the one returned by the Login API)

Parameters:

action=getNearestObjectsByType

latitude=latitude of the given location

longitude=longitude of the given location

radius=radius in meters around the given location

objecttype=type of objects being return

Returns:

objecttype;id;name;latitude;longitude;lastupdate

for each object separated by semi-colon (;)

Example Call:

http://www.androidlocation.org/AndLocWS/(S(mpjiwc554scgys45xvhcka55))/AndroidLocation.aspx?action=getNearestObjectsByType&latitude=-34.58927778&longitude=-58.42974722&radius=10&objecttype=1

Example Result:

1;2;Disco;-34.58927778;-58.42974722;16/02/2008;1;3;Market;-34.58027778;-58.12974722;16/02/2008


Get Coordinates

Usage: This APIs return the Latitude and Longitude based on the Cell-ID and LAC from a GSM Cell Tower

URL: http://www.androidlocation.org/AndLocWS/sessionid/AndroidLocation.aspx

(This URL is the one returned by the Login API)

Parameters:

action=getCoordinates

cellid=cell id in decimal of a give cell tower

lac=lac in decimal of a given gsm provider

Returns:

latitude;longitude

Example Call:

http://www.androidlocation.org/AndLocWS/(S(mpjiwc554scgys45xvhcka55))/AndroidLocation.aspx?action=getCoordinates&cellid=32&lac=23

Example Result:

-34.58927778;-58.42974722


Add Objects

Usage: This APIs adds an object into the Map in the given Coordinate.

URL: http://www.androidlocation.org/AndLocWS/sessionid/AndroidLocation.aspx

(This URL is the one returned by the Login API)

Parameters:

action=addObject

oname=Object name

olat=latitude of the object 

olon=longitude of the object

objecttype=must be one of the object types returned by getTypes

 

Returns:

True (if the object was added successfully) or False (if there was an error)

Example Call:

http://www.androidlocation.org/AndLocWS/(S(mpjiwc554scgys45xvhcka55))/AndroidLocation.aspx?action=addObject&oname=Supermarket&olat=-34.58927778&olon=-58.42974722&objecttype=1

Example Result:

True

No comments yet. >