Some geofence code from the android developers page. Can't test anything without a device.