The couple called police to report the trespass as Dick-Karetai took a loaded .22 rifle from his Subaru and approached the front door.
He argued with the victim with the locked door separating them.
The firearm was hidden from view, the court heard.
Dick-Karetai demanded that his ex-girlfriend come out and talk to him, but she repeatedly declined.
"The defendant raised the firearm and fired a single shot through the glass door hitting the victim in the head," the summary said.
Dick-Karetai fled the scene and was arrested shortly afterwards. The rifle and ammunition were found in the car.
The defendant told officers he had gone to the address to take his ex-partner away and "panicked" when the man was on the other side of the door.
He said he raised the firearm and it "went off".
There were grave concerns for victim's life during his early stay in hospital, but it is understood his condition had since improved.
Dick-Karetai had no previous convictions.
He was remanded in custody, as he has been since charges were laid, and will be sentenced in June.
Counsel Campbell Savage said psychological and cultural reports would likely be filed ahead of that date.