×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Widgets/native mobile browsing & S60 emulator

    A couple of questions related to S60 (5th edition sdk) emulator. How to show the key code of a pressed key when using the emulator? I made a short javascript which just use alert function to show the values of pressed keys (which works just fine in Firefox etc.) but for some reason doesn't work in emulator (or alert returns always 0 whichever key I press). Another question: Is there somewhere information about tabbed navigation functionality in emulator and in S60 browsers? My problem is to make a hidden element on a web page visible before it's focused when I'm navigating using tabbed navigation... Br, Markku R

  2. #2
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Widgets/native mobile browsing & S60 emulator

    Hello,

    For some reason the both 5th edition and the N97 SDK emulators does indeed fail to handle keydown, keypress and keyup events properly.
    Only keycode that the can be obtained is 8, which is backspace.

    Could you please elaborate the second use case a bit?

    Br,
    Ilkka

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Widgets/native mobile browsing & S60 emulator

    Do you know if the 3rd edition sdk emulator works properly in this case? Of course I can test it by installing the sdk, but if you happen to know already...

    The second use case relates to, as a matter of fact, customized tab navigation. It's said in the sdk documentation that customized tab navigation is possible at least in S60 WRT environment, but how about in S60 web browser environment? Is it possible in there as well? I need to use customized tab navigation because I need to bring hidden elements visible on the page when a user is navigating (using tab navigation) on the page. That's why I need to capture and process key events by myself using my own javascripts because the hidden elements can't get focus etc. I have already implemented everything and got work in PC/Firefox environment using simulated tab navigation. This should work as such also in S60 browser/WRT environments if they just support the customized tab navigation (as S60 WRT should do according to the sdk documentation). As a matter of fact, I already tested my web page using the 5th edition sdk emulator, but the behaviour is a little bit strange, i.e. a wrong element get focus after the page load, my own scripts can't capture key events (as you noticed by yourselves as well) etc.

  4. #4
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Widgets/native mobile browsing & S60 emulator

    Quote Originally Posted by markku.rautiola View Post
    Do you know if the 3rd edition sdk emulator works properly in this case? Of course I can test it by installing the sdk, but if you happen to know already...

    The second use case relates to, as a matter of fact, customized tab navigation. It's said in the sdk documentation that customized tab navigation is possible at least in S60 WRT environment, but how about in S60 web browser environment? Is it possible in there as well? I need to use customized tab navigation because I need to bring hidden elements visible on the page when a user is navigating (using tab navigation) on the page. That's why I need to capture and process key events by myself using my own javascripts because the hidden elements can't get focus etc. I have already implemented everything and got work in PC/Firefox environment using simulated tab navigation. This should work as such also in S60 browser/WRT environments if they just support the customized tab navigation (as S60 WRT should do according to the sdk documentation). As a matter of fact, I already tested my web page using the 5th edition sdk emulator, but the behaviour is a little bit strange, i.e. a wrong element get focus after the page load, my own scripts can't capture key events (as you noticed by yourselves as well) etc.
    Has the above potentially something to do with this: http://wiki.forum.nokia.com/index.ph...nd_S60_WRT_1.1

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

    Re: Widgets/native mobile browsing & S60 emulator

    I would propose to use real device for testing. If you don't have one available check out Remote device access

    Have you read about these workarounds for focus issues on tabbed navigation mode?
    http://wiki.forum.nokia.com/index.ph...avigation_mode

    The known issue is about 7.1.15679 which is very early version of 7.1 browser. Currently the phones are using much more recent versions where this issue is fixed.

    If you are targeting to strictly devices using 7.1 browser (N97, N97 mini and some 3.2 devices) you could also check setNavigationType() with parameter "none" which will leave all the event handling to the widget.

    -Ilkka

  6. #6
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Widgets/native mobile browsing & S60 emulator

    I have been using now a real device (i.e. E52 with the new firmware) and spent few days trying to find out how tabbed navigation really works in that device. I also checked the workaround you mentioned. I have to emphasize that I have been testing this using the S60 browser on that device and some test pages of my own (i.e. not WRT nor a widget). I have also checked several stories about tabbed navigation on mobile devices, and some of those stories says that it's often more than challenging to find out what is the tabbing order, which element get focus, why an element sometimes lose its focus, etc. I have noticed all that by myself as well during the last few days... My conclusion with this is that the easiest way - and maybe the only feasible way - to achieve what I want is to disable navigation mode and implement totally customized tab navigation.

    Is that disabling of navigation mode also possible with S60 browsers? Or is it just available in WRT?

    Br,
    Markku R

  7. #7
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Widgets/native mobile browsing & S60 emulator

    The navigation mode can be disabled on 7.1 browser by adding <meta name="navigation" content="none"> to head section of the HTML page.

    You are correct about tabbed navigation. It was originally only meant for simple pages using list layout. It is recommended to implement your own algorithm if you use more complex layout in your widget or web page.

    Br,
    Ilkka

  8. #8
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Widgets/native mobile browsing & S60 emulator

    Thanks a lot, seems to work much better now. However, it still doesn't work completely (and as it works with desktop browsers). I have image type of input elements on my page and customized vertical tab navigation working as vertical carousel from image to image when pressing left and right arrow keys, i.e. left and right navigation keys on mobile handset. I have also an onfocus event function defined for each input element, which functions I then call from my own event handling routines. I have now disabled the navigation mode, however, it seems to me that those input elements still get focus from the browser and in different order as I'm doing it by myself in my own key event handling routines. Should those elements still get focus from the browser (without my own javascript code calling the corresponding focus routines) or should the browser totally ignore its own focus functionality in this particular case (I hope you understand what I mean...)? In addition, the carousel is not working properly because browser's focus seems to stuck to an image input element so that the next invisible image (visibility controlled with "style display: block/none" controls) is not shown at all. Do you know what kind of elements and/or controls I should use in order to get the vertical carousel working properly with visible and invisible elements in the carousel? Should I use the kind of elements which cannot get focus at all (something else as input and link elements)? And still one question, would the widget work in the similar manner as the browser in this case? I'll convert my web page into widget when I know how to get it work as I want....

    Br,
    Markku R

  9. #9
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Widgets/native mobile browsing & S60 emulator

    It seems to me that I solved the vertical carousel problem: I need to use onKeyDown events in the input elements instead of onFocus events. Now it seems to work exactly like on desktop...

    I have still some minor details to solve in my horizontal carousel, but hopefully I can solve those in the similar manner...

    Br,
    Markku R

  10. #10
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Widgets/native mobile browsing & S60 emulator

    No I have a bigger problem with 7.1 browser. I get it stucked, I get even the whole E52 (with new firmware) stucked sometimes because of this.

    I have disabled the navigation and handle all key events by myself. I have a carousel where I have links and textarea elements in that carousel scrolling up and down from element to element when pressing up and down keys. When a textarea element is entered, I call focus() function in my javascript key handle routine in order to get that element focused. I don't have any routine of my own to handle that focus but it's handled by the browser. Everything works just fine before I write some text into the textarea. When I write text into that textarea for the first time, then scroll to the next element by pressing up or down key (so I don't press the Navi select key (i.e. "enter") after writing the text), everything works - except a little bit slowly - once. When I scroll again to a textarea (the same as the previous one or another one), write some text and scrolled to the next element, the browser get stucked. Nothing can be done except restart the browser, and a coulple of times I have got the whole phone stucked... It works exactly in this way 9 times out of 10, so I can repeat it very easily. Should I do it so that I handle input/textarea elements focus totally by myself simulating somehow the browser's focus function? When writing this I don't know how to simulate e.g. textarea focus so that I can write some text into that area...

    Any ideas to solve this?

    Br,
    Markku R

    BTW, the 7.1 browser doesn't handle the onclick event properly. The key code received is 0. I have done the onclick event handling like: http://wiki.forum.nokia.com/index.ph...nd_S60_WRT_1.1

Similar Threads

  1. Trouble with the S60 3rd Edition Emulator debugging Java applications
    By GuusDavidson in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2009-11-27, 12:16
  2. S60 emulator performance and single IMG file
    By chall3ng3r in forum Tools and SDK Feedback (Closed)
    Replies: 0
    Last Post: 2008-02-18, 23:22
  3. Replies: 11
    Last Post: 2007-10-03, 19:46
  4. Replies: 0
    Last Post: 2007-07-15, 23:06
  5. S60 3rd Edition Emulator under Netbeans 5.5 ?
    By Tiger79 in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2007-05-02, 13:52

Posting Permissions

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