nosTa1337 edited a comment on issue #82: New Function request - Show CPU 
Architecture
URL: 
https://github.com/apache/cordova-plugin-device/issues/82#issuecomment-418646591
 
 
   Here is a code example what this command returns.
   
   ````
   private static String determineTermuxArchName() {
       // Note that we cannot use System.getProperty("os.arch") since that may 
give e.g. "aarch64"
       // while a 64-bit runtime may not be installed (like on the Samsung 
Galaxy S5 Neo).
       // Instead we search through the supported abi:s on the device, see:
       // http://developer.android.com/ndk/guides/abis.html
       // Note that we search for abi:s in preferred order (the ordering of the
       // Build.SUPPORTED_ABIS list) to avoid e.g. installing arm on an x86 
system where arm
       // emulation is available.
       for (String androidArch : Build.SUPPORTED_ABIS) {
           switch (androidArch) {
               case "arm64-v8a": return "aarch64";
               case "armeabi-v7a": return "arm";
               case "x86_64": return "x86_64";
               case "x86": return "i686";
           }
       }
       throw new RuntimeException("Unable to determine arch from 
Build.SUPPORTED_ABIS =  " +
           Arrays.toString(Build.SUPPORTED_ABIS));
   }
   ````
   
   Here is a more detailed explanation: 
https://handstandsam.com/2016/01/28/determining-supported-processor-types-abis-for-an-android-device/

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to