package com.telepin.cellTower;

import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.CordovaInterface;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;

import android.content.Context;
import android.telephony.TelephonyManager;
import android.telephony.gsm.GsmCellLocation;
import android.util.Log;

import android.provider.Settings;

public class LocationInfo extends CordovaPlugin {

	/**
	 * Constructor.
	 */
	public LocationInfo() {
	}

	@Override
	public boolean execute(String action, JSONArray data,
			CallbackContext callbackContext) throws JSONException {

		if (action.equals("getCID")) {
			
			this.getCID(callbackContext);
			return true;
		}
		return false;

	}

	public void getCID(CallbackContext callbackContext) throws IOException {
		TelephonyManager tm = (TelephonyManager) this.cordova.getActivity()
				.getApplicationContext()
				.getSystemService(Context.TELEPHONY_SERVICE);
		GsmCellLocation location = (GsmCellLocation) tm.getCellLocation();
		Integer cellID = null;
		cellID = location.getCid();
		
		if (cellID != null) {
			callbackContext.success(cellID + "");
		} else {
			callbackContext.error("Cell ID is null");
		}
	}

}

@@ -1134,15 +1134,11 @@
 ;%0A%09%09
-I
+i
 nt
-eger
  cel
@@ -1146,25 +1146,8 @@
 ID =
- null;%0A%09%09cellID =
  loc
@@ -1168,21 +1168,46 @@
 ;%0A%09%09
-%0A%09%09if (cellID
+String cid = cellID + %22%22;%0A%09%09%0A%09%09if (cid
  != 
@@ -1242,26 +1242,18 @@
 uccess(c
-ellID + %22%22
+id
 );%0A%09%09%7D e

Update LocationInfo.java