Appcelerator : Detect 64-bit architecture on android

// --- You must add "hyperloop" module to your project for the below to work ---

// Fetch CPU architecture via hyperloop and Google's Android APIs.
// Returns same architecture folder names the "lib" *.so libraries are under.
var buildClass = require("android.os.Build");
if (Ti.Platform.Android.API_LEVEL >= 21) {
 Ti.API.info("@@@ Build.SUPPORTED_ABIS[0]: " + buildClass.SUPPORTED_ABIS[0]);
} else {
 Ti.API.info("@@@ Build.CPU_ABI: " + buildClass.CPU_ABI);
}

The strings will returned are:
"arm64-v8a", "armeabi-v7a", and "x86"

The returned strings always match the "lib" architecture folder names that the *.so libraries are stored under within the APK.

মন্তব্যসমূহ

এই ব্লগটি থেকে জনপ্রিয় পোস্টগুলি

Github: Push an existing repository from the command line

Android : Enable/Disable wifi programmatically

Android : Firebase Cloud Messaging