IP Positioning
IP location function is to determine the address location of the IP based on the incoming IP. The sample code is as follows:
// Set the request parameters, pass in the IP address to be queried IPLocate.Query query=IPLocate.Query.newQuery("xx.xx.xx.xx"); // Set request Query and interface listener IPLocate.locate(query, new IPLocate.Listener() { @Override public void onSuccess(IPLocateResult result) { //success } @Override public void onFail(APIStatus status) { //failure } });
Note: The result return interface is an asynchronous thread interface.