User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Accelerometer work in Android?

  1. #1
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,052
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Question Accelerometer work in Android?

    Hi! I've set a simple action "ALWAYS -> Set a visible counter to Orientation( "Accelerometer object" )

    Testing on Sony Xperia Z1, the counter stays at "0", doesnt change if i rotate the phone. is this a known bug or do i miss something here?

    thanks for your suggestions

  2. #2
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,701
    Mentioned
    292 Post(s)
    Tagged
    4 Thread(s)
    that 0 represent the portrait mode for natural orientation.

    did you set "Any/automatic" in the android configuration?
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  3. #3
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,052
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    is there a way to get the accelerator information even if i set the app to portrait?

    reason: I've build an ios app (ios doesnt have the feature 'any rotation') where i setup a 'fake' landscape frame. i wanna jump to this frame, if the rotation changes to landscape.

    for this i need the acc information of orientation even if i just use the portrait mode - is this doable?

    thanks

  4. #4
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,701
    Mentioned
    292 Post(s)
    Tagged
    4 Thread(s)
    accelerometer always works. not matter the orientation
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    hcem's Avatar
    Join Date
    Nov 2012
    Posts
    167
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hello, I have the exact same problem as Stingray. I want to a 'fake' landscape frame in portrait mode.

    However the orientation information I get from the accelerometer object is always '0' unless I change the view configuration to "Any/automatic" which I do not want. It gets x y z values without a problem in portrait mode but not the orientation (1,2,3,4 etc).

    Is this an unresolved bug or do I need to change some property to make the accelerometer work properly in portrait mode?

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    hcem's Avatar
    Join Date
    Nov 2012
    Posts
    167
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    By the way, the object works fine in IOS. I can get orientation values in portrait mode with the same events.

  7. #7
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,701
    Mentioned
    292 Post(s)
    Tagged
    4 Thread(s)
    seems to be working fine here, when using like this

    * Device orientation changed
    Counter 3 : Set Counter to Orientation( "Accelerometer object" )
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  8. #8
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    hcem's Avatar
    Join Date
    Nov 2012
    Posts
    167
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hello Fernando, it's not working for me.

    Are you sure your Screen Orientation in properties is left as 'Portrait', not 'Any/Automatic' ?

    Regards

  9. #9
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,701
    Mentioned
    292 Post(s)
    Tagged
    4 Thread(s)
    oh if you set portrait/landscape orientation will have a fix value in case if portrait is 0 (but once you fix an orientation in manifest all others are not dispatched by OS)

    better make me a small mfa for me to see your design and test here.
    Regards,


    Fernando Vivolo

    ... new things are coming ...

  10. #10
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    hcem's Avatar
    Join Date
    Nov 2012
    Posts
    167
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Port Acc.mfa

    Hi Fernando, Please find attached the example mfa.

    These attached events works fine for me in IOS (gets orientation values) and this is while the Screen Orientation is left as "Portrait". In Android the same events won't work and returns 0.

    If I change the property in Android to "Any/automatic", it starts working but that's not what I want, as it messes up the game which I want to export as it is.

    Thanks again for the support hoping there is a solution.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. New Physics on Android & IOs not work?
    By kiko in forum Android Export Module Version 2.0
    Replies: 14
    Last Post: 23rd March 2014, 03:08 AM
  2. Accelerometer control simply don't work !
    By waw_demmon in forum Android Export Module Version 2.0
    Replies: 11
    Last Post: 27th January 2014, 11:46 PM
  3. Are the Accelerometer YDirect and XDirect swapped in Android?
    By BrashMonkey in forum Android Export Module Version 2.0
    Replies: 19
    Last Post: 25th July 2013, 02:46 PM
  4. I can't get the accelerometer to work (XNA Phone Application)
    By sbucci in forum XNA Export Module Version 2.0
    Replies: 3
    Last Post: 29th September 2012, 03:50 PM
  5. Accelerometer does not work when landscape flips
    By AndyH in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 15th October 2011, 09:28 AM

Posting Permissions

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