×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    2

    widget ip address

    There is a method in order to get widget ip address with javascript?

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: widget ip address

    Hi, kartola
    Welcome to the NOKIA's developer Discussion Board,

    There is a method in order to get widget ip address with javascript?
    I think widget's IP address means the IP address of the server with which your widget is connected.

    We have only getAddress() method which will give you host name.
    After that you have to call the web-service which will give you IP address from host name.

    Best regards,
    RaHuL

  3. #3
    Registered User
    Join Date
    Jun 2010
    Posts
    2

    Re: widget ip address

    Sorry, but I'm not clear. Can you give me a simple example using this method?

    king regards,
    kartola

  4. #4
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: widget ip address

    Hi, kartola

    You can establish a socket connection between Client Device and your server (with which your widget is connected).

    Then you will definitely have an access for server IP Address Info, Port Info.

    RSocket::RemoteName() , Where remote name is remote host name.

    Best regards,
    RaHuL

  5. #5
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: widget ip address

    Hello,

    There is no way to retrieve your IP address by using platform services. Basically what you would have to do is to create a short code snippet onto your server, that echoes the public IP address back to the widget . In the widget side you should then issue a XMLHttprequest to server and display the response.

    You could use some ready made service as well, like http://ipinfodb.com/ip_location_api_json.php, if you are not keen on server side programming.

    You can test the output by copying following line to your browsers address bar: http://ipinfodb.com/ip_query.php?out...timezone=false

    Br,
    Ilkka

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: widget ip address

    Why would a widget need to know the device's IP address anyway? You still can't connect to the address from "outside", and if the device is not stationary (it is moving), the cellular network will give it a new IP address, if it moves/roams to a different routing area within the operator's network (and if it roams to a foreign network, it'll also get a new IP address, and the connection will break).

Similar Threads

  1. Getting MAC address and IP address.
    By KevinBoyd in forum [Archived] Flash Lite on Nokia Devices
    Replies: 3
    Last Post: 2010-01-07, 03:08
  2. validation of IP address and MAC address
    By mt.jijo in forum Symbian
    Replies: 3
    Last Post: 2009-06-22, 13:29
  3. How can I obtain the public IP address instead of a local address?
    By fly31 in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2009-01-17, 06:06
  4. how to extract the IP address from the IP packet using the IP hook
    By liuxingyu_best in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-10-29, 14:54
  5. How to read the IP address given as input to IP field editor.
    By sirilux in forum Symbian User Interface
    Replies: 3
    Last Post: 2008-08-07, 10:14

Posting Permissions

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