//// for android/unity 2018.1 or newer
    //// cf. https://forum.unity.com/threads/android-hardwareaccelerated-is-forced-false-in-all-activities.532786/
    //// cf. https://github.com/Over17/UnityAndroidManifestCallback

#if UNITY_2018_1_OR_NEWER
    public void OnPostGenerateGradleAndroidProject(string basePath)
    {
        var changed         = false;
        var androidManifest = new AndroidManifest(GetManifestPath(basePath));

        changed = (androidManifest.SetHardwareAccelerated(true) || changed);
        changed = (androidManifest.SetUsesCleartextTraffic(true) || changed);
        changed = (androidManifest.AddCamera() || changed);
        changed = (androidManifest.AddMicrophone() || changed);
        changed = (androidManifest.AddGallery() || changed);

        if (changed)
        {
            androidManifest.Save();
            Debug.Log("unitywebview: adjusted AndroidManifest.xml.");
        }
    }