App gets muted after recording with Microphone

In my Unity project I have a button that allows players to record their voice by accessing the microphone. When the recording ends, the app gets muted if the phone is in silent mode. It works well if silent mode is off on the phone. The Unity function that ends the recording is Microphone.End(). Thanks.