Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if Browser is Samsung Phone

Has anyone figured out a good way to detect if the client's browser is a Samsung phone. I'm specifically looking for Samsung S3 And Note 2, but if it catches S2 and Note 1 or other Samsung phones I can live with that. Something that is future proof (i.e. likely to work with S4 / Note3 is obviously ideal).

There seems to be no straight-forward way to do this like there is with iPhones, but with the large S3 and Note2 user base we would like to customize for those devices.

I'm aware that not all S3's have the same user agent (http://stackoverflow.com/questions/11282944/what-is-the-samsung-s3-user-agent)

And if someone has set there phone to PC version then I don't expect to catch these (http://stackoverflow.com/questions/11597940/android-phone-browser-detection)

I realize this is likely a problem with no good solution.

like image 828
SemanticZen Avatar asked Dec 05 '12 05:12

SemanticZen


People also ask

What browser is on my Samsung phone?

Samsung Internet is the default and pre-installed browser on every Samsung phone. It's built over the Chromium project that powers Chrome and Microsoft Edge browsers. The Samsung Internet browser got nifty features and is also known for its advanced privacy and security for user data.

Do Samsung phones have their own browser?

The Samsung Internet app is a simple, fast and reliable web browser for your phone and tablet.

Is Samsung Internet browser the same as Google?

Sadly no, the browser is only limited to Android devices. But you can download the Samsung Internet extension from the Chrome Web Store, which allows you to sync bookmarks and import your Chrome bookmarks to the Android app.


1 Answers

Detect Samsung Phone or Tablet default browser

if(navigator.userAgent.match(/SAMSUNG|SGH-[I|N|T]|GT-[I|P|N]|SM-[N|P|T|Z|G]|SHV-E|SCH-[I|J|R|S]|SPH-L/i))  {
    alert("it's Samsung default browser");
    // your code for Samsung goes here
}

This regex covers almost all Samsung mobile devices except Samsung Galaxy Nexus, Please verify.

like image 168
Anulal S Avatar answered Sep 28 '22 00:09

Anulal S