How to enable transparency on Android to allow Unity to be used as overlay in native application

I’d like to have Unity render to a surface with transparency on Android, for use as an overlay view within a native application. This was apparently possible in earlier versions of Unity, where it was possible to adjust the parameters of the created GLSurfaceView before surface creation. Currently it appears that Unity creates an opaque EGL surface in one of the shared libraries (libmain, libmono, or libunity)

There are potential solutions which would require assistance from Unity

  1. Provide a build option to enable a transparent surface
  2. Provide custom libraries that would use a transparent surface
  3. Provide source code and build instructions for the libraries so that I may make the required changes
  4. Build an option in the java UnityPlayer class to allow for a transparent surface

I’ve filed a feature request at https://feedback.unity3d.com/suggestions/transparency-on-android-to-allow-unity-to-be-used-as-an-overlay-on-native-application if anyone is interested

This is a duplicate of https://forum.unity3d.com/threads/transparency-on-android.456736/.

See answer there.

By the way, I think that this might be relevant again, as some years has passed, and it might be possible in newer versions. Is it?
@danw_unity
@wondersteve