If you want to check whether your device is running 64 bit version you can check System.getProperty("os.arch"). This will return aarch64 on Samsung S6.More safe approach would be
This does not work on Nexus 5x. Because Nexus 5x returnsboolean is64 = System.getProperty("os.arch").contains("64");
armv8l
So, I changed my code to
boolean is64 = System.getProperty("ro.product.cpu.abilist").contains("64");
You can use shell command to check as well
shell@zerolte:/ $ uname -m
uname -m
aarch64
No comments:
Post a Comment