Hello
I need to find CID, LAC, MMC, MNC by using Navizon API on Nokia Mobile phones.. I checked codes of the Navizon API but I could not find anything(any function or method) to calculate CID, LAC ,MMC and MNC. "double latitude = myCoords.getLatitude();" function gives me null on Nokia N97/N96/N95. You can find out the code which helps me to calculate latitude and longitude. Do you know how +to calculate latitude,longitude ,CID, LAC, MMC and MNC by using Navizon API on Nokia mobile phones. I need help urgently. Thank you in advance.
Regards
Altayli
The code which helps me to calculate latitude and longitude:
Code:import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import com.mexens.client.*; import java.util.Vector; import java.util.Calendar; /** * Main class of the midlet. */ public class Midlet extends MIDlet implements MexensAPIListener, CommandListener { private Form mainForm; private Command exitCommand; private Command getLocationCommand; MexensAPI mexensAPI; private StringItem positionLabel; private StringItem statusLabel; public Midlet() { super(); mexensAPI = new MexensAPI(); mexensAPI.AddMexensAPIListener(this); mexensAPI.SetLicenseKey("0011-2258-1154-0E9B-228A-11A4"); // your license key here } /** * Start the application. * * @throws MIDletStateChangeException * @see javax.microedition.midlet.MIDlet#startApp() */ protected void startApp() throws MIDletStateChangeException { mainForm = get_mainForm(); Display.getDisplay(this).setCurrent(mainForm); } /** * Called when the application is paused. * * @see javax.microedition.midlet.MIDlet#pauseApp() */ protected void pauseApp() { notifyPaused(); } /** * Destroy the app. * * @param unconditional conditional or not * @see javax.microedition.midlet.MIDlet#destroyApp(boolean) */ protected void destroyApp(boolean unconditional) throws MIDletStateChangeException { } public void terminate() { notifyDestroyed(); } public void commandAction(Command command, Displayable displayable) { // Insert global pre-action code here if (displayable == mainForm) { if (command == exitCommand) { terminate(); } } } public void ResponseReceived(APIResponse response) { if (response.GetStatusMessage() != null) statusLabel.setText(response.GetStatusMessage()); Location location = response.getLocation(); if (location != null && location.isValid()) { String placeID=location.getID(); double latitude = location.getLatitude(); double longitude = location.getLongitude(); positionLabel.setText("Position: " + latitude + ";" + longitude + "ID is:" + placeID ); } /*else { statusLabel.setText("Status: Invalid location received"); }*/ } private Form get_mainForm() { if (mainForm == null) { statusLabel = new StringItem("", "Status: Initializing"); statusLabel.setLayout(ImageItem.LAYOUT_NEWLINE_BEFORE | ImageItem.LAYOUT_NEWLINE_AFTER); positionLabel = new StringItem("", "Position: 0,0"); positionLabel.setLayout(ImageItem.LAYOUT_NEWLINE_BEFORE | ImageItem.LAYOUT_NEWLINE_AFTER); mainForm = new Form("Navizon"); mainForm.append(statusLabel); mainForm.append(positionLabel); mainForm.addCommand(get_exitCommand()); mainForm.setCommandListener(this); } return mainForm; } private Command get_exitCommand() { if (exitCommand == null) { exitCommand = new Command("Exit", Command.EXIT, 1); } return exitCommand; } }

Reply With Quote


