如何在Android棒棒糖中以编程方式知道应用程序的进程是32位还是64位? [英] How to know a process of an app is 32-bit or 64-bit programmatically in Android lollipop?
问题描述
众所周知,Android 5.0.64位支持。我有一个非常简单的问题。我们可以通过编程方式检查任何应用程序在哪种模式下(即32位或64位)运行吗?例如:我的Nexus 9上运行了Facebook应用程序,那么我可以使用Android应用程序检查Facebook应用程序的进程是在32位模式还是64位模式下运行?
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?
谢谢
推荐答案
尝试 System.getProperty( os.arch)
。
我还没有在64位android上尝试过,但是对于64位设备,它必须返回类似 aarch64的信息。
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)
这篇关于如何在Android棒棒糖中以编程方式知道应用程序的进程是32位还是64位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!