title: How to check if device has fingerprint feature and then use it in Android
body: <p>I am using this permission</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.USE_FINGERPRINT" /&gt;
  </code></pre>
  
  <p>to check if device has fingerprint or not. Thats how I check it in kotlin</p>
  
  <pre><code>val fingerSensorManager = FingerSensorManager(this)
  fingerSensorManager.isFingerPrintAvailable()
  </code></pre>
  
  <p>It works fine but in <code>Android 8 and above</code> it throws exception.</p>
  
  <p>How can I check fingerprint and also use it in all versions? I know there is another method for Android 8 and above but I am confuse that how to implement it so that it works in every device</p>