I have an android app with a bunch of photo filters. Filters are implemented with OpenGL ES 2.0 so when i want to save the final image i make glReadPixels call. It works on every device i have tested on, however it seems it does not work on Nexus 4. Users report that they can apply the filters but when they save the final image they can't find it on the devices. I want to know if there is any way for me to emulate nexus 4 and test my app on emulator? I have tested on emulator and it works fine also it would be good to know if anyone had similar problem with Nexus 4.
My glReadPixels call.
GLES20.glReadPixels(0, 0, saveWidth, saveHeight, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, mPixels);
Add additional logging and get some test users to send you the output; this can help you narrow down where the specific problem is, whether it's with glReadPixels, or the file save. In particular, use glGetError() and log its value, and add try/catch blocks around file I/O:
try {
.... file ops
} catch (Exception e) {
e.printStackTrace();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With