Log in or register to post comments

Androd Sample app showing black screen instead of camera

October 8, 2017 - 6:19am #10

Running Samples from Android Studio ( Android Code Not Unity)

 

Tools - Vuforia 6.5

Devices - MotoCPlus (7.0) , MotoG5 Plus (7.0)  , LG Nexus 4 (6.0) 

Problem : Black Screen when launching any sample 

 

Here is How I m Building the sample :

1. open vuforia samples in android studio.

2. Add vuforia.jar , arm64-v8a and armeabi-v7a folders in libs folder

3. In build.gradle change dependency to  - compile fileTree(dir: 'libs', include: '*.jar')

4. Add development key in Vuforia.setInitParameters(mActivity, mVuforiaFlags, key);

5. After running the project , on launching app I see list of option , on clicking any option I found black screen instead of camera.

 

On Logging App :

I found app is not going after this line Vuforia.setInitParameters(mActivity, mVuforiaFlags, key); and it seems onPostExecute is not called or app hangs.

 

Solutions Tried :

1. Check any space in key

2. Thought in Marshmallow and Nouget , permission issue should be there and app was not asking for any permissions. So put the permission check code.

3. Checked on Multiple phones

 

Please Note : (This seems to be an issue as the app is not requesting any camera permissions)

Vuforia::init will now request the camera permissions via a system dialog on applications targeting Android M and above.

 

 

I request you to please help me out urgently. I last created an AR app 2 year back using vuforia and I didn't face any issue then.

 

Androd Sample app showing black screen instead of camera

October 8, 2017 - 7:10am #9

Ok, 

I am able to run.

Just copy all samples in vuforia sdk samples folder and copy your vuforia sdk folder at same path to android sdk folder.

 

Androd Sample app showing black screen instead of camera

November 4, 2017 - 3:07pm #8

vinny92,

I am having exactly the same problem as you did. Can you please give a more detailed explanation on how you managed it to work?

Thanks!

 

Androd Sample app showing black screen instead of camera

March 7, 2018 - 12:58am #7

Hi Vinny,

I am facing the exact same problem. Have u found a solution for this?

Thanks in advance!

Androd Sample app showing black screen instead of camera

March 21, 2018 - 7:04am #6

I am also facing what seems to be the same problem.

I have been able to recreate this using a simple project.

I have created a simple project in Unity 5.6.3p1 using the Unity Package for Vuforia 6.2.10

I created a scene with an AR Camera and an ImageTarget with a cube as an object. I built it and deployed on the J5, resulting in a black screen, while the same build did work on another device.

After that I upgraded said project to Unity 2017.3.1p1 (with all the hassle; I suspect creating a new project straight up in 2017.3.1p1 would have had the same result)

The result is a black screen.

I really hope the Vuforia team will give some reaction about this issue. If only it was a way to pinpoint what devices are incompatible.

I am looking forward to a reaction and solution, thanks!

Androd Sample app showing black screen instead of camera

March 27, 2018 - 2:21pm #5

I'm also having black screen problem when imported to android studio library (but before converted to library project it's work fine in android studio tho)

Androd Sample app showing black screen instead of camera

May 1, 2018 - 5:42am #4

Does anyone has a fix for this problem.

 

Tried to place the samples into sdk/samples folder (which I created), but no success.

 

Greetings, Sven

Androd Sample app showing black screen instead of camera

June 21, 2018 - 5:13pm #3

I'm having the same problem when imported as AAR. If I export as android project, there's no problem, it runs fine from Android Studio, but when exported as library, camera's always black.

Did you solve this problem?

Androd Sample app showing black screen instead of camera

June 30, 2018 - 2:02pm #2

I was having the same problem but even farther from figuring out what was going wrong. I then saw veit270's post here (https://developer.vuforia.com/forum/unity-extension-technical-discussion/black-screen-after-loading-ar-scene#comment-64407) about the ARCamera working when it is the first scene after the Unity splash screen and try that. IT FINALLY WORKED! I then was able to create a work around for this problem by putting the ARCamera on the first scene and making a script do a DoNotDestroyOnLoad(ARCamera) for the ARCamera GameObject. I then can load my scene I want and the camera is NO LONGER BLACK. Make sure you make the ARCamera some kind of singleton so DoNotDestroyOnLoad(ARCamera) only gets called once or you will have multiple ARCameras in your scenes and funky things start happening.

Androd Sample app showing black screen instead of camera

November 14, 2018 - 1:12am #1

VuforiaWrapper.aar should also be included as a module.

Then settings.gradle will be updated as

include ':app', ':VuforiaWrapper'

Also include the dependency for vuforia explicitly

dependencies {

    implementation project(':SampleProject-release') // release aar of the unity project

    implementation project(':VuforiaWrapper')

    implementation fileTree(dir: 'libs', include: ['*.jar'])

}

Log in or register to post comments