added a flag to optionally be able to disable detection on legacy Android