1

I need to disable app from running on emulators so I somehow combined answers of this question. It's working on most emulators but it can't detect blustacks. I can not find a robust way to detect blustacks as it has most of a real device properties.

enter image description here

I found safeToRun library that using Build.BOOTLOADER == OsCheckConstants.UNKNOWN to detect blustacks but I'm not sure that only this condition is enough to make sure the running device is a blustacks emulator and I'm afraid that some real devices return "unknown" as bootloader parameter.

it is worth mentioning that this block of code can't detect bluestacks too (glGetString returns null)

 try {
        String opengl = android.opengl.GLES20.glGetString(android.opengl.GLES20.GL_RENDERER);
        if (opengl != null) {
            if (opengl.contains("Bluestacks") ||
                    opengl.contains("Translator")
            )
                newRating += 10;
        }
    } catch (Exception e) {
        e.printStackTrace();
    }

any ideas or solutions?

0 Answers0