I want to make a application that find received signal strength and neighboring cell tower. I am successfully get cellid,mnc,mcc,lac and signal strength of each neighboring cell tower. But I want to calculate distance of each cell tower and direction from current mobile by using cellid,lac,mnc,mcc. I don't want to use internet connection to do that. Is it possible to calculate?? Please suggest how if possible.
Without an internet connection, this would be difficult (impossible?). However, if you are able to use an internet connection, you could lookup the neighbor cell id (which you mentioned you had already obtained) with the Mozilla Location Service and get a latitude/longitude.
There are many answers on SO with regards to getting the current location of a mobile. Here is a good example: Get current latitude and longitude android
Now once you have the mobile lat/long and neighbor cell lat/long, use the Law of Cosines to find the distance between the neighbor cell and mobile:
d = acos( sin φ1 ⋅ sin φ2 + cos φ1 ⋅ cos φ2 ⋅ cos Δλ ) ⋅ R
which can be implemented like this, for example:
var φ1 = lat1.toRadians(), φ2 = lat2.toRadians(), Δλ = (lon2-lon1).toRadians(), R = 6371e3; // gives d in metres
var d = Math.acos( Math.sin(φ1)*Math.sin(φ2) + Math.cos(φ1)*Math.cos(φ2) * Math.cos(Δλ) ) * R;
With regards to the heading, use this formula:
θ = atan2( sin Δλ ⋅ cos φ2 , cos φ1 ⋅ sin φ2 − sin φ1 ⋅ cos φ2 ⋅ cos Δλ )
where φ1,λ1 is the start point, φ2,λ2 the end point (Δλ is the difference in longitude)
which can be implemented like this, for example:
var y = Math.sin(λ2-λ1) * Math.cos(φ2);
var x = Math.cos(φ1)*Math.sin(φ2) -
Math.sin(φ1)*Math.cos(φ2)*Math.cos(λ2-λ1);
var brng = Math.atan2(y, x).toDegrees();
(Distance/heading formulae courtesy of this website)
Finding the signal strength from a neighbor cell is another matter. Depending on the technology (LTE/WCDMA/GSM) this may or may not be possible. Here is one example of how to do this, but it may not work this way for all tech types.