title: Requesting app runtime permissions (Android)
body: <p>I want to write a simple app which accesses the device's location. Only I will ever use the app. This is my first attempt in about 10 years to write an Android app, so it is the first time I've had to deal with runtime permissions.</p>
  
  <p>My first question is, given that the app is solely for my use, is it possible to by-pass the need for runtime permission code?</p>
  
  <p>Failing that, is there any simple example code that fills in the numerous gaps in the <a href="https://developer.android.com/training/permissions/requesting" rel="nofollow noreferrer">Android documentation</a>?</p>
  
  <p>To take one example: the doc includes the following:</p>
  
  <pre><code>when {
  ContextCompat.checkSelfPermission(
          CONTEXT,
          Manifest.permission.REQUESTED_PERMISSION
          ) == PackageManager.PERMISSION_GRANTED -&gt; {
      // You can use the API that requires the permission.
      performAction(...)
  </code></pre>
  
  <p>What does this mean? What "API that requires the permission"? What replaces the "..."?</p>
  
  <p>There are several other similar gaps on the page.</p>