×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Launching browser with platformRequest() loads a different version of the page

    Hello.

    I'm developing an app from which I need to display the Twitter's Signup page, but since that page doesn't render very well on an HTMLComponent I decided to open it on the external browser by calling platformRequest(url). The problem I'm facing is that the versión of the page being loaded on the browser is different from the one being loaded if I manually open the browser and navigate to the same URL.

    I suppose it has something to do with the user agent being sent by the browser in each case.

    This is the version of the page I get when I manually open the internet browser and navigate to the signup page:

    signup_right.png

    And this is the versión of the page I get when I load it by calling midlet.platformRequest("https://twitter.com/signup"):

    signup_wrong.png

    Do you think there is something I can do about it ?

    Any ideas, comments or suggestions are very welcome.

    Thanks,
    -CarlosDL

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    685

    Re: Launching browser with platformRequest() loads a different version of the page

    It seems there is something wrong with the ssl authentication on your 2nd picture... can you try http://twitter.com/signup instead of https://twitter.com/signup and see what happens? (it should automatically redirects you to the https://twitter.com/signup page

  3. #3
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: Launching browser with platformRequest() loads a different version of the page

    Quote Originally Posted by shai.i View Post
    It seems there is something wrong with the ssl authentication on your 2nd picture... can you try http://twitter.com/signup instead of https://twitter.com/signup and see what happens? (it should automatically redirects you to the https://twitter.com/signup page
    Thanks Shai.

    I already tried that, with the same results. Just to be sure, I tried it again today, but the page loaded is the same.

    Any other suggestions ?
    -CarlosDL

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    685

    Re: Launching browser with platformRequest() loads a different version of the page

    Hmm maybe the platformRequest doesnt launch the actual Nokia xpress brwoser?
    Have you tried this on a real phone and not just the emulators?

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Launching browser with platformRequest() loads a different version of the page

    Quote Originally Posted by shai.i View Post
    Hmm maybe the platformRequest doesnt launch the actual Nokia xpress brwoser?
    Have you tried this on a real phone and not just the emulators?
    This looks to be the issue with loading of platform specific CSS - identification of requesting phone user agent - while the request is from J2me using- platform request.

    Check with some other sites like yahoo.com, google.com and facebook pages on real devices.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  6. #6
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: Launching browser with platformRequest() loads a different version of the page

    Quote Originally Posted by shai.i View Post
    Hmm maybe the platformRequest doesnt launch the actual Nokia xpress brwoser?
    Have you tried this on a real phone and not just the emulators?
    Quote Originally Posted by im2amit
    This looks to be the issue with loading of platform specific CSS - identification of requesting phone user agent - while the request is from J2me using- platform request.

    Check with some other sites like yahoo.com, google.com and facebook pages on real devices.
    That was one of my initial thoughts as well. I tested it on a 310 and a 311, with the same results, but I didn't try navigating to other pages after launching the browser via platformRequest() (not sure why I didn't test that. It was the logical next step).

    I'm almost sure the user agent has something to do with this, but I'm not sure if I will be able to do something about it.

    I will perform some other tests later today, and let you know the results.

    Meanwhile, any other ideas ?

    Thanks !
    -CarlosDL

  7. #7
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: Launching browser with platformRequest() loads a different version of the page

    Quote Originally Posted by shai.i View Post
    Hmm maybe the platformRequest doesnt launch the actual Nokia xpress brwoser?
    Have you tried this on a real phone and not just the emulators?
    I did some additional testing, and I discovered a couple of interesting things:

    It in fact seems to be launching a different browser. The bookmarks I add in the browser launched via platformRequest() don't appear in the Xpress browser when I start it manually (and vice versa). Also, when I'm about to close the Xpress browser, the confirmation dialog has the "Nokia Xpress" title, but the other browser's dialog doesn't have a title.

    I thought I tested this on a 310 and a 311, but I must have confused things in some way, because I made some tests right now on the 311, and although it also seems to be calling a different browser when executing the platformRequest() method, it appears to be using the correct user agent, since all pages I tried look exactly the same as in the Xpress browser.

    What I find more interesting is that the 310 has a more recent software version. It has V 08.13 16-05-13 RM-911, and the 311 has V 05.92 10-10-12 RM-714.

    If it is an issue on this particular pone, then I can safely ignore it, but I would like to know if others are experiencing the same thing on their devices so I can look for a way to handle it on my application.
    -CarlosDL

  8. #8
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    685

    Re: Launching browser with platformRequest() loads a different version of the page

    so you thought you tested it on a 310 & 311 but you never tested on either of them?
    if it works for you on both phones then thats all you need.
    the 311 actually has a new firmware that was released about a month+ ago but if its working for you on the older firmware then i see no reason it wouldnt work on the newer one.

  9. #9
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: Launching browser with platformRequest() loads a different version of the page

    Quote Originally Posted by shai.i View Post
    so you thought you tested it on a 310 & 311 but you never tested on either of them?
    if it works for you on both phones then thats all you need.
    the 311 actually has a new firmware that was released about a month+ ago but if its working for you on the older firmware then i see no reason it wouldnt work on the newer one.
    I thought I tested it on both, but I apparently only tested it on the 310, because I verified last night that it works well on the 311. So, to summarize, it works well on the 311, and it does not work well on the 310 (and on the emulator).

    I am particularly interested in knowing if this will happen on all 310s, and if other similar phones (305-309) behave similarly, because if that is the case, I better spend some more time trying to make that page render correctly in an HTML Component, or completely remove the possibility to access it from my application.

    I will use the RDA service to test this on other models later today, but if anyone else can test on their devices and is willing to let me know the results, I would be very grateful.

    Thanks,
    -CarlosDL

  10. #10
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

    Re: Launching browser with platformRequest() loads a different version of the page

    What shall we test? platformRequest calls the native Series 40 browser which is very hidden in Series 40 Full Touch devices, because the Nokia Xpress browser is so prominent. More about this here. By the way, the Xpress browser is a proxy browser doing a lot of fancy magic.

  11. #11
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: Launching browser with platformRequest() loads a different version of the page

    Quote Originally Posted by traud View Post
    What shall we test? platformRequest calls the native Series 40 browser which is very hidden in Series 40 Full Touch devices, because the Nokia Xpress browser is so prominent. More about this here. By the way, the Xpress browser is a proxy browser doing a lot of fancy magic.
    Hi traud, thanks for your answer (although I don't see how the link you posted relates to my question, but anyway, thanks for taking the time to comment).

    What I would like others to test on 305-310 devices is whether this URL (https://twitter.com/signup) is displayed as in the first or the second image from my original post, when launched via platformRequest(). Why? Because I tested it on a 310 and it looks horrible, but I also tested it on a 311 and it displays as expected, which is odd because the 310 and 311 are pretty similar devices (both are Series 40 DP 2.0).

    I tried to test it through RDA, but I wasn't able to install any app on any 308,309 or 310 (I could successfully install the test app on more than one 311 however, just to confirm that it displays the expected version of the page).

    This might seem irrelevant, but it is important for the app I'm currently working on, because if I confirm that all the other 3XX behave similar to the 310 I have for testing, I must do something, because I don't want to send my users to that version of the Twitter signup page.

    Any additional comment will be very welcome.

    Thanks,
    -CarlosDL

  12. #12
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

    Re: Launching browser with platformRequest() loads a different version of the page

    My link shows how to access the (good) native browser from within the normal user-interface (without platformRequest). With that, you might be able to trace the User-Agent header, of course you could do with Wireshark as well. Although it relates to user-agent headers, the actual cause is different:

    A Nokia 311 has the good old WebKit browser because it is a 3G device. All non-UMTS Series-40 phones have the very, very (good?, no) old Series 40 browser. At least that is my knowledge and experience. Consequently, if you do not like this, you have to avoid platformRequest and go for your own implementation. In Series 40 there are four web browsers:
    – the native, very old one coming from the Nokia 6230
    – the native, very good one, the WebKit one
    – Opera Mini, hiding the native one
    – Nokia Xpress, hiding the native one
    The latter two are not accessible via platformRequest, or at least I do not know how. Because they are proxy browsers thus breaking SSL/TLS, they would be no option in your case, anyway.

    Did that help? I am still a bit unsure, I got your question, sorry.
    Last edited by traud; 2013-07-27 at 15:30.

  13. #13
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: Launching browser with platformRequest() loads a different version of the page

    Quote Originally Posted by traud View Post
    ...

    Did that help? I am still a bit unsure, I got your question, sorry.
    Yes, traud, that is definitely more helpful, thank you.

    The fact that the native browser on the 311 is different from that on the other non-3G devices is the key, and I did not know that.

    Thanks,
    -CarlosDL

  14. #14
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

    Re: Launching browser with platformRequest() loads a different version of the page

    Series 40 WebKit was introduced in 6th Edition in end of 2008. You see the difference in the notification area at the top. More details about that, here … (not my stuff, great article!)
    However for cheaper phones (non-3G) later, Nokia moved back to the previous non-WebKit browser.

  15. #15
    Registered User
    Join Date
    Jan 2009
    Location
    Melbourne, Australia
    Posts
    2,571

    Re: Launching browser with platformRequest() loads a different version of the page

    Just for my interest, does this not mean that for a reliable page you will have no choice but to use HTMLComponent and play with the user-headers until you get a decent rendering on the page?

    As an aside, Traud do you know the author of the link: http://yiibu.com/articles/practical-...rs/page-5.html ? Might be worth pulling this into the wiki, or at least providing a cross-link.

Similar Threads

  1. S40 PlatformRequest Browser bad rendering
    By Sypter in forum Mobile Java General
    Replies: 1
    Last Post: 2012-06-22, 19:12
  2. Replies: 6
    Last Post: 2011-06-29, 06:34
  3. launching another midlet using platformRequest()
    By prashantpersistent in forum Mobile Java General
    Replies: 1
    Last Post: 2008-06-20, 11:19
  4. Replies: 11
    Last Post: 2008-03-08, 18:07
  5. platformRequest() and WAP browser
    By zivgr in forum Mobile Java General
    Replies: 0
    Last Post: 2003-07-20, 08:34

Posting Permissions

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