I have a service in my app which needs to be running in the background all the time. On all devices, it\'s working fine except Xiaomi. I have read somewhere that we need to
@rajkumar is right, but you have to take care with Xiaomi running pure Android, MI A1, MI A2 and MI A3 is coming, so you should add something like:
if (Build.MANUFACTURER.toLowerCase().contains("xiaomi") && !Build.MODEL.toLowerCase().contains("mi a")){ //intent }