Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor elaltaico's Avatar
    Join Date
    May 2009
    Posts
    115
    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;
        }
    }

  2. #2
    Nokia Developer Champion Tiger79's Avatar
    Join Date
    Apr 2007
    Posts
    2,697
    sorry no idea how Verizon works...
    If you're using it to only retrieve (not calculate) latitude and longitude then I'd guess you might stick to the Location API's (JSR-179) themselves instead of using an intermediate api layer like Verizon...
    Anyways I was interested about the "calculate" part, and was expecting all sorts of maths and complex algorithms :P but in the end you just meant retrieve latitude and longitude from an API, and not calculate

  3. #3
    Regular Contributor elaltaico's Avatar
    Join Date
    May 2009
    Posts
    115
    well, I meant retrieve for sure :>. Anyway, I can retrieve langitude and longitude by using JSR 179. But I have to use Navizon API to retrieve langitude,longitude,MMC,MNC,LAC. Do you know a way to retrieve these values on Nokia Mobiles? Thank you in advance.

    Regards
    Altayli

Similar Threads

  1. How can I find out infra-red API?
    By tommylkc in forum Symbian C++
    Replies: 1
    Last Post: 2003-05-29, 17:16
  2. Replies: 2
    Last Post: 2003-02-11, 12:20
  3. Where can I find a tool or API which converts xml to wbxml?
    By riolg in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2003-02-10, 23:42
  4. Where can I find the SMS java library related with the SMS API?
    By peterli007 in forum General Messaging
    Replies: 1
    Last Post: 2002-07-15, 09:22
  5. where do I find the SMS API (NOT THE DESCRIPTION)
    By pmoeser in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2002-05-23, 08:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved