title: How to restrict app usability to a certain geographical area ANDROID
body: <p>I want to define a geographical boundary outside of which, the app will refuse to work.  I already know how to do this with a square bound by two lat/long pairs:</p>
  
  <pre><code> if ((dLAT.doubleValue() &gt; 35.309171) || (dLAT.doubleValue() &lt; 35.226442) || (dLON.doubleValue() &lt; -92.790165) || (dLON.doubleValue() &gt; -92.707081))
      {
          LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(this);
  
          localBroadcastManager.sendBroadcast(new Intent("killapp"));
      }
  </code></pre>
  
  <p>I also know about geofencing... or enough to know that with geofencing, areas are defined as circles with a radius from a single point.</p>
  
  <p>But like I said I would like to define a boundary that matches reality:</p>
  
  <p>For example, if there was an app that was designed NOT to work if the user is outside the border of Kansas, it would not be satisfactory to define a RADIUS, as the state of Kansas is not circular, and its border is wiggly.</p>
  
  <p>I happen to be using Android for this, but I doubt that really matters for this question.</p>
  
  <p>Thanks for any help!</p>