×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Differentiating between devices with "inverted" stage size

    Hi,
    How can I differentiate between two devices such as N95 8GB in landscape mode (N95 8GB has UI auto-rotate feature) and E71 or E72 (which doesn't detect rotation)??
    Both show stage size of 320x240, but I want a different layout for each, locked in their portrait mode (using disableAutoRotation()) ! E71 has a layout matching 320x240, and the N95 has a 240x320 layout, which I don't want to change once phone is rotated...
    I'm in a deadlock here, please advise!


    Thanks,
    Ranco

  2. #2
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: Differentiating between devices with "inverted" stage size

    There is a FSCommand to detect the handset. You can use it to differentiate N95 and E71.
    Twitter - manikantan_k
    Just in --

  3. #3
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: Differentiating between devices with "inverted" stage size

    Specifically, PLatform and Device ID in this article.
    http://wiki.forum.nokia.com/index.ph..._to_fscommands
    Twitter - manikantan_k
    Just in --

  4. #4
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Differentiating between devices with "inverted" stage size

    Quote Originally Posted by manikantan View Post
    There is a FSCommand to detect the handset. You can use it to differentiate N95 and E71.
    Ah, but I don't want to be too specific because then there'll come new device with the same specs but different name.
    I think I found a way to solve this, although it can't be verified in device central (CS4): I just test to see if the device has accelerometer sensors. If it doesn't, it is "E71-like":
    Code:
    function hasSensors():Boolean
    {
            var inParam = {SearchCriterion:"AccelerometerAxis"};
    	var outParams = sensors.FindSensorChannel(inParam);
    	if (outParams.ErrorCode == 0) 
                return (true);
            return (false);
    }

    Ranco

  5. #5
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Re: Differentiating between devices with "inverted" stage size

    Hi Ranco,
    I just test to see if the device has accelerometer sensors. If it doesn't, it is "E71-like":
    I think you cannot use Platform services in any of the 3rd edition phone. So, this solution is not going to work.
    but I want a different layout for each, locked in their portrait mode (using disableAutoRotation())
    disableAutoRotation device object is only included in the Flash Lite 3.1 & officially,today, there is no FL 3.1 update for n95 and e71.So, you have to use _root.rotation approach desicribed here :
    How_to_avoid_auto_rotation_of_Flash_Lite_content_on_Nokia_5800
    As far as your question is concerned, you can try this method :
    How_to_make_Flash_Lite_aware_of_softkey_location_and_screen_orientation
    It may give different result for a phone locked in landscape mode 320x240( N95) and a phone hing default resolution 320x240 (E71). If it doesnt work, then the only option u left with is described by manikantan.

    Best Regards,
    SajiSoft

  6. #6
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Differentiating between devices with "inverted" stage size

    Quote Originally Posted by sajisoft View Post
    Hi Ranco,

    I think you cannot use Platform services in any of the 3rd edition phone. So, this solution is not going to work.
    Hmmm. Ok, good to know. Are you sure? If N95 8Gb (only this one) supports "accelerometer for auto-rotate" - how is this accelerometer accessed in flashlite?

    disableAutoRotation device object is only included in the Flash Lite 3.1 & officially,today, there is no FL 3.1 update for n95 and e71.So, you have to use _root.rotation approach desicribed here :
    How_to_avoid_auto_rotation_of_Flash_Lite_content_on_Nokia_5800
    As far as your question is concerned, you can try this method :
    How_to_make_Flash_Lite_aware_of_softkey_location_and_screen_orientation
    It may give different result for a phone locked in landscape mode 320x240( N95) and a phone hing default resolution 320x240 (E71). If it doesnt work, then the only option u left with is described by manikantan.

    Best Regards,
    SajiSoft
    Tried the softkey thing already. I always get "2" for all devices in both orientations (when feasible).
    And about disableAutoRotation() - it works perfectly on N97, which is supposably FL 3.0. How come?
    BR,
    Ranco

  7. #7
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Re: Differentiating between devices with "inverted" stage size

    If N95 8Gb (only this one) supports "accelerometer for auto-rotate" - how is this accelerometer accessed in flashlite?
    Yes! N95 do have sensors but Flash Lite doesnt provide any api to access them. That is the reason there is plugin in kuneri lite ;
    http://wiki.kunerilite.net/index.php...rometer_plugin
    And about disableAutoRotation() - it works perfectly on N97, which is supposably FL 3.0. How come?
    N97 is a 5th edition phone and it do provides update to FL 3.1 officially i.e by App Update & may be a newer FW of N97 have FL 3.1 by default.So, u must be running FL 3.1 on your N97. What i said is actually based on the documentation :
    The Device object is supported since Flash Lite Player 3.1 on S60 5th Edition and selected S60 3rd Edition, Feature Pack 2 devices. While you can publish your application for Flash Lite 2.0 or newer, the Device object only works on devices based on the Symbian platform that support Flash Lite 3.1.
    Source : ActionScript Device Objects
    and if i am not mistaken, N95 and E71 are S60 3rd edition FP1 devices. Moreover, for N97 ,u can make sure which version u r using by opening any non-full screen content,pressing left soft key and going to "about application" in Flash Player.
    Tried the softkey thing already. I always get "2" for all devices in both orientations (when feasible).
    It works fine to detect the orientation in case of my N97 mini. Well! now u left with two options :
    1- Get the device name and act accordingly (This tab surely helps you in this case)
    2- Release different content for E-series and N-series phones.

    Best Regards,
    SajiSoft
    Last edited by sajisoft; 2010-10-14 at 15:59. Reason: addition

  8. #8
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Differentiating between devices with "inverted" stage size

    Quote Originally Posted by sajisoft View Post
    Yes! N95 do have sensors but Flash Lite doesnt provide any api to access them. That is the reason there is plugin in kuneri lite ;
    http://wiki.kunerilite.net/index.php...rometer_plugin

    N97 is a 5th edition phone and it do provides update to FL 3.1 officially i.e by App Update & may be a newer FW of N97 have FL 3.1 by default.So, u must be running FL 3.1 on your N97. What i said is actually based on the documentation :

    Source : ActionScript Device Objects
    and if i am not mistaken, N95 and E71 are S60 3rd edition FP1 devices. Moreover, for N97 ,u can make sure which version u r using by opening any non-full screen content,pressing left soft key and going to "about application" in Flash Player.

    It works fine to detect the orientation in case of my N97 mini. Well! now u left with two options :
    1- Get the device name and act accordingly (This tab surely helps you in this case)
    2- Release different content for E-series and N-series phones.

    Best Regards,
    SajiSoft
    Ok. That's what I'll do. Sajid - thanks, helpful as usual!!!
    Ranco

Similar Threads

  1. Is there a way to "edit" and "save" the "texts" of received SMS messages?
    By pamir_yasti in forum General Development Questions
    Replies: 1
    Last Post: 2010-07-16, 10:15
  2. Replies: 3
    Last Post: 2009-06-18, 21:42

Posting Permissions

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