How to overcome emulator's camera? - android

Each time when I try to use emulator's camera in video capturing mode - I receive:
Sorry! The application Camera (process com.android.camera) has stopped unexpectedly. Please try again.
I heard a lot of discussions around this issue, saying that emulator's camera application is buggy.
Myself tried all possible ways: used all emulators for all platforms (except honeycomb's one), tried to increase emulator heap size, tried in 32-bit and 64-bit platforms - useless. It doesn't work.
Anyway, does someone know way to fix this?

The camera is not supported by the emulator. There's some experimental solution here, with an SO question regarding it here.

Related

Android Studio screen tearing on dual monitors

I recently installed Android Studio to learn more about app development. However, I'm seeing screen tearing to such an extent that the IDE is pretty much unusable. Demonstration in the photos below:
Example showing a typical screen tear
Example showing NO tearing (same project, same editor view - captured by minimising the window, re-maximising it, then quickly taking the pic)
For the avoidance of doubt, this screen tearing is only happening within Android Studio on my Windows 10 machine. No screen tearing happens within games, editors such as Notepad++, or suchlike.
Some of the things I've tried to pinpoint the issue:
Changing my graphics card settings, back when I didn't know it was limited to Android Studio. I have a GeForce GTX 980, and various googling led me to tweaking VSync to adaptive and Triple Buffering to On in the hope it resolved the issue. I also tried changing my two identical monitors' refresh rate (connected via Display Port cables, Extended desktops) from 60hz to 59 and 50 to see if it might resolve it. No luck.
Changing many of the Android Studio appearance settings e.g. turning window animations on or off, changing the tooltip MS delay timer, turning off file synchronization/file saving on frame activation and background saving entirely, etc.
Even changing the Android Studio config e.g. -Xmx2048m instead of the default 750mb.
In terms of triggers, the issue is intermittent, but when it does start, it's there until I reboot my machine. In other words, it doesn't relate to my running a phone emulation or having a specific phone emulated, nor what other programs are running on my machine at the same time, nor if the phone "preview" screen is showing, nor if a gradle build is running in the background, etc.
Other interesting aspects that I've spotted are:
The screen tearing seems to be concentrated around where the mouse cursor or keyboard input is located, not randomly on the screen.
I think the issue is not occurring when my monitors are set to Duplicate their displays, rather than Extend. I'm not 100% sure on this yet though; I certainly haven't seen it in half hour experiment using the Duplicated monitors.
I'm now out of ideas, and ready to give up on Android Studio.
Although this feels more likely to be a hardware or graphics issue, because Android Studio is the first and only thing that I've experienced issues with, I was hoping someone else may have an answer about what else to try.
I was having this issue as well on Android Studio 2.0. I fixed by disabling G-Sync on my Nvidia GTX980
See Android Issue Tracker http://code.google.com/p/android/issues/detail?id=189308 ("Screen garbled / messed up when repaint on 1.4").

OpenCV JavaCamera bug? (OpenCV 4 Android on Nexus 7)

I downloaded the samples from OpenCV for Android and let them run in eclipse on a real device (Nexus 7). They all work fine, but when I'm looking at the LogCat log, I see ca 20 errors displayed for each frame. The log is filled with them. Although all the samples work, this irritates me and makes it hard to debug the code.
Here a screenshot of the log:
Does anyone know where these errors come from and what they mean?
Should I worry about them, if no: can I somehow hide them? if yes: what to do?
Another question:
I get, when running the JavaCameraView idle (Sample CameraPreview) only 15fps max. This is few, isn't it? Or is this always like this when using OpenCV with Java (over JNI) instead of c++?
Thanks in advance for any hints!
Isa
The next OpenCV version will fix a few camera bugs, maybe it fixes those messages. There is one specific to Nexus 7 2013, but looks different from yours.
JavaCamera is usually slower than NativeCamera but more stable (less buggy). But it also depends from other factors like ambient light (less light = slower), chosen resolution.

How to take a good quality screenshot on emulator?

I don't have a tablet but I wanted to take screenshots from the emulator for display in Google Play. I did that using Eclipse (using the method given in the top answer here How to take emulator screenshots using Eclipse?) but the screenshots are not good quality: the image is broken (some areas are kind of shifted) in at least one spot each time I take a screenshot.
Is there any better way to do it?
According to this answer that is an emulator issue. To solve this, you need to enable the 'use host GPU' setting when creating an emulator, according to another answer.
I would use the DDMS shipped with ADT (also listed as Debug monitor) and choose the device and app, then click that camera icon. It creates very good looking screenshots.
I also got some rendering errors with the emulator... It's best with actual devices. You can also try if other images/emulators perform better.

Adreno200-EGLSUB: <ConfigWindowMatch:2087>: Format RGBA_8888 issue with Motorola Defy device

I have been facing strange issue in my one of Android application with Motorola Defy device. I have been testing the same application on HTC and Samsung devices and it is running perfectly without any issue, however when I test it with Motorola device, it starts getting crashes.
All log files shows Adreno200-EGLSUB: : Format RGBA_8888 error. Let me add one more thing that I am using SurfaceView and surfaceHolder class.
Could anyone know what possible reasons might be and it can be sorted out?
Thanks in advance.
I met the same problem, I tried to set
getWindow().setFormat(PixelFormat.RGBA_8888);
But still returned the same problem. I run on several thousands times, no further error was shown related to this one.
According to answers Device specific error - s3dReadConfigFile "Can't open file for reading."
It will not affect the use of your application
i have it too,
just unlock your phone, and make it ready to use.
than run your app from software (Eclipse - in my case).

camera issue in emulator 2.2 in android

i am suffering with a problem that in android 2.2 emulator, camera doesn't work. it closes down the camera automatically. But this problem is not happening in android 1.5 emulator.
Why it is happening? can any body help?
This is a known issue and has been asked several times on SO - here are some pointers to possible solutions. However, the camera emulation in 2.2 is known to be buggy:
Removing the stencil buffer
Switching to 2.1 or 2.3
So you have two options: Either you try to follow the directions, given by the correct answer in the first thread or switch to an emulator running on either 2.1 or 2.3+.

Categories

Resources