Working with ArcGIS Android's 100.x API,
I'm a bit of a newbie with ArcGIS so forgive any incorrect use of terminology.
BACKGROUND
I am developing an app that must work in a completely offline environment. All maps (in this case they will be mobile map packages) are downloaded to devices before going offline. Each mmpk will have a feature layer containing a closed polygon. I need to be able to determine if my current location is within the polygon feature. That has proven to be easy enough using "GeometryEngine.within()".
PROBLEM
The problem that I'm having is with an additional requirement: I also need to determine if the current location's accuracy circle insects with the polygon's boundary to indicate that the user "may be" within the feature's boundaries - think of it as a stoplight: green==inside, red==outside, yellow==close to the polygon boundary.
I see that the GeometryEngine has methods like crosses, intersects, overlaps, touches, etc., but I don't know how to pass a circle representing the location's accuracy as a geometry. Suggestions?
I've made progress on this - I was able to use the GeometryEngine's buffer()/bufferGeodetic() methods to create a polygon (p) representing the location's accuracy circle.
Polygon p = GeometryEngine.bufferGeodetic( GeometryEngine.project(location.getPosition(), feature.getGeometry().getSpatialReference()), location.getHorizontalAccuracy(), new LinearUnit(LinearUnitId.METERS), Double.NaN, GeodeticCurveType.GEODESIC);
Next I was able to pass polygon (p) into the GeometryEngine's overlaps() method but I'm having problems getting the units converted properly and/or polygon to represent a circle on my map:
Problems