I have created a android app that provides the option to search the products through voice search with Speech recognition. It works on all phones except pixel phones. As pixel mobiles have new feature "Block Mic access", "Block camera access" which are hardware level blocking. My app cannot detect that the microphone is blocked. Even though I have checked whether the mic is muted or not muted with Audiomanager and mic available with package manager, everything returns true. As this is a new feature of restricting access to hardwares in pixel phones, i couldn't find a solution.
I have tried using package manager to detect mic is available. Also, tried audio manager to detect mic is muted. Still everything returns true.
As Some Mobile have new feature "Block Mic access", "Block camera access" which are hardware level blocking. Try this solution, I got Boolean value Camera Access Block State By this solution.