java - Activate flashlight when battery is lower than 10% in android API 21 and above -


i'm trying create android flashlight app , i'm done. i'm facing 1 problem though. when battery below 10% app starts flashlight doesn't come on.

  • minsdk api 21 (lollipop)
  • maxsdk api 23 (m)

below permissions , features included in androidmanifest.xml.

<!--for controlling camera flashlight-->     <uses-permission android:name="android.permission.camera" />     <uses-permission android:name="android.permission.flashlight" />     <uses-feature android:name="android.hardware.camera" />     <uses-feature android:name="android.hardware.camera.autofocus" />     <!--/--> 

how around problem.


Comments

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

javascript - How to change image src on success AJAX -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -