Log in or register to post comments

Android 4.2.2 No Camera Display

February 22, 2013 - 12:56pm #1

I had an app working based on Image Target example. It did everything great on a Google Nexus 4 with Android 4.2.1. But after updating to 4.2.2 it won't display the camera's image but it will still track and display the models. I've tried the unmodified example and it's the same thing. 

Android 4.2.2 No Camera Display

October 14, 2013 - 7:49am #28

Hi folks

first time I post here :D

quick presentation of me, myself and I

me : was a student in 5th year of study, with a intership of 6 months, whose 3 months w/ Vuforia, then a break of 3 months,

myself : has got a job in the same company, until 31 January

and I : will enrol for a PhD, more or less w/ augmented reality

---

Like some other, I've got a pb of black background comming from the camera, which wasn't post-rendered.

I hadn't that pb with Unity 4.0 & Vuforia 2.0.7

Now with Unity 4.2.0 I got pb, but upgrading Vuforia to 2.6.7 (for Unity !) solved the problem of black background.

 

for developer (not using Unity), you should try using the last version of Vuforia.

The pb I had was because some applications didn't wanted to work on 3 smartphones (recent ones)

So I supposed that both Unity & Vuforia mades updates for such phones

 

---

Do you know why Vuforia 4.6.10 doesn't exist for Unity ? although exists for iOS & Android dev ?

 

CU

Android 4.2.2 No Camera Display

September 4, 2013 - 1:53pm #27

Which devices and OS versions are you seeing this on, and is it specific to 4.1.3?

Does the rendering corruption appears at tiling - i.e. as though the same image is repeated across the screen?

Android 4.2.2 No Camera Display

September 4, 2013 - 1:49pm #26

We recently encountered the same problem. We where able to fix it with somewhat of a hack. What you have to do is when the application comes back from being paused render a new object in the cameras view.

Very basic code were we enable an object when we come back. The object sits right in front of the camera. 

void OnApplicationPause(bool pauseStatus) 
	{
        if (pauseStatus)
		{
			test.gameObject.SetActive(false);
		}
		else
		{
			test.gameObject.SetActive(true);
		}
    }

 

Android 4.2.2 No Camera Display

May 24, 2013 - 2:05am #25

Hi, 

 

I have tried the new Unity version  :  4.1.3   but i have again my problem : 

"When i launch the application, and use it, it is ok.. But then, if a press the home button... And then, restart the application (which is again started in background...) the camera does not work... it display me lot of bad graphics elements...  like if the camera does not reinitialize correctly."

Android 4.2.2 No Camera Display

May 24, 2013 - 1:16am #24

Indeed, Unity 4.1.3 has now been released and the black screen (32 bit buffer) issue on Nexus / Android 4.2.2 is solved.

Android 4.2.2 No Camera Display

May 24, 2013 - 1:00am #23

AlessandroB wrote:

Hi all,

this issue should be fixed in the upcoming Unity 4.1.3 release, which is expected very soon; check this Thread for updates or check the Unity website for the official release.

Hi,

Just to confirm I've just downloaded  Unity 4.1.3 and it definitive fixes the OpenGL 32 bit buffer issue with the Nexus 4.

Hurray!! :-D

 

Android 4.2.2 No Camera Display

May 2, 2013 - 2:26am #22

Hi Alessandro,

Thanks for your answer. When you say this issue should be fixed.. What issue do you speak about ? 

The black screen of the Nexus 4 ...?  Or my other problem of very strange screen of the camera when i press home and go back to the application... ?

 

I hope it will solve both !!

 

Bye

Android 4.2.2 No Camera Display

May 2, 2013 - 2:17am #21

Hi all,

this issue should be fixed in the upcoming Unity 4.1.3 release, which is expected very soon; check this Thread for updates or check the Unity website for the official release.

 

Android 4.2.2 No Camera Display

May 1, 2013 - 11:55pm #20

Thanks a lot, it works...

 

