×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    34

    StringItem.HYPERLINK not working

    Hi

    i am using form.


    ---
    myForm.append(new StringItem("Contact: ","+919892238248",StringItem.HYPERLINK));
    myForm.append(new StringItem("E-mail: ","raxit@m4mum.com",StringItem.HYPERLINK));
    myForm.append(new StringItem("Web: ","http://www.m4mum.com",StringItem.HYPERLINK));
    ---

    What i was expecting is, end user can click on above (if device supports) and either open browser for e-mail/web or call to above number. [or atleast ask the end user "Do you want to make call to number?"


    But it is not working !!!

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: StringItem.HYPERLINK not working

    Quote Originally Posted by raxitsheth View Post
    What i was expecting is...
    I'm afraid your expectations were a little high.

    If you check the JavaDocs for the Item class...

    The appearance mode values do not have any side effects on the interactivity of the item. In order to be interactive, the item must have one or more Commands (preferably with a default command assigned), and it must have a CommandListener that receives notification of Command invocations. The appearance mode values also do not have any effect on the semantics of Command invocation on the item. For example, setting the appearance mode of a StringItem to be HYPERLINK requests that the implementation display the string contents as if they were a hyperlink in a browser. It is the application's responsibility to attach a Command and a listener to the StringItem that provide behaviors that the user would expect from invoking an operation on a hyperlink, such as loading the referent of the link or adding the link to the user's set of bookmarks.
    You have to do the work yourself. Attach a default Command, and an ItemCommandListener to the StringItem, and process the events you receive. You can pass a URL to MIDlet.platformRequest(), and the device might launch the appropriate application to handle the URL. Check the JavaDocs for the MIDlet class, and make sure you're using the correct URL syntax.

    Graham.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    34

    Re: StringItem.HYPERLINK not working

    Thanks

    We want to develop Platform independent code (including Nokia). Is it possible with given approach ?

    Raxit

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: StringItem.HYPERLINK not working

    Well...

    1. platformRequest() does not work on MIDP-1 devices, so you can't support those.

    2. Early firmware Nokia 6600s have a bug that stops platformRequest() working.

    3. MIDP only requires that platformRequest() supports http: and tel: URLs. Others might be supported, or not, depending on device.

    4. Reading the documentation very carefully is essential if you want your code to work across devices. Different implementations will work and behave differently, and the most you can expect is that they will meet the specification. Be careful not to expect your code to do something that the specification does not guarantee.

    For any cross-device development, testing on as many devices as possible is essential.

    Graham.

Similar Threads

  1. CAknMessageQueryDialog not working on the Target E61
    By symbians60 in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-04-23, 20:15
  2. No rule to male target
    By arayappan_it in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 4
    Last Post: 2008-02-28, 10:49
  3. Working on GSM, Not working on CDMA
    By aminuddin09 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2007-03-21, 07:07
  4. Program suddenly not working - doesn't recognise hardware
    By luciadoll in forum Bluetooth Technology
    Replies: 0
    Last Post: 2006-12-10, 01:54

Posting Permissions

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