Sgt Danny Nightingale said outside court after being released: "Thank you to the world for being so kind".
His wife Sally said she was "very, very happy" and that she had "fought for this and got justice today".
More top news
The British territory will allow only domestic partnerships after senators approved the Domestic Partnership Act by an 8-3 vote.
More than 1,500 people are expected to attend the multi-faith service, including many bereaved families and survivors.
The app enables people in Devon and Cornwall to view current waiting times for local emergency departments and minor injuries units.