But i have another problem with the nexus 4... 

 

When i launch the application, and use it, it is ok.. But then, if a press the home button... And then, restart the application (which is again started in background...) the camera does not work... it display me lot of bad graphics elements...  like if the camera does not reinitialize correctly.

 

An idea please?

Android 4.2.2 No Camera Display

April 29, 2013 - 10:25am #19

As I said before, try uncheking the 32bit and 24bit display buffer options in the Player Setting pane in Unity.

This worked for me. :)

Android 4.2.2 No Camera Display

April 29, 2013 - 10:04am #18

Try changing the display buffer settings in Player Settings first. If that doesn't work, you may be able to disable blending using the GL class - http://docs.unity3d.com/Documentation/ScriptReference/GL.html

Android 4.2.2 No Camera Display

April 29, 2013 - 8:40am #17

Hi,

 

you say "LG Nexus4 (4.2.2): no camera/black background, fixed by disabling blending."

 

Can you explain more precisely please how to solve this problem for the Nexus4 ?

I begin in vuforia and unity and i don't understand how to "disable blending.."

 

Excuse my bad english, i am french ! 

Thanks a lot

 

Bye
 

Android 4.2.2 No Camera Display

April 2, 2013 - 4:34am #16

chnt wrote:

Yes,

  • Galaxy Nexus runs (4.2.1) - also tested on (4.1.2): same result, no problemo. camera shows fine and overlay draws fine
  • LG Nexus4 (4.2.2): no camera/black background, fixed by disabling blending.
  • HTC One-X (4.0.4): no camera/black background, fixed by disabling blending.

Both of these had the camera running and working, as the targets got recognized just fine, it was just that the camera did not get drawn.

Cheers
Christian

But how do you do this within Unity? (e.g which parts of the script, or editing the generated code in eclipse?)

1
GLES20.glEnable(GLES20.GL_BLEND);
1
GLES20.glDisable(GLES20.GL_BLEND);

For the record, I solved it as others have said: just workaround it by uncheking the 32bit and 24bit display buffer options in the Player Setting pane in Unity. 

Edit: This thread here might be related (not with Vuforia but with Unity on Android in general): 
http://answers.unity3d.com/questions/131195/destination-alpha-blending-on-android-device.html

Regards,
B.

Android 4.2.2 No Camera Display

March 25, 2013 - 9:18am #15

Yes,

  • Galaxy Nexus runs (4.2.1) - also tested on (4.1.2): same result, no problemo. camera shows fine and overlay draws fine
  • LG Nexus4 (4.2.2): no camera/black background, fixed by disabling blending.
  • HTC One-X (4.0.4): no camera/black background, fixed by disabling blending.

Both of these had the camera running and working, as the targets got recognized just fine, it was just that the camera did not get drawn.

Cheers
Christian

Android 4.2.2 No Camera Display

March 25, 2013 - 6:50am #14

Interesting - are you running a 4.X Android version as well?

Android 4.2.2 No Camera Display

March 25, 2013 - 3:02am #13

I found a solution to my own blackscreen problem:

I got no black on a galaxy nexus, but on a nexus4, the camera was black.
The Solution:

Disable blending! If you have a transparent model or need blending in the overlay, you can enable blending before you start drawing the foreground - just remember to disable blending afterwards. 

GLES20.glEnable(GLES20.GL_BLEND);
GLES20.glDisable(GLES20.GL_BLEND);

I am not sure, but i think it could be the camera's fault: different phones has different cameras, and perhaps some uses a 24bit color format, which doesn't have an alpha channel, while some uses 32bit. If the alpha channel would get filled with zeros - it would be completely transparent, and only the background color would be displayed. By disabling blending, the alpha channel is not regarded, and only the rgb values are drawn.

Hope this can help others.

cheers
Christian

Android 4.2.2 No Camera Display

March 23, 2013 - 8:43am #12

Thanks for the report. Which Unity version are you using?

