Issue with device orientation on android.

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi, I testing the build 259.8 and I trying to make the app recogize when the phone is in portrait or landcaspe orientation with the Accelerometer object, I using a counter with the "set orientation function".
    I remember in old builds fusion returning me the value 0 to portrait and 3 for landscape mode, but now it is returning varios values between 0 and 6, in that case the ZERO is the default value even is the phone on portrait mode or landscape mode.
    What changes are maden in this new build and how can I get some another way to tell to application if the phone is 90 dregrees fliped or not (portrait or landcaspe)? I use this function to reposition X and Y values of the objects based on orientation mode.

  • Hi, I testing the build 259.8 and I trying to make the app recogize when the phone is in portrait or landcaspe orientation with the Accelerometer object, I using a counter with the "set orientation function".
    I remember in old builds fusion returning me the value 0 to portrait and 3 for landscape mode, but now it is returning varios values between 0 and 6, in that case the ZERO is the default value even is the phone on portrait mode or landscape mode.
    What changes are maden in this new build and how can I get some another way to tell to application if the phone is 90 dregrees fliped or not (portrait or landcaspe)? I use this function to reposition X and Y values of the objects based on orientation mode.


    Can you please share more information, devices you tested, model android OS version, what are you doing in the MFA? No changes have been done in the accelerometer.

    Regards,


    Fernando Vivolo

    ... new things are coming ...

  • Can you please share more information, devices you tested, model android OS version, what are you doing in the MFA? No changes have been done in the accelerometer.

    I want to make something like this:
    If celphone is in landscape position active do x event
    If celphone is in portrait position do y event

    I always use the "Accelerometer object" to do this because its returns the value 0 to the portrait position and 3 to landscape position.

    But now, after I installed the 259.8 build the extension stooped giving me the 0 or 3 values and shows weird values beetwen 0 and 4
    I upoladed this video to Show the problem:
    Please login to see this link.

    I using LG G7 (Always used the same phone)

  • I want to make something like this:
    If celphone is in landscape position active do x event
    If celphone is in portrait position do y event

    I always use the "Accelerometer object" to do this because its returns the value 0 to the portrait position and 3 to landscape position.

    But now, after I installed the 259.8 build the extension stooped giving me the 0 or 3 values and shows weird values beetwen 0 and 4
    I upoladed this video to Show the problem:
    Please login to see this link.

    I using LG G7 (Always used the same phone)

    You can use Accelerometer X values for this.


    Please login to see this picture.

    You could simple make an app with Always = Set counter to value = Direct Acceleration
    Counter would need to be -999 / 0 / 999 at least.
    Then you can see what the values are to link to whatever you need.
    If you need Y and Z. You could do the same with 2 more counters.

    I use the Accelerometer myself for Apps to Detect Vibrations, when the device is sitting on a flat surface.

    Edited once, last by VBEinc (October 30, 2023 at 3:11 PM).

  • I want to make something like this:
    If celphone is in landscape position active do x event
    If celphone is in portrait position do y event

    I always use the "Accelerometer object" to do this because its returns the value 0 to the portrait position and 3 to landscape position.

    But now, after I installed the 259.8 build the extension stooped giving me the 0 or 3 values and shows weird values beetwen 0 and 4
    I upoladed this video to Show the problem:
    Please login to see this link.

    I using LG G7 (Always used the same phone)

    it is expected to have these values

    It returns values from 0 to 6 :


    • Unknown (should not happen unless you shake the device) → no movement from start is always unknown
    • Portrait --> 1
    • Portrait upside down --> 2
    • Landscape left --> 3
    • Landscape right --> 4
    • Face up --> 5
    • Face down --> 6

    there is a fix to work in all screen orientation, available in beta 295.9

    Regards,


    Fernando Vivolo

    ... new things are coming ...

    Edited 2 times, last by Fernando (October 30, 2023 at 7:11 PM).

  • You can use Accelerometer X values for this.


    Please login to see this picture.

    You could simple make an app with Always = Set counter to value = Direct Acceleration
    Counter would need to be -999 / 0 / 999 at least.
    Then you can see what the values are to link to whatever you need.
    If you need Y and Z. You could do the same with 2 more counters.

    I use the Accelerometer myself for Apps to Detect Vibrations, when the device is sitting on a flat surface.


    Thanks I will try use it, but as I said before, I always uses the "set orientation function" funcition and works fine.


    it is expected to have these values

    It returns values from 0 to 6 :


    • Unknown (should not happen unless you shake the device) → no movement from start is always unknown
    • Portrait --> 1
    • Portrait upside down --> 2
    • Landscape left --> 3
    • Landscape right --> 4
    • Face up --> 5
    • Face down --> 6

    there is a fix to work in all screen orientation, available in beta 295.9

    I dont remember exactly what was my build before I upgraded to 295.9. I made an image that I thinks explains more well.

  • Here is a small testbed

    * Start of Frame
    String : Set alterable string to ""

    * Always
    Counter : Set Counter to Orientation( "Accelerometer object" )

    // It returns values from 0 to 6 :
    //
    // Unknown (should not happen unless you shake the device)
    // Portrait
    // Portrait upside down
    // Landscape left
    // Landscape right
    // Face up
    // Face down
    //
    //
    // NOTE: NOT ALL DEVICES RESPOND TO PORTRAIT UPSIDE DOWN (2)

    * Counter <> 0
    + Counter <= 2
    + Counter < 5
    + Only one action when event loops
    String : Set alterable string to "Portrait"

    * Counter <> 0
    + Counter >= 3
    + Counter < 5
    + Only one action when event loops
    String : Set alterable string to "Landscape"

    * AndroidPlus: Is Device natural landscape?
    + Run this event once
    String 2 : Set alterable string to "Device is Landscape"

    * NOT AndroidPlus: Is Device natural landscape?
    + Run this event once
    String 2 : Set alterable string to "Device is Portrait"


  • I think not worked. As you can see, as soon the app flips, the value go back to 1 again. In this case the test is giving me the value based on actual orientation mode.
    If the value go back to 1, how can I tell do app "My phone is in landcaspe mode or potrait mode" ?

    And the second string "Device is portrait" no changed too. Always showing "Device is portrait"

    I recorded the app:
    Please login to see this link.

    Obs: I will try downgrade fusion to some older build to show how the app worked before

    Edited 2 times, last by Metal_Shadow (October 31, 2023 at 11:35 PM).

  • This should not change, since it only read as the orientation start.

    Please login to see this attachment.


    Well, but again. In that case how I tell to my app if the phone is in horizontal or vertical mode? If I dont have a counter, value or something to tell me that.

    Theres a lot of apps in playstore thats changes theirs HUDs and graphics based in how the person who is using it is holding they phone.

    Exemple: "If the phone is in portrait mode the logo is a lot bigger, otherwise its small, etc"

    In the video I posted shows, the value always go back to 1 again.

    Edited 2 times, last by Metal_Shadow (November 1, 2023 at 12:25 AM).

  • Normally application are set to be portrait or landscape not sensor.

    When you set portrait mode, you still get the info from orientation, you can decide in base of a single number, thought the example realize how to detect this.

    But if you set sensor and fit inside and Adjust Window Size, the screen will rotate, and you will notice that in portrait screen X < screen Y and landscape screen X > screen Y.

    Please login to see this attachment.

    Vs

    Please login to see this attachment.

    Nothing extra you need since it's done by runtime, only resize your elements.


    See the video in the zip file.

  • I cant use Adjust Window Size because smashes the site of te objects and I need to maintain the sizes and reposisionate them.

    Well, not solved my problem at all.

    What makes me very uncomfortable is that it was something simple to do before and now a geting all this trouble.

    I will try to downgrade to a older build and make my app on it. (worked perfectly before) If I can I will return to this post to show how perfectly works.

    Edited 2 times, last by Metal_Shadow (November 2, 2023 at 2:49 AM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!