0

I have a shopify store and I want to only show to the people coming from android devices. For this purpose I am trying to do this via js userAgent. The problem is one I try to do so shopify's js and css files do not work correctly.

Below is my code I am trying to attempt. Any help would be really appreciated!

<script>
    if(navigator.userAgent.indexOf("android") == -1) {
        //RUN shopify css and js files i.e: {{ 'theme.scss.css' | stylesheet_url }}
    }
    else {
        //Sorry not entertaining anything except android
    }
</script>
Bilal Akbar
  • 4,659
  • 1
  • 18
  • 29
  • Does this answer your question? [How to detect only the native Android browser](https://stackoverflow.com/questions/9286355/how-to-detect-only-the-native-android-browser) – myselfmiqdad Oct 18 '20 at 20:41
  • I have tried the above method and it is only detecting android but running for all devices. I want to apply the settings for only android users. When I do so the shopify theme breaks. – Waqqad Khan Oct 19 '20 at 10:31

0 Answers0