Search code examples
android32bit-64bitandroid-5.0-lollipop

How to know a process of an app is 32-bit or 64-bit programmatically in Android lollipop?


As we all know from Android 5.0.64bit support is there. I have very simple question. Can we check programmatically in what mode any application is running i.e. 32bit or 64bit? For example: I have Facebook app running on my Nexus 9, so can I check using my android app if Facebook app's process is running in 32bit mode or 64bit mode?


Solution

  • Try System.getProperty("os.arch"). I haven't tried it on 64-bit android, but it must return something like 'aarch64' in case of 64 bit device.

    http://developer.android.com/reference/java/lang/System.html#getProperty(java.lang.String)