He knew where his ex-girlfriend was, the pictures she took and who she sent WhatsApp messages to.
The accused admitted installing the app on his girlfriend's phone during their relationship, a court spokesperson told DPA.
He downloaded the app while she was out of the room - and his girlfriend had no idea that a tracking device had been installed on her smartphone.
'The next step up from stalking'
The software is marketed as an anti-theft device, allowing users to track lost and stolen smartphones.
But according to the providers, the app doesn't show up on the usual home screen.
Instead, it is listed under "Device Management" - giving the impression that this is a piece of software related to the phone's operating system.
The apps can be downloaded with just a few clicks - but those who use them could find themselves in court if they download the app onto another person's phone without their agreement.
"It's the next step up from stalking," said Claudia Beck, regional head of victim support organisation Weißer Ring in Baden-Württemburg.
Photos are part of a person's intimate sphere, she told DPA, adding: "this adds to a victim's sense of being at someone's mercy."
The app developers don't seem too bothered about this risk, though.
"Have you ever wondered whether your partner is lying to you?" it asks potential customers - openly marketing itself to suspicious lovers.
The spy software is often disguised using names like "Browser" or "Facebook," according to Ronald Eikenberg, IT security expert and editor of computing magazine c't.
"You can hide one programme inside another," he said.
When Facebook friends invite us to download games, we don't always think about the potential risk, Eikenberg warned - but "the other programme can be running in the background, without us having any knowledge of its existence."
Those worrying that they might have spyware installed can use an anti-virus programme to scan their smartphone, Eikenberg recommends.
App providers often try to protect themselves from legal issues by asking users to agree only to install the software on their own devices, or with the explicit permission of the device's owner.
But terms and conditions such as these are no loophole, a spokesperson for Baden-Württemberg Ministry of Justice told DPA.
The app providers were unavailable for comment.