Orientation Sensor not working

443 views
Skip to first unread message

communication

unread,
Apr 10, 2016, 10:03:31 AM4/10/16
to mitappinv...@googlegroups.com

I'm testing the orientation sensor of my Wiko Sunset smartphone. It has got an orientation sensor (the screen rotates when you rotate the smartphone; you can also see the phone specs at http://www.amazon.co.uk/Wiko-SUNSET-4GB-Black-subscription/dp/B00N1NCCWM) but the App Inventor OrientationSensor says that it is not available. I can see it by "doing it" the "OrientationSensor.Available" block in the block view: the result is "false". And when I run the attached project /the blocks are shown in the image) in the MIT AI2 Companion I don't get any updated info in the Orientation label when I change the orientation of the phone.



Any help is welcome

Thanks in advance
orientationSensorNotWorking.aia

Hossein Amerkashi

unread,
Apr 10, 2016, 10:05:47 AM4/10/16
to MIT App Inventor Forum
You may want to post screenshot of your relevant blocks instead of .aia.
After that, if someone needs your .aia to further check into it, then consider posting your .aia



Hossein Amerkashi http://Amerkashi.Wordpress.com   | http://AppyBuilder.com 

 

   


   

Taifun

unread,
Apr 10, 2016, 11:09:16 AM4/10/16
to MIT App Inventor Forum
OrientationSensor.Available = false means, there is no such sensor available in your device
Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

communication

unread,
Apr 10, 2016, 11:13:15 AM4/10/16
to MIT App Inventor Forum
Hi Taifun, thanks for your answer. But, as I said, the phone specs say that the device has an orientation sensor. More importantly, the phone detects the orientation and change the display when you rotate it. Is this done without an orientation sensor...?

Taifun

unread,
Apr 10, 2016, 11:16:15 AM4/10/16
to MIT App Inventor Forum

communication

unread,
Apr 10, 2016, 11:31:31 AM4/10/16
to MIT App Inventor Forum
When I disable automatic display rotation on the phone the image stays still. But why? If the screen of my phoone rotates when I enable automatic display rotation and I rotate the phone (even with your compass app) where is the problem?

Taifun

unread,
Apr 10, 2016, 12:25:39 PM4/10/16
to MIT App Inventor Forum
When I disable automatic display rotation on the phone the image stays still. But why?
which means, if you enable automatic display rotation, the compass app then works?
Taifun

communication

unread,
Apr 10, 2016, 12:30:09 PM4/10/16
to MIT App Inventor Forum

which means, if you enable automatic display rotation, the compass app then works?


No, it doesn't. The image stays still. What rotates is just the smartphone display (as expected) that shows the full image (in portrait mode) or just part of it (in landscape mode). Can a smartphone detect display rotation without an orientation sensor? Maybe using the accelerometer? 


Taifun

unread,
Apr 10, 2016, 3:18:48 PM4/10/16
to MIT App Inventor Forum
you might want to test a compass app from the Play Store
you also could do some tests using another device

Can a smartphone detect display rotation without an orientation sensor? Maybe using the accelerometer? 
I don't know

Taifun
Reply all
Reply to author
Forward
0 new messages