Mobile-Detect icon indicating copy to clipboard operation
Mobile-Detect copied to clipboard

Mobile-Detect does not distinguish between Opera and Opera Mini

Open evrard-c opened this issue 7 years ago • 3 comments

Opera has two browsers for Mobile: Opera and Opera Mini, they are very different, each has its own behaviors, so it's very important do distinguish them but Mobile-Detect Seems to make no distinction between the two.

This is a test with Opera Mini

$detect->is('Opera Mini'); // returns false yet it should return true because it's Opera Mini $detect->is('Opera'); // returns true yet it should return false because it's not Opera but it's Opera Mini $detect->browser(); // return Opera instead of returning Opera Mini

but curiously, still with Opera Mini

$detect->version('Opera Mini'); //returns the exact version of Opera Mini

P.S: Now when you download Opera Mini on a mobile, you can switch between Opera or Opera Mini by choosing the data saving mode, so you have one app which could be Opera or Opera Mini according to your settings.The User-Agent changes too as you are using the app as Opera or as Opera Mini

evrard-c avatar Mar 31 '17 13:03 evrard-c

Could you add the useragent?

mimmi20 avatar Mar 31 '17 14:03 mimmi20

With a phone using Android

This is User-Agent for Opera Mini

Opera/9.80 (Android; Opera Mini/22.0.2254/60.271; U; fr) Presto/2.12.423 Version/12.16 Mozilla/5.0 (Linux; Android 4.4.4; SM-J100H Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36 Mozilla/5.0 (Linux; Android 4.4.4; SM-J100H Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36

and this is User-Agent for Opera

Mozilla/5.0 (Linux; U; Android 4.4.4; SM-J100H Build/KTU84P; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36 OPR/22.0.2254.113472

evrard-c avatar Mar 31 '17 15:03 evrard-c

User Agent for the Opera Mini: Opera/9.80 (MAUI Runtime; Opera Mini/4.4.39016/117.30; U; uk) Presto/2.12.423 Version/12.16

This browser has been detected as Opera 4.4.39016 - it's wrong.

andrey-helldar avatar Sep 27 '18 07:09 andrey-helldar