How to detect VR or cellphone using RuntimePlatform?

I’m creating a multiplatform videogame and want to detect between VR or cellphone for it to show the right interface, but the problem I’m having is that Oculus uses the Android build and when I try to use the RuntimePlatform.Android it doesn’t work correctly.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GamePlatform : MonoBehaviour
{
    [SerializeField]private Canvas _canvas;
    void Start()
    {
        if (Application.platform == RuntimePlatform.Android) _canvas.renderMode = RenderMode.ScreenSpaceOverlay;
        if (Application.platform == RuntimePlatform.IPhonePlayer) _canvas.renderMode = RenderMode.ScreenSpaceOverlay;
        if (Application.platform == RuntimePlatform.WebGLPlayer) _canvas.renderMode = RenderMode.WorldSpace;
    }
}

Is there any other way I can detect Oculus VR or how can I apply RuntimePlatform in this case?

I don’t know if this is what you want
To the XRDDisplaySubsystem class in UnityEngine.XR
you can see if the VR device is detected.

public static bool isPresent()
        {
            var xrDisplaySubsystems = new List<XRDisplaySubsystem>();
            SubsystemManager.GetInstances<XRDisplaySubsystem>(xrDisplaySubsystems);
            foreach (var xrDisplay in xrDisplaySubsystems)
            {
                if (xrDisplay.running)
                {
                    return true;
                }
            }
            return false;
        }