×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    136

    How to decide screen orientation awareness?

    Hi,

    Is there any way available to check whether the mobile on which the application executing supports screen orientation? I need this as the client on which i am working supports different devices like E51, E71, N95 etc.


    Thanks
    Rajat

  2. #2
    Registered User
    Join Date
    Nov 2008
    Location
    Mumbai-India
    Posts
    379

    Re: How to decide screen orientation awareness?

    Quote Originally Posted by raj_rr7 View Post
    Hi,

    Is there any way available to check whether the mobile on which the application executing supports screen orientation? I need this as the client on which i am working supports different devices like E51, E71, N95 etc.


    Thanks
    Rajat
    U can detect orientation by getting height and width of the current resolution.

    when the orientation get changed u will get notification by HandleResourceChangeL() of appui get called

  3. #3
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: How to decide screen orientation awareness?

    Quote Originally Posted by raj_rr7 View Post
    Hi,

    Is there any way available to check whether the mobile on which the application executing supports screen orientation? I need this as the client on which i am working supports different devices like E51, E71, N95 etc.


    Thanks
    Rajat
    Hi rajat,

    Have a look below function, If you will get ETrue by using this fun then you can change orientation i.e supported Orientation, EFalse otherwise.

    IMPORT_C TBool OrientationCanBeChanged() const;

    #include <aknappui.h>

    CCoeEnv* env = CCoeEnv::Static();
    if( env )
    {
    CAknAppUiBase* appUiBase = REINTERPRET_CAST( CAknAppUiBase*, env->AppUi() );
    if( appUiBase )
    {
    TBool IsSupport = appUiBase->OrientationCanBeChanged();
    }
    }

    Hope, It will help you.
    Last edited by kis_spn; 2009-07-01 at 13:51.

  4. #4
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    136

    Re: How to decide screen orientation awareness?

    Hi,

    Thanks for reply.

    IMPORT_C TBool OrientationCanBeChanged() const; is not supported in S60 3rd Edition FP1. Is there any other API avaialble?


    Thanks
    Rajat

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: How to decide screen orientation awareness?

    I do not know if it is still enough, but I used a simple CWsScreenDevice::NumScreenModes in the past. At least it worked well for N80, N91, N93 and 3250 - S60 3rd noFP devices.

  6. #6
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    136

    Re: How to decide screen orientation awareness?

    Here, i am looking for a way to find whether landscape/portrait mode is supported or not supported? Is there any way to find out device/screen supporting landscape/portrait mode?


    Thanks
    Rajat

  7. #7
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,988

    Re: How to decide screen orientation awareness?

    hi look for this function in sdk : TBool SetOrientation(TGraphicsOrientation aOrientation);

    it returns, ETrue if the orientation is supported, otherwise returns EFalse.

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: How to decide screen orientation awareness?

    Quote Originally Posted by raj_rr7 View Post
    Here, i am looking for a way to find whether landscape/portrait mode is supported or not supported? Is there any way to find out device/screen supporting landscape/portrait mode?
    Just to clear your doubts: I really posted #5 as an answer to this question.

  9. #9
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    136

    Re: How to decide screen orientation awareness?

    I tried that options but even for E51, it returned number of screen modes 2.

    With the help of API GetScreenModeSizeAndRotation found, two different screen modes
    1) 320 * 240 with screen orientaion 0 (EGraphicsOrientationNormal) and
    2) 240 * 320 with screen orientation 1 (EGraphicsOrientationRotated90)

    I could not get the idea about whether it supports landscape or not. Can you please elaborate more on the modes and orientation?


    Thanks
    Rajat

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: How to decide screen orientation awareness?

    I have no E51, but it may simply mean that it supports landscape orientation.

Similar Threads

  1. Disable screen orientation change
    By shankx in forum [Archived] Flash Lite on Nokia Devices
    Replies: 5
    Last Post: 2009-05-05, 23:45
  2. Addressable (usable) screen size for wallpapers
    By needshelp in forum [Closed] Publishing to Nokia Store
    Replies: 3
    Last Post: 2009-04-24, 14:50
  3. Direct Screen Access (Please Comment!)
    By earamsey in forum Symbian
    Replies: 1
    Last Post: 2006-07-28, 18:34
  4. UI: Full Screen Mode
    By GENERAL_INFO in forum Symbian User Interface
    Replies: 3
    Last Post: 2004-11-22, 06:27
  5. how to change Screen from Form to FullCanvas
    By ihadreampp in forum Mobile Java General
    Replies: 3
    Last Post: 2003-08-15, 08:50

Posting Permissions

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