Google Play: Neon and FPU filters? or how to live without them?

I have several different builds of my Android app: with / without FPU support, with / without NEON support.

What is the best way to send such an application to the Google Play market? Can I filter target devices based on NEON ir FPU availability? If not, what should I do to support all devices (using these hardware features)?

+4
source share
1 answer

AFAIK, Google defines only two sets of ARM ABI for Android: ARMv5 and ARMv7a. On ARMv5 (older Android devices) you are guaranteed not to support FPU and NEON. On ARMv7a devices, support for FPU and NEON is optional. The market filters suitable devices on these two ABIs. You can build a "bold binary" that includes unique libraries of native codes for each ABI. In the case of FPU and NEON capabilities, you will need to check their presence at run time. Here is the code to find out if NEON instructions are available:

#include "cpu-features.h" bHasNEON = FALSE; if (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM && (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0) { // use NEON-optimized routines bHasNEON = TRUE; } 

You can also test ARMV7 support (ANDROID_CPU_ARM_FEATURE_ARMv7) and VFP support (ANDROID_CPU_ARM_FEATURE_VFPv3)

+4
source

All Articles