We've isolated the Nexus 4 issue to builds from Unity 4 and 4.1, and have engaged Unity on this problem.

Please test our Background Texture Access sample on affected devices. This renders the camera image to a texture in the Unity scene and is a workaround for the N4 problem. It will also help us to isolate the issues affecting these other devices.

Android 4.2.2 No Camera Display

March 23, 2013 - 4:26am #11

I think this is a wider issue, not related to Android 4.2.2.

I'm experiencing the exact same problem with my app on some devices, so far 2 devices had this problem out of many that I tested. My app works perfectly on a Galaxy Nexus using 4.2.2, but has this issue on other devices.

I have found that I can temporarily solve this issue by checking the "Disable Hardware Overlays" option in the Developer Options. Hope this helps someone else.

 

Here is an example: a Galaxy S3 running Android 4.1.1 has this issue where the camera view is black, but a different S3 running 4.1.2 works great.

NON WORKING DEVICE:

- Device Model: Galaxy S3
- Model Number: SGH-I747
- Android Version: 4.1.1
- Basband version: I747UCDLK3
- Kernel Version: 3.0.31-274808
- se.infra@SEP-103 #1
- Build number: JRO03L.I747UCDLK3

WORKING DEVICE

- Device Model: Galaxy S3
- Model Number: GT-I9300
- Android Version: 4.1.2
- Basband version: I9300JKELK4
- Kernel Version: 3.0.31-566833
- se.infra@SEP-64 #1
- Build number: JZO54K.I9300XXELL4

I haven't had a chance to update both devices to run the same OS version so I can confirm my theory, but I'm pretty sure this issue is more than just OS version.

Android 4.2.2 No Camera Display

March 18, 2013 - 12:06am #10

Hi haitzika,

 

u got solution of camera issue in Samasung Galaxy Grand (I9082) (Android OS, v4.1.2 (Jelly Bean)) ? if yes then please help me..

 

Thanks

 

Android 4.2.2 No Camera Display

March 14, 2013 - 4:22am #9

Yes, same problem, what really bothers me is that, when I hold the power button and the window with "switch off" and "airplane mode" options appear on the front, my app works in the back, and I get the image from the camera and the trackables working....It's giving me a big headache!

Android 4.2.2 No Camera Display

March 14, 2013 - 3:37am #8

This does seem to be an extension of the same problem I'm having, I'm sort of relieved it's not just me. Interesting extra information about the NGUI layer being clipped though.  Have you tried just their sample scene, that's what I went back to and still identical problem with that.

Android 4.2.2 No Camera Display

March 13, 2013 - 1:23am #7

 

I would like to report a very similar issue. 

I am using a Nexus 4 as device, with Android 4.2.2, Unity 4 and Vuforia 2.0.31.

In order to clarify a bit more the problem, here is the description: when I run my application I get a black screen after the splash screen. I can not see the Camera view on my app. However, everything works. When I find a trackable, the hidden objects show. In my app, OnTrackingFound() launches a small animation of a car moving and entering the scene. After 5sec it stops and a menu is shown. This menu uses NGUI. The depth value of the NGUI Camera is put to be rendered on top, but what I get is my menu masked by the objects.

This is what I see in my app with Nexus 4:

 

This is what should be seen (and is seen in a Samsung Galaxy SII or any other device I have tryed):

In addition to this, when I use the Dalvik Debug Monitor to capture screen shots, I get the correct image in all devices. Same, when I tap the "menu" key or hold the "power" hardware button of my Nexus 4 and let the switch off menu be shown, I can see the camera view working correctly in the back.

I copy here a piece of the log that may be useful:

