Can I get hold of the original Geofence location from that Geofence?
<p>I'm writing an app using Geofences but I would like a <code>GeofencingEvent</code> to return the centre of the triggered <code>Geofence</code> (in other words, the latitude and longitude given to the Geofence builder when setting it up, rather than the location that actually 'triggers' the <code>Geofence</code>). </p>

<p>I realise I can keep a list of the <code>Location</code> I use for each <code>Geofence</code> and cross reference, but I'm a perfectionist and that method seems a bit dirty, complicated and overblown.</p>

<p>Looking at the <code>Geofence</code> code, I note that the <code>Geofence.Builder</code> internally returns a <code>ParcelableGeofence</code>. I know that I can cast the <code>Geofence</code> returned by <code>getTriggeringGeofences()</code> into a <code>ParcelableGeofence</code> and see what I believe to be the Geofence latitude and longitude in the <code>agW</code> and <code>agX</code> properties. This doesn't appear to be documented stuff so I'd rather not be using it in an app as it might change at any time (if the Location list is a bit dirty then this method this is utter filth!).</p>

<p>So my question is.... has anyone else either implemented their own version of the <code>Geofence</code> interface or extended the concrete <code>ParcelableGeofence</code> in order to achieve something similar and more elegant than my proposed hacks?  </p>