title: Marshmallow Fingerprint Scanner Hardware Presence
body: <p>I am looking to get started with the Marshmallow Fingerprint Authentication API. I understand that to ask for permission, I must use the following method:</p>
  
  <pre><code>ContextCompat.checkSelfPermission(getContext(), Manifest.permission.USE_FINGERPRINT);
  </code></pre>
  
  <p>And I must check if the device is running API level 23 or higher. But before I ask for permission, I would like to check if the device actually has a fingerprint scanner to begin with. I found the following two methods to do this check:</p>
  
  <pre><code>FingerprintManager manager = (FingerprintManager) getSystemService(Context.FINGERPRINT_SERVICE);
  
  manager.isHardwareDetected();
  
  manager.hasEnrolledFingerprints();
  </code></pre>
  
  <p>But both methods require <code>USE_FINGERPRINT</code> permission to be called at all. Why would I want to ask for permission to use a fingerprint scanner that I do not even know exists? Are there any other methods to find out if a scanner exists? Or is the only way to ask for permission first?</p>