Table of Contents

Android Platform

Plugin Specs

  • Compatibility
    • Unity 2019.x and later supported (LTS versions + latest stable (not beta) release) (see below for build notes)
    • Supported CPU architectures are arm-v7a, arm64-v8a, x86 and x86-64
    • This plugin requires minimum SDK Android 8.0.0 (Oreo, API level 26) or later
    • This plugin requires target SDK Android 12.0.0 (Snow Cone, API level 31) or later
  • Rendering
    • OpenGLES 3.0 and Vulkan (Unity 2020 and later) are supported
    • Multi-threaded rendering is supported
  • Internals

Supported Media

See the Supported Media section for more information.

Streaming

See the Streaming section for more information.

Platform Specific Options

See the Platform Specific Options section for more information.

Build Notes

Google Play Store 16 KB Page Size Support

Starting 1st February 2027, Google will start to reject new apps and existing apps updates where NDK based libraries are not compiled with 16 KB page size support. AVPro Video v3.2.7 and onwards is complaint with this requirement, but the 3rd party Facebook 360 audio library used to support Facebook 360 spatial audio is not. Unfortunately, as this library is now deprecated and no longer receiving any support/updates, it's lack of support for 16 KB page sizes will likely never be resolved.

We believe most projects using Facebook 360 spatial audio are targetting Meta Quest devices and as such are released to the Meta Store, which does not have a requirement for 16 KB page support. Therefore we have chosen at this time to leave Facebook 360 spatial audio support in AVPro Video.

In order to allow Google Play Store targetted apps to be compliant and still keep support for Facebook 360 audio for Meta devices, we have included an option to enable/disable the Facebook 360 libs. You can find this under 'Project Settings->AVPro Video'.

alt_text

Unity 2023.0 and above

When using Unity 2023.0 and above and you are using 'Application Entry Point' set to 'GameActivity', you will need to perform the following steps to successfully build your project:

alt_text

  • Navigate to Player Settings|Publisher Settings, enable the Custom Launcher Gradle Template option
  • Open the template file /Assets/Plugins/Android/launcherTemplate.gradle
  • Add implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava' to the dependencies section

alt_text

alt_text

Proguard Minify

If you use Android minify options, AVPro Video will be stripped out and will not work. The following options need to be added to your proguard configuration file (in Player Settings > Android > Publishing Settings > Build > Custom Proguard File) to prevent AVPro Video classes from being removed:

-keep class com.renderheads.AVPro.Video.** { *; }
-keep class androidx.media3.exoplayer.** { *; }
-keep class com.twobigears.audio360.** { *; }

The above is included in /Assets/AVProVideo/Runtime/Plugins/Android/proguard-avprovideo.txt

OES Texture Format

Note

The OES texture format is not available in the trial version.

With the OpenGLES3 graphics API a zero-copy texture format is available that can render directly from the hardware buffer produced by the media player.

To enable this set Texture Format to Y Cb Cr 420_OES in the Android platform specific section of the Media Player component inspector as shown here: alt_text

The OES txeture format is not enabled by default as it requires custom shader support. We provide versions of our shaders that support the OES texture format, look for "Android OES ONLY" in the shader names. These shaders will fall back to the regular shaders on platforms that do not support OpenGLES3. Rendering components such as Display uGUI should automatically select the correct shader when the texture format is set to Y Cb Cr 420_OES.

Note

When using the OES texture format with a scriptable rendering pipeline (e.g.: URP, HDRP, etc.), make sure to disable "SRP Batcher" in the RPAsset as the world transform isn't passed to the shader when this is enabled. alt_text

Troubleshooting

Streaming

  • If you want to support streaming from URL don’t forget to set the “Internet Access” option in Player Settings to “require”
  • If you’re streaming on Android 9 or above and connecting to an HTTP stream, then you either need to switch to HTTPS stream, or enable cleartext support in the AndroidManifest.xml

java.lang.ClassNotFoundException / java.lang.NoSuchMethodError

  • Check whether you have Proguard minification enabled (see notes on Minify above) which may be over-optimising and stripping AVPro Video files
  • Check the Gradle build notes above

Collecting Logs

  • We often need to see the device logs to work out why something isn't working. For this the device should be connected via USB.
  • If you're using Android Studio then you can click on the Logcat tab and choose No Filters in the bar on the top right. You should see logs being produced and can copy-paste all of them into a text file.
  • Another useful tool on Windows is called mLogcat and is a GUI tool for monitoring and capturing logs from Android.
  • Alternatively the command-line tool "adb logcat" can be used from the Android SDK.