SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
I have an Android device (CAT S40) running 5.1 on it. I am encountering an issue when pressing the home button or lock button. It seems that sometimes when the app is in pause or sleep my chart surfaces are destroyed and turn black. I have only seen this problem on this device. The only way to restore them is to restart the app. I researched this issue an found information on OpenGL context getting destroyed on pause. There is a setting in GLSurfaceView called setPreserveEGLContextOnPause. I am not sure if it is possible to access this setting from the SciChartSurface or not.
After seeing this, I tested the SciChart example app to see if the problem was isolated to my app, but it happened in the example app as well.
Again this is the only device I have seen this happen on and I’ve tested multiple devices.
Thanks for your help
You can set preserveEGLContextOnPause flag by creating new instance of RenderSurfaceGL ( our default render surface implementation which is based on GlSurfaceView ) and then assign it to chart. Here is the code sample:
final RenderSurfaceGL renderSurface = new RenderSurfaceGL(getContext()); renderSurface.setPreserveEGLContextOnPause(true); surface.setRenderSurface(renderSurface);
Please can you try it and tell if this fixes the problem for you?
Please login first to submit.