Last active
February 20, 2017 17:36
-
-
Save 1fabiopereira/220e501e0c8e5d5bacb7b18210ef090f to your computer and use it in GitHub Desktop.
Simple mobile detect architecture
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AndroidArchitecture{ | |
static getArchitecture(){ | |
let architecture; | |
if(navigator.platform.indexOf('i686') !== -1){ | |
architecture = '32-bits'; | |
} else if(navigator.platform.indexOf('armv8l') !== -1){ | |
architecture = '64-bits'; | |
} | |
return architecture; | |
} | |
} | |
alert(AndroidArchitecture.getArchitecture()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment