質問

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

What is the best way to submit such app in Google Play market? Is it possible to filter target devices depending on the availability of a NEON ir FPU on them? If not, what should I do to support all the devices (w/wo these hardware capabilities)?

役に立ちましたか?

解決

AFAIK, Google only defines two sets of ARM ABI's for Android: ARMv5 and ARMv7a. On ARMv5 (older Android devices), you are guaranteed to not support FPU and NEON. On ARMv7a devices the FPU and NEON support are optional. The market filters eligible devices on these 2 ABIs. You are able to build a "fat binary" which includes unique native code libraries for each ABI. In the case of FPU and NEON capabilities, you will need to test for their presence at runtime. Here is the code to see 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 for ARMV7 support (ANDROID_CPU_ARM_FEATURE_ARMv7) and VFP support (ANDROID_CPU_ARM_FEATURE_VFPv3)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top