Try MAXST AR Fusion Tracker Now ✨
List
AR Camera not loading when unity project added to android project as a library
Posted Date: 2020-03-20 11:30     Edited Date: 2020-03-24 1:10     Writer: venolig

Development details:

1. SDK Version: 5.0.1
2. Development Environment: (eg. Unity-Android, Unity-iOS, Native Android, Native iOS): Unity-Android
3. Tracker/Scanner: Instant tracker
4. License Type(Free / Pro-One Time Fee / Pro-Subscription / Enterprise): Free
5. Target Device(Optional): Huawei nova 3i

When I create the sample app using the instant tracker in unity it works well. Also, it works in android platform. But when I add the same project to android native app as a library it only shows the UI button, not the ar camera.

 

Unity app - android platform

Unity app - android platform

 

After added to android native project as a library

After added to android native project as a library

Posted Date: 2020-03-23 5:24     Edited Date: 2020-03-23 5:24     Writer: sjkim

Thanks for your interest to our MAXST AR SDK.

 

What is library did you add to Android Native App?

We can not understand your exact problem with only text.

Thanks.
 

Francisco
MAXST Support Team

Posted Date: 2020-03-23 6:25     Edited Date: 2020-03-23 6:25     Writer: venolig

Here are the steps I followed.

1. Create instant tracker example with unity. (figure 1)

2. Export this project (android platform)

3. Import the exported project in android studio.

4. Build the project and create aar.

5. Create another Android project(native).

6. Add the aar to it as a library

7. When clicks a button in the native project it will call the unity view in the library (figure 2)

The aar created and added as in this article

Thank you!

Posted Date: 2020-03-23 7:44     Edited Date: 2020-03-23 7:44     Writer: sjkim

MAXST AR SDK does not support importing to Android Studio after extracting from Unity 3d to Native Android project.

 

If you wanna develop Native Android. 

Please download a MAXSTARSDK_Android_5.0.1.zip file.

https://developer.maxst.com/MD/downloadsdk

 

Thanks.

 

Francisco
MAXST Support Team

Posted Date: 2020-03-23 12:03     Edited Date: 2020-03-23 12:03     Writer: venolig

Can add any 3d object (any file type .obj, .sfb, etc) to the MAXSTARSDK_Android sample project? Is there any direct way to render 3d objects without making classes for each object?

Posted Date: 2020-03-24 1:06     Edited Date: 2020-03-24 1:10     Writer: sjkim

We don't support 3D models(obj, fbx, etc) on Native Android.

Therefore, you need to import the 3D model directly through the obj loader or fbx loader.

Also, you can draw 3D models directly through the OpenGL API.

Thanks.

 

Francisco
MAXST Support Team