Getting a black screen on Android

Include the following details (edit as applicable):

  • Issue category: Sample App aka ‘ImageDetection’
  • Device type & OS version: Android
  • Host machine & OS version: Mac M1
  • Issue Environment : On Device
  • Xcode version:
  • ARDK version: 2.1.0
  • Unity version: 2020.3.23f1

Description of the issue:
I have been trying many of the examples provided, i even followed the video to create the ball demo project. However the outcome is always the same. I get a black screen on my Android pixlel6 xl.

I have followed all the steps to publish to andoid documented on this page
https://lightship.dev/docs/ardk/ardk_fundamentals/building_android.html

I am always getting the same error in the log window which is
session_lite_c_api.cc:45] operator(): session was passed NULL.

Looking online it seems it is a problem with not being about to access the Arcore. I did add the extra parameter in the manifest tough.

I don’t know what else to try. please help.

Seb

me too…i am having the same issue but alot more errors

  1. Update the unity engine to the latest 2020 or 2021 lts.
  2. Do you use the URP? If so, did you follow the steps for that?

Hello,

I upgraded to 2021.3.8 (Silicon, LTS) on Sunday and the outcome is the same.

I do not use URP. I am currently only trying to run the project provided by Niantic. Currently ImageDetection.

The screen is black, i am not getting the camera feed, when I press the the run button in the app the screen become all funky. And I get the error message reported in my first post.

S

Have you removed Vulkan API from Graphics APIs (in player settings)?

Yes I did here is the screenshot of the setting panel. I have tried many things but the output is always the same.


@sebastien
please share the hierarchy window

As I said I am not doing anything fancy i am just trying to run the examples at the moment.
I am trying to run the detection example

Everything looking good, Verify that the contents you added inside the androidManifest file are in the correct order and format

not sure what else i should ass to the manifest other than the file line about ar core that is documented in the lightship documentation. Please advise

<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.unity3d.player"
    xmlns:tools="http://schemas.android.com/tools">
    <application>
        <activity android:name="com.unity3d.player.UnityPlayerActivity"
                  android:theme="@style/UnityThemeSelector">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
        </activity>
    </application>
    <queries>
        <package android:name="com.google.ar.core" />
    </queries>
</manifest>

what am i missing? shall upload the zip project somehere? for someone to validate the setting?

S

Hello,
I think you are missing to add Android Permission to have access to the android device’s camera.
Create a new empty object, in that object, add the Android Premission component, then click “+” and add the camera.

OMG, it is now working.

@NianticBrian @Niantic_Alicia
Please review your android documentation (Building ARDK Apps for Android — Niantic Lightship Augmented Reality Developer Kit release-2.2 documentation)

I have almost given up

thanks sergio!

Hi Sebastien,

Glad you were able to get this issue resolved! Thanks for the callout regarding the Android permission requester component and our Building for ARDK Apps for Android doc. We will be sure to put in a request to have this updated.

This topic was automatically closed 2 hours after the last reply. New replies are no longer allowed.