Genymotion + CWAC Camera - android-camera

Has anyone gotten the CWAC Camera (https://github.com/commonsguy/cwac-camera) to work with a Genymotion emulator (http://www.genymotion.com/)?
I can't get the preview to actually start. It works fine on a regular device. Would be awesome if I could get it working for the sake of speeding up development.

Did you enable the camera feature?
To do so you need to open the camera widget and then enable it as shown here:

Related

Detect if device auto orientation mode turned on or off in Flutter

I'm working on this app that uses a video player. In here I use 2 main options to change the orientation of the player, which are the fullscreen button, and the auto rotation feature (changes according to device orientation). For this I'm using 2 libraries,
Auto orientation and
Native device orientation
The functionality works perfectly fine, when the device auto rotation mode is turned on. But it misbehaves when it is turned off. I know how to fix this issue. But can't find a suitable library for this.
So basically what I need is, I want to run a specific set of code on the condition , if the device's auto orientation mode turnes on/off. So are there any flutter libraries available to check the auto rotation status? Basically I need to detect whether it is turned on or off.
Any help would be highly appreciated :)
PS: I didn't add any code, because it's not the code I need help with. Thanks
There is a plugin for this, although it doesn't look like it's been updated in a while:
auto_rotate_get
On Android it uses this:
Settings.System.getInt(activity?.contentResolver, Settings.System.ACCELEROMETER_ROTATION, 0) == 1
I don't think it supports iOS.

Google VR SDK stuck in portrait mode

I've built the app and compiled it with VR enabled and cardboard selected as my VR device. I can install and run it on my phone (Samsung S8) BUT the in game camera is stuck in portrait mode and the yew is inverted (turning my head left turns the camera right). I have scoured the internet but still can't find a way to fix this.
I've enabled VR in playersettings and added google cardboard as my VR.
I've also disabled portrait views under orientation.
I've set the camera as both a child and parent object.
I've built the app with both cardboard and daydream selected as the VR (and each individually) but still the same issue.
I've tried forcing different higher levels of API requirement
I have added and removed GvrEditorEmulator from the project and the GvrControllerMain and no luck.
I've even flipped the camera manually by a 180 degrees and this made the view be in landscape but in this case the pitch was inverted (when I look up the camera looks down) and I haven't found a way to resolve this.
In the editor view the screen looks fine, but every time I run it on my Android phone it force starts in portrait mode and the pitch or yew is inverted.
Is there a hidden option I need to switch, does anybody have more suggestions that I could try?
You can see what the app looks like when I hold the phone i portrait mode on the link bellow (the image breaks when I try to add it to the post for some reason).
https://imgur.com/a/o80NRe4
Its worth mentioning that I'm working with Unity version 2019 2.0b2 because any other version I tried would not detect my installed Android SDK and would not let me build the project. I've tried on multiple machines and always had that problem so I'm afraid of attempting an upgrade to a newer version would break my build ability.
This seems to be a known and reported issue for Google VR SDK for unity. Its been reported on their github page.
The only possible fix is reverting back to Unity 2018.3.14f1. I did this by exporting my v2019 project, then creating a new 2018.3.14f1 version project and importing the original into it. This rebuilds the project and should avoid conflicts if you're lucky.

Emulator Camera is not working properly

I want to use the camera in one of my projects. So I'm using the camera of my emulator device but the problem is when the camera is on its show's some weird animation i.e a box is moving all over the screen. What is the solution for this?
Thanks
This is not a problem. This is the default behavior of the Emulator's Camera.
I suggest using any real device to achieve this since there is no way to "simulate camera in the Android emulator using the webcam" except by extensively modifying the Android firmware.
Source
Yes, Emulator camera cannot be used if there is no access to webcam. I have downloaded GenyMotion emulator which solved my problem.
Thank you for your support.

Google SDK Divided VR mode view

I setup the Google VR SDK in 5.6Beta Unity, everything works out smoothly. I click on the demo scene and on the play button for the first time, I got this weird stereo rendering in my game view. Anyone have any idea how to fix this?
Here is the Official fix until the next release of gvr.
https://github.com/googlevr/gvr-unity-sdk/issues/451

Half of the screen does not seem to work correctly

I am not such a professional coder but trying to code something on Unity. However, when I try to play the application in my android phone, the half of the screen does not seem to work correctly, please look at the photo: http://i.imgur.com/J7Bgn5i.png & http://i.imgur.com/aV3aeyh.png
Can you guess what the reason is for that?
Up to now, I have changed screen resolution but it did not solve my problem.
Edit: It works perfectly in my android tablet. However, as I said, I have this problem in my LG G3 android phone.
Thanks for your help!
After changing Main Camera setting according to this photo: , I have solved my problem.