API call to get processor architecture

Actually, you can get the architecture without the need for reflexion at all:

String arch = System.getProperty("os.arch");

From my tests it returned armv71 and i686.

EDIT:

On MIPS architecture, it either returns 'mips' or 'mips64'

On 64 bit ARM/Intel, it returns 'aarch64' or 'x86_64' respectively.


You can use the Build class:

import android.os.Build;

and then read:

Build.CPU_ABI


You can also use android SDK, take a look on the Build class:

    /** The name of the instruction set (CPU type + ABI convention) of native code. */
    public static final String CPU_ABI = getString("ro.product.cpu.abi");

    /** The name of the second instruction set (CPU type + ABI convention) of native code. */
    public static final String CPU_ABI2 = getString("ro.product.cpu.abi2");