Hello,
We are researching ways to programmatically capture a screenshot of the map view using ArcGIS Runtime SDK for Android and the image is returning a black screen without the map layer. We are seeing other elements such as Title Bar, map buttons, North Arrow image, although, the basemap/aerial imagery, ie. any layer turned on, does not display. Is there anyone familiar with capturing android device screenshots programmatically using android/java and the integrated ArcGIS Runtime SDK for Android? Thanks for your help and input!
Hmmm. Interesting. I like this kind of file i/o stuff.
So, there isn't currently an API in our Android SDK that exports the contents of a MapView to a file. There is in the Java SDK, but not Android.
What you may want to try is something like what is found here on StackOverflow: http://stackoverflow.com/questions/2174875/image-on-canvas-to-jpeg-file .
Basically, you can draw the contents of the MapView to an off-screen mutable bitmap, (I hope), which can be written to the device. Worth a try.
Eric,
Thanks for your suggestion.
We currently use the following code to generate the view and both generate black screens rather than the map.
View v2 = (MapView) findViewById(R.id.map);
View v1 = getWindow().getDecorView().getRootView();
We will look into the Java SDK and hopefully find a solution. Let me know if you or anyone on your team find a solution.
Thanks!