In Android, how to "DISABLE" bluetooth automatically when the battery level reaches a specific percentage?

57 Views Asked by At

Showing "unfortunately stopped" when running my application. I've got battery level percentage but turning off bluetooth is not working. Please help me out

NB: Its not a problem of permissions

if (bluetooth.isEnabled() && level<90) bluetooth.disable();

0

There are 0 best solutions below