×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    10

    Locate User and Determine the location

    Hi everyone

    I need some serious help. I am working on a sms widget where I have to locate the user and send the location out to another party.
    var messageText = "xxx is traveling from YYY";
    1) xxx I need to obtain their phone name
    2) The location they are at YYY


    Below is my sms coding that only able to send out but cannot get the phone name and location they are at. To determine their location is it something to do with reverse geocoding ?

    function smsSending(){

    var criteria = new Object();
    //Setting the type of the message
    criteria.MessageType = "SMS";

    var phoneNumber = document.getElementById("recTxt").value;
    if (phoneNumber != null) {
    //Setting the "To" field of the message, can't be empty
    criteria.To = phoneNumber;
    }
    //else {alert("Phone number is empty"); return;}

    var messageText = "??? is traveling from ???";
    //document.getElementById("message").value;
    if (messageText != null) {
    //Setting the body text field of the message, can't be empty
    criteria.BodyText = messageText;
    }

    //else {alert("Text is empty");return;}


    try {
    //Send the message asynchronously
    serviceObj.IMessaging.Send(criteria, onSendDone);
    }

    catch(exception) {
    alert("SendSMS error: " + exception);
    }

    // Called when asynchronous message sending has completed
    function onSendDone(transId, eventCode, result) {
    checkError(result);
    }

    function checkError(error) {
    if (error.ErrorCode != 0) {
    alert("Error in sending message");
    }
    else {
    alert("Message was sent succesfully");
    }
    }


    }
    Last edited by ghimyap; 2010-02-07 at 16:16.

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Locate User and Determine the location

    Hi ghimyap,

    about getting information about the device, check out these Wiki articles:
    * http://wiki.forum.nokia.com/index.ph...rmation_in_WRT
    * http://wiki.forum.nokia.com/index.ph...e_Model_in_WRT

    About the location info, you have to perform geocoding of the device's location. Check out Google's geocoding service: http://code.google.com/apis/maps/doc...ion/geocoding/

    Hope it helps,
    Pit

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    10

    Re: Locate User and Determine the location

    Hi Pit

    You save me again. Thanks.

Similar Threads

  1. which technology, if any for passing location to web page?
    By tomhodder in forum Geolocation and Navigation
    Replies: 1
    Last Post: 2009-04-21, 06:48
  2. GPS location and saving user inputs
    By veeplus in forum [Archived] Flash Lite on Nokia Devices
    Replies: 3
    Last Post: 2009-02-11, 08:10
  3. Getting the location of a Nokia Series 60, N80 phone
    By xgamerx in forum Mobile Java General
    Replies: 12
    Last Post: 2008-02-15, 05:01
  4. location based services comparison
    By vimal2007 in forum Geolocation and Navigation
    Replies: 4
    Last Post: 2008-01-03, 23:41
  5. Determine if user is speaking
    By pkosonen in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2005-07-21, 10:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •