It’s not working on all devices or only on selected? What devices did you check?
Why I’m asking this? Because this functionality relies on WordPress builtin is_mobile() function. This is a native WP solution for device recognition. In most cases it does the job, but it’s not perfect.