1

I'm trying to configure my app to exclude x86 device in google player by using ndk. And i have made a test app to verify this case. But after published test app, my x86 device (CPU Intel Atom Z2580) can also find it in google player. Code in Apllication.mk

APP_ABI := armeabi

and the c source code

(JNIEnv *env, jobject obj) {
return (*env)->NewStringUTF(env, "Hello From C !");

Is there anything wrong with my configuration? How can i exclude x86 device in google player?

  • See: http://stackoverflow.com/questions/13005303/how-does-native-android-code-written-for-arm-run-on-x86 – Morrison Chang Sep 16 '15 at 03:33
  • @MorrisonChang I hava read the link, it seems ARM native code can run on Intel x86 using an emulation feature. But my app always crash when run in x86, so i want to exclude x86 based device in google play. What i did is using NDK and specified APP_ABI := armeabi , but it doesn't work. Is there any configuration can direct do this? – always King Sep 16 '15 at 06:50
  • The best solution, as @ph0b wrote, would be to fix the crash. Another possibility would be to add some code in your app that checks the CPU ABI when the app starts, and if it's an x86 device, shows a dialog to the user about his/her device not being supported and then exits the app. – Michael Sep 16 '15 at 07:50

1 Answers1

0

There is no configuration that allows this.

You could potentially blacklist all the x86 devices one by one from the Play Store console...

More seriously, why don't you try to fix your crash instead? Please share your issue in a new post.

ph0b
  • 14,353
  • 4
  • 43
  • 41
  • Thanks for your suggestion, we have tried to fix. But the app use many native codes and we still can't fix the crash. So we want to hide the app for x86 devices temporarily, and the users with x86 devices will not be disturbed by the crash. – always King Sep 16 '15 at 09:22
  • 1
    I see. You can filter on Build.SUPPORTED_ABIS and if x86 is there, avoid loading the part of your app that crashes and warn the user accordingly while you're fixing it. Another solution is to publish an additional specific APK with only x86 libs and that isn't crashing. If its version code is the highest among your APKs, it will be distributed to x86 devices instead of the one that crashes. – ph0b Sep 16 '15 at 11:29