This issue seems to occur on some Android devices, notably the Kindle Fire. I'm currently developping an app that runs in Landscape Right and Landscape Left modes, but it seems on some Android devices it starts up on one side then cannot be rotated afterwards.
I'm using Unity 4.3.4f, and my settings are set to support both landscape modes and is set on Auto-Rotation.
Also, I've made sure the problem isn't about the auto-rotation being locked on my device, so it must be something related to my app settings.
Any reason this works on some devices and not on others ?
Note : This issue doesn't occur on iOS devices.
UPDATE : This issue occurs only sometimes on some devices. Sometimes rotation will work fine, other times it just will stay stuck in one direction. Same build, upon killing the app and restarting it may work. Kinda confused as to why this is happening !
Check if in this devices you dont have the rotation blocked in settings.
Related
I'm currently experiencing extremely strange behavior with Google Daydream on my Pixel 3 (Android 9 Pie). I simply load one of the Daydream demo scenes in Unity. A couple of months back, when I was first playing around with GVR everything worked fine.
However I just reinstalled the project and somehow the Daydream orientation is rotated by 90 degrees per default, which basically makes every application unusable if no additional correction is performed after initializing the application.
The following image should show the behavior I mean.
The Unity project is set up to only allow Landscape Left device orientation which is the default orientation for Daydream applications. Also auto-rotation is enabled in Android. Which should basically lead to a correct initialization of the application.
Might this be some internal Android issue? Or is there any global unity option that I might be missing here?
EDIT:
I couldn't figure out why the error occurred. A hard reset of the device was my final 'solution'.
The shortcuts for putting the Android emulator into landscape view do not work for me. Searching through related questions I see a lot of information about an old bug where the emulator would change orientations, but the rotation event would not be triggered. However, this is different, my emulator won't even change orientation (the keyboard shortcuts do nothing).
Attempting to turn off the portrait orientation in the emulator manager also does nothing, nor do any of the QEMU options relating to the display size (eg. I can't start it in fullscreen or change the geometry of the display at all).
This happens with both a 4.4 image or a 5.0 image. Keyoard support is on and works in general.
Is this a known issue, or is there some trick to getting newer versions of the Android Emulator to change orientation at all?
this is my first post so please correct me if I do any mistake regarding rules :-)
Heres my problem:
I am trying to set a fixed screen rotation for all Apps on an Android device
(not just my App). I searched a lot but found only solutions for single Apps.
I had the following Ideas:
1) Use the API ==> seems not possible
2) Change accelerometer values ==> seems not possible
3) virtually open a hardware keyboard ==> seems not possible
Turning off autorotation keeps all Apps in portrait mode, but I would like all
Apps to be in landscape mode.
Can anybody help me please?
At least for Android 4.2. (Nexus 7) you can hold device in landscape mode and then disable autorotation. Afterwards all apps work in landscape mode.
At first I thought this was a problem with my app, but it seems to be happening in any app (though interestingly, not the home screen) in the gingerbread emulator.
To replicate my issue, open eclipse and fire up the android emulator for gingerbread (I'm using the "Google APIs - API Level 9" as my target)
So the procedure to duplicate once the emulator loads is
press LCtrl-F11 to shift orientation to landscape, then again to switch to portrait
Result:
In the homescreen:
The view rotates to landscape, and then back to portrait, as expected
In any app (i've tried browser, calculator, maps, and the app i'm currently working on):
the view rotates to landscape, and then nothing, it stays in landscape even the emulator is displaying the phone in landscape mode (see below)
Has anyone else had this issue, or have I installed the emulator in some incorrect way - this hasn't been an issue with any of the previous emulators
This is a bug with the Android emulator running 2.3.x. Bug is already acknowledged here
Actually, I have run into that problem occasionally before, though it does seem to get progressively worse with each passing tools release. There is nothing wrong with your installation or how you are using the program, AFAIK. You might try using Ctrl-F12 to switch back rather than Ctrl-F11 and see if that improves matters. I think the problem may stem from the emulator trying to emulate four-way orientation, but that is just a guess.
I just got stuck with the same problem in my own application. The app always stays in lanscape mode after using the camera. The only workaround I found is to click on the home button (emulator changes to portrait mode) and then click again on my application to get back to it also in portrait mode.
Did anybody report that bug already?
(Gingerbread emulator, Eclipse 3.5.x, Android Development Tools 8.0.1.v201012062107-82219)
Our application could support landscape mode without any problem, but it is such a pain that we are thinking about forcing portrait mode.
Question: Is it BAD?
The main problem is that changing orientation generates random crashes on many screens. Avoiding those crashes would potentially allow us to spend more time on the core aspects of the app. Will the same crashes happen when users switch apps anyway?
Also, are there landscape-oriented devices where our app will become useless?
There is one area that might be unforgivable.
If a user interacts a lot with your app using a virtual keyboard, you should be vary of one thing:
There are emerging Android phones with a sliding physical keyboard that's meant to be used only in landscape mode. An example of such a device is a HTC G1.
Since such Androids are usually a premium, their users are very proud of having a physical keyboards. And if your app doesn't allow them to use their keyboard when they can use it, they will hate your guts for it and they might even give you negative ratings on Android app. market. Yes, it sounds cruel, but that's life.
Otherwise, having a portrait mode only application that runs well and isn't buggy is more than acceptable.
Moral of the story: try to make as many of your customers happy as possible. You won't always succeed, but you might fail if you piss even a minority of them off.
An unstable app or an app with a poorly thought out, landscape-unfriendly UI is much worse than an app with is limited to portrait.
There are probably some devices where a portrait-only application would be unwieldy, but the majority would handle it ok. Your best bet is to limit the orientation until the Android landscape or your business priorities make it more important to support those devices.
The crashes are probably caused by the activity restarting when changing orientation. With a configuration change you can prevent that without forcing the app to be in portrait mode all the time. Add the config changes line and it will prevent the activity from restarting.
<activity
android:name=".active.help.HelpMenu"
android:label="#string/help_string"
android:configChanges="keyboardHidden|orientation">