cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 mobile detect and change styles

Magento 2 mobile detect and change styles

Hello 

i developed a store for desktop and now i want to run it on android and IOS so i want to load my website in side web view in mobiles so i want to detect mobile to change styles to users who are using the store from Android/IOS.

what is the best way to do that.

3 REPLIES 3

Re: Magento 2 mobile detect and change styles

I want to load device wise (like mobile and tablet) theme in Magento 2.

How can I do that?

I have tried below code in User Agent Rules but not working for me:

Please let me know if you fand any solutions for our odoo customization app CRM module.

 

 

Re: Magento 2 mobile detect and change styles

Hello 

i found library for mobile detect http://mobiledetect.net/

but i don't know how to include php file in magento and how to call it in phtml files 

any one can help here. 

Re: Magento 2 mobile detect and change styles

Hi @rayan2016,

 

If this still the issue for you. Look to this extension. I've just updated Mobile-Detect library up to 2.8.33 that it uses.

https://github.com/aholovan/mobiledetect/