03-12 19:13:09.606: D/QCAR(665): cameraDeviceInitCamera
03-12 19:13:09.606: I/AwesomePlayer(161): setDataSource_l(URL suppressed)
03-12 19:13:09.616: D/overlay(158): Set pipe=VG0 dpy=0; 
03-12 19:13:09.656: I/AwesomePlayer(161): setDataSource_l(URL suppressed)
03-12 19:13:09.726: I/CameraClient(161): Opening camera 0
03-12 19:13:09.776: E/qcom_sensors_hal(531): hal_process_report_ind: Bad item quality: 11 
03-12 19:13:09.806: E/mm-camera(222): sensor_load_chromatix: libchromatix_imx111_preview.so: 30
03-12 19:13:09.876: D/overlay(158): Unset pipe=VG0 dpy=0; 
03-12 19:13:09.916: E/mm-camera(222): vfe_ops_init: E
03-12 19:13:09.926: E/mm-camera(222): vfe_legacy_stats_buffer_init: AEC_STATS_BUFNUM
03-12 19:13:09.926: E/mm-camera(222): vfe_legacy_stats_buffer_init: AEC_STATS_BUFNUM
03-12 19:13:09.926: E/mm-camera(222): mctl_init_stats_proc_info: snap_max_line_cnt =30096
03-12 19:13:09.986: D/QCAR(665): cameraDeviceGetVideoMode
03-12 19:13:09.986: D/QCAR(665): cameraDeviceSelectVideoMode
03-12 19:13:10.036: D/dalvikvm(665): GC_CONCURRENT freed 428K, 10% free 9775K/10752K, paused 5ms+3ms, total 24ms
03-12 19:13:10.056: D/QCAR(665): cameraDeviceStartCamera
03-12 19:13:10.076: D/dalvikvm(665): GC_FOR_ALLOC freed 181K, 10% free 9774K/10752K, paused 18ms, total 18ms
03-12 19:13:10.076: I/dalvikvm-heap(665): Grow heap (frag case) to 10.126MB for 580112-byte allocation
03-12 19:13:10.106: D/dalvikvm(665): GC_FOR_ALLOC freed 566K, 14% free 9774K/11320K, paused 24ms, total 24ms
03-12 19:13:10.136: D/dalvikvm(665): GC_CONCURRENT freed 2K, 14% free 9774K/11320K, paused 4ms+2ms, total 29ms
03-12 19:13:10.136: D/dalvikvm(665): WAIT_FOR_CONCURRENT_GC blocked 26ms
03-12 19:13:10.136: I/dalvikvm-heap(665): Grow heap (frag case) to 10.127MB for 580112-byte allocation
03-12 19:13:10.146: D/dalvikvm(665): GC_FOR_ALLOC freed <1K, 9% free 10341K/11320K, paused 15ms, total 15ms
03-12 19:13:10.176: D/dalvikvm(665): GC_EXPLICIT freed 1K, 9% free 10342K/11320K, paused 1ms+2ms, total 26ms
03-12 19:13:10.176: E/QCameraHWI(161): android::status_t android::QCameraHardwareInterface::setPreviewWindow(preview_stream_ops_t*): mPreviewWindow = 0x0x410f9b60, mStreamDisplay = 0x0x400b76c8
03-12 19:13:10.176: D/QCameraHWI(161): android::status_t android::QCameraHardwareInterface::startPreview():  start preview now
03-12 19:13:10.176: I/QCameraHWI(161): android::status_t android::QCameraHardwareInterface::startPreview2():Setting ZSL mode
03-12 19:13:10.176: E/mm-camera(222): config_proc_CAMERA_SET_INFORM_STARTPREVIEW
03-12 19:13:10.176: E/mm-camera(222): config_update_stream_info Storing stream parameters for video inst 1 as : width = 800, height 480, format = 1 inst_handle = 810081 cid = 0
03-12 19:13:10.186: E/mm-camera(222): config_update_stream_info Storing stream parameters for video inst 3 as : width = 640, height 480, format = 1 inst_handle = 830083 cid = 0
03-12 19:13:10.186: E/mm-camera(222): config_update_stream_info Storing stream parameters for video inst 4 as : width = 512, height 384, format = 1 inst_handle = 840084 cid = 0
03-12 19:13:10.196: E/mm-camera(222): config_decide_vfe_outputs: Ports Used 3, Op mode 1
03-12 19:13:10.196: E/mm-camera(222): config_decide_vfe_outputs Current mode 0 Full size streaming : Disabled
03-12 19:13:10.196: E/mm-camera(222): config_decide_vfe_outputs: Primary: 800x480, extra_pad: 0x0, Fmt: 1, Type: 1, Path: 1
03-12 19:13:10.196: E/mm-camera(222): config_decide_vfe_outputs: Secondary: 640x480, extra_pad: 0x0, Fmt: 1, Type: 3, Path: 4
03-12 19:13:10.196: E/mm-camera(222): config_update_inst_handles Updated the inst handles as 810081, 830083, 0, 0 
03-12 19:13:10.337: E/mm-camera(222): sensor_load_chromatix: libchromatix_imx111_zsl.so: 26
03-12 19:13:10.427: E/mm-camera(222): camif_client_set_params: camif has associated with obj mask 0x1
03-12 19:13:10.427: E/mm-camera(222): config_v2_CAMERA_START_common CAMIF_PARAMS_ADD_OBJ_ID failed -1 
03-12 19:13:10.427: E/mm-camera(222): vfe_operation_config: format 3
03-12 19:13:10.427: E/mm-camera(222): vfe_operation_config:vfe_op_mode=5
03-12 19:13:10.427: E/mm-camera(222): Invalid ASD Set Params Type
03-12 19:13:10.427: E/mm-camera(222): vfe_set_bestshot: Bestshot mode not changed
03-12 19:13:10.457: D/QCAR(665): markerTrackerStart
03-12 19:13:10.457: D/QCAR(665): imageTrackerStart
03-12 19:13:10.457: D/QCAR(665): cameraDeviceGetVideoMode
03-12 19:13:10.487: E/mm-libcamera2(161): PROFILE HAL: First preview frame received: 1363111990.499583509
03-12 19:13:10.487: E/BufferQueue(665): [unnamed-665-7] dequeueBuffer: min undequeued buffer count (2) exceeded (dequeued=6 undequeudCount=0)
03-12 19:13:10.577: E/BufferQueue(665): [unnamed-665-7] dequeueBuffer: min undequeued buffer count (2) exceeded (dequeued=5 undequeudCount=1)
03-12 19:13:10.647: I/Unity(665): Num trackables detected: 1
03-12 19:13:10.647: I/Unity(665):  
03-12 19:13:10.647: I/Unity(665): (Filename: ./Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 43)
03-12 19:13:10.647: I/Unity(665): Trackable target_1 found
03-12 19:13:10.647: I/Unity(665):  
03-12 19:13:10.647: I/Unity(665): (Filename: ./Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 43)

Thank you for your help

Android 4.2.2 No Camera Display

February 25, 2013 - 4:54pm #6

Do you have a runtime log from the app session? I haven't had a chance to test the APK yet.

Android 4.2.2 No Camera Display

February 25, 2013 - 4:53pm #5

Did you manage to look at my logs and apk? I keep trying with the same result. Works fine on my android 2.2 phone but no camera view still on the nexus. I tried shutting down any other running apps too.

Android 4.2.2 No Camera Display

February 22, 2013 - 4:37pm #4

We've had a chance to test on a Nexus 4 running 4.2.2 and haven't seen a problem. Can you send me a build and run log for that device? - pls see my PM

Android 4.2.2 No Camera Display

February 22, 2013 - 2:24pm #3

It's the latest Vuforia SDK 2.0.30, and the latest Unity Pro with Android Basic license. 4.0.1. I just tried updating the the Android SDK on my machine, just in case, but still same issue. Build on a Windows 8 64 bit machine. 

Android 4.2.2 No Camera Display

February 22, 2013 - 2:18pm #2

Thanks for the report. Is this using the current Unity extension or the 1.5 version? Also which version of Unity did you use to build the APK?

Log in or register to post comments