Default Midi Input

Hello. I made an audio player based on Tutorial: Build an audio player.
I’m trying to get incoming midi messages from the default midi input, but nothing comes out. The incoming midi port is open. What am I doing wrong?
The code:
GUI::AudioPlayer::AudioPlayer()
{
------------------
auto safeThis = SafePointer (this);
RuntimePermissions::request (RuntimePermissions::recordAudio,
[safeThis] (bool granted) mutable
{
auto savedState = getAppProperties().getUserSettings()->getXmlValue (“Setting Audio”);
safeThis->deviceManager.initialise (granted ? 0 : 0, 2, savedState.get(), true);
});
auto midiInputDevice = MidiInput::getDefaultDevice();
deviceManager.addMidiInputDeviceCallback (midiInputDevice.identifier, this);
}

void GUI::AudioPlayer::handleIncomingMidiMessage (MidiInput* source, const MidiMessage& message)
{
DBG(message.getNoteNumber());
DBG(message.getChannel());
}
void GUI::AudioPlayer::handleNoteOn (int midiChannel, int midiNoteNumber, float velocity)
{
if (! isAddingFromMidiInput)
{
auto m = MidiMessage::noteOn (midiChannel, midiNoteNumber, velocity);
m.setTimeStamp (Time::getMillisecondCounterHiRes() * 0.001);
}
}

void GUI::AudioPlayer::handleNoteOff (int midiChannel, int midiNoteNumber, float /*velocity*/) 
{
    if (! isAddingFromMidiInput)
    {
        auto m = MidiMessage::noteOff (midiChannel, midiNoteNumber);
        m.setTimeStamp (Time::getMillisecondCounterHiRes() * 0.001);
    }
}

Thanks in advance for your help with the solution.