From 6d6c369e2c0d966bf655b8086904c2f0be1a80a3 Mon Sep 17 00:00:00 2001 From: DjBushido Date: Tue, 8 Apr 2014 19:44:00 -0400 Subject: [PATCH] Add a helper method to convert REST Locations to Android Locations --- UNCCScavenger/src/edu/uncc/scavenger/rest/Location.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/UNCCScavenger/src/edu/uncc/scavenger/rest/Location.java b/UNCCScavenger/src/edu/uncc/scavenger/rest/Location.java index 2276ba7..00968d7 100644 --- a/UNCCScavenger/src/edu/uncc/scavenger/rest/Location.java +++ b/UNCCScavenger/src/edu/uncc/scavenger/rest/Location.java @@ -38,4 +38,11 @@ public class Location { public void setLocationLat(double locationLat) { this.locationLat = locationLat; } + + public android.location.Location getAndroidLocation() { + android.location.Location mLocation = new android.location.Location("NinerFinderServer"); + mLocation.setLatitude(getLocationLat()); + mLocation.setLongitude(getLocationLong()); + return mLocation; + } }