The tutorial at https://developer.garmin.com/connect-iq/core-topics/backgrounding/ does not comply with the current signature:
public function getServiceDelegate() as ServiceDelegate{
return new MyServiceDelegate();
}
It should look as follows...