Showing results for 
Search instead for 
Did you mean: 

C++ Avatar SDK on Oculus Mobile?

Expert Protege
I have a C++ application targeting the Oculus Mobile SDK 1.23.0. I would like to include Avatar support and Platform support. I downloaded Avatar SDK 1.31.0 and Platform SDK 1.36.0. I encountered several serious problems, one a showstopper.

1. (Showst...
armeabi-v7a version of libavatarloader, but no arm64-v8a. My understanding is Go and Quest both use arm64-v8a primarily. I have been building my application as arm64-v8a so I can't use the provided libavatarloader.

2. The Android sample code in the Avatar SDK does not appear to be usable.

2a. The sample code is under terms which, by my reading, prohibits its use in open source software. I am developing a closed-source game based on an open source C engine. I am contributing the "core" parts of my game, which will include the Avatar and Platform support, back to the open source project. The Oculus Mobile and Oculus Platform SDKs have separate licensing for the sample code which by my reading is compatible with open source. The Avatar SDK has a different (and much more restrictive) license from the other two SDKs. The Avatar SDK grants a license only to incorporate the SDK into a binary and distribute it to an end user, explicitly bans source sublicensing, and does not offer separate more lenient licensing for the sample code. This means if I adapt the sample code into a source file in my project, then distribute that source to someone else, I appear to be in license violation.

2b. The Android sample code in the SDK has no build scripts. This is a problem because Android build scripts are fairly difficult to write, and because:

2c. The Android sample code uses VrAppFramework, which is deprecated according to what I was told on this forum previously. VrFramework is still distributed with the Oculus Mobile SDK, but it is not documented or supported— and in fact shortly after the forum thread above, Oculus deleted all the VrAppFramework sample code from the Oculus Mobile SDK. This makes creating a build script for the Avatar SDK sample code even more difficult because I have to reverse-engineer what a build script for a VrFramework app would have looked like before the samples were removed.

2d. The Android sample code does not compile. When I construct a best guess at a build script and attempt to compile, I get a number of errors. First off the sample code depends on a "GLES2/gl2ext_loader.h". There is not a GLES2 included with any of the Oculus Mobile SDK, the Avatar SDK or the Platform SDK and I don't know what this is. Second off the sample code appears to be based on an older version of the Oculus Mobile SDK and specifies various nonexistent fields in VrAppFramework structs, like "'PerformanceParms' in 'OVR::ovrSettings'" or "'DepthTextureSwapChain' in 'OVR::ovrFrameInput'". My build results are attached below. I don't know how to fix this because VrAppFramework is deprecated and has no documentation (2c), and if I figured it out and somehow fixed it anyway I would not be able to distribute my modified version to other users of the open source project because of the license problem (2a).

In addition to all this, the Platform SDK has no sample code for Android, so I'm not sure where to get started with that. I'm working on the Avatar stuff first. Lack of Platform SDK sample code is a big problem because the Platform DRM is required for store submission, so technically Oculus has provided no sample code anywhere for a C/C++ Oculus Mobile program that could be submitted to the store…

My "Expected behavior" is that Oculus would distribute at least one "hello world" level sample program for each of the Platform and Avatar SDKs that can be compiled and run out of the box, the code from which can be legally reused, and which do not depend on deprecated APIs. Meanwhile I can maybe live without sample code, without arm64-v8a libraries for the Avatar SDK I am blocked.

What should I do?

Not applicable
Hi, mcc.
I think is always armeabi-v7a,
because in system app VrShell main also armeabi-v7a.
And now in Unity3d and UE4 always armeabi-v7a.
I think main oculus developers have arm64-v8a.)
So, that now only armeabi-v7a .(
I checked your BUILDFAILURE.txt
Yes. Your are right! Sample MirrorAndroid in oculus avatar sdk v1.31.0 very old and need to be fixed.
I fixed project MirrorAndroid and create public repo:
I checked test build on windows, hope on Linux also works.

Expert Protege
Thanks, I am confused though.
I thought that regardless of Unity, Unreal or C++, if you use a armeabi-v7a .so, then your program must be armeabi-v7a also. Because 64-bit and 32-bit executable code cannot interoperate.
Is this incorrect?
Does this mean Unity and Unreal are shipping their games 

Expert Protege
@mcc In Unreal, Oculus Audio and Avatars are only 32 bits with Android (if you look at the ThirdParty files).

Expert Protege
@mcc  I would like to add that Avatars in Android works fine (base and Expressive); 2 things: no mouth mouvements (because of a conflict with mic - not resolved in Unreal yet) and 32-bits only (mandatory for Go, could be upgraded to arm64 for Quest). I'm preparing an how-to guide for Unreal (soon).

Expert Protege
Note according to this bug my license concerns re: the Avatar SDK were incorrect.