Welcome to Developer Portal Q&A, where you can ask questions and receive answers from other members of the community.

NullPointerException ARMediaVisualTracker getTrackingMode issue

0 votes
Hi, I'm trying ARMedia with Unity. I've downloaded the unity sdk, installed and opened the ChurchExample.
Built it on my android device (Huawei Mate 8 with Android 7.0) but when the App start, nothing happened, only the blue screen of Unity, no camera and no AR.
With adb I can see this error on log:
 
AndroidJavaException: java.lang.NullPointerException: Attempt to invoke virtual method 'com.inglobetechnologies.armedia.sdk.tracking.ARMediaVisualTracker$ARMediaTrackingMode com.inglobetechnologies.armedia.sdk.tracking.ARMediaVisualTracker.getTrackingMode()' on a null object reference
                                          java.lang.NullPointerException: Attempt to invoke virtual method 'com.inglobetechnologies.armedia.sdk.tracking.ARMediaVisualTracker$ARMediaTrackingMode com.inglobetechnologies.armedia.sdk.tracking.ARMediaVisualTracker.getTrackingMode()' on a null object reference
                                              at com.inglobetechnologies.armedia.sdk.tracking.ARMediaVisualTrackersManager.notifyVisualListeners(ARMediaVisualTrackersManager.java:373)
                                              at com.inglobetechnologies.armedia.sdk.tracking.ARMediaTrackingUnityPlugin.notifyVisualListeners(ARMediaTrackingUnityPlugin.java:175)
                                              at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
                                              at com.unity3d.player.UnityPlayer.c(Unknown Source)
                                              at com.unity3d.player.UnityPlayer$c$1.handleMessage(Unknown Source)
                                          at android.os
What am I missing?
Thanks in advance
Gabrio
asked Aug 7, 2017 by Gabrio Girardi (120 points)

1 Answer

0 votes

Try to:

- Set the correct package name (com.inglobetechnologies.ARMediaSDKUnityExample) in AndroidManifest file.

- Set the Bundle Identifier (in Player Settings -> Other Settings): com.inglobetechnologies.ARMediaSDKUnityExample.

 

For more information about this, read the README files in Assets->Examples->ARMedia and  Assets->Scripts->ARMedia.

 

By the way, in general, be sure to rename the "ARMediaSDK_AndroidManifest.xml" manifest file (in the Assets/Plugins/Android folder), to "AndroidManifest.xml".

 

Please let us know if this solves your issues.

 

Andrea

answered Aug 7, 2017 by Andrea (1,010 points)
Hi, thanks for the reply.
The package and the Bundle Identifier were already correctly like in readme.
The issue that solved my problem is rename the
 ARMediaSDK_AndroidManifest.xml to AndroidManifest.xml.
Grazie
...