I am creating an app which allows the user to take a photo with a map superimposed on it. For this purpose I am using surfaceview and embedding a map on it. On app initialisation, the surfaceview preview is enabled and the map is superimposed on the surface view. On clicking a button on the screen, a screenshot is taken using take screenshot function. The issue is that the screenshot does not capture the surfaceview preview and only the map superimposed on the surface view is visible in the screenshot (the rest of the surface view appears black in the screenshot).
Please advise how I can get the photo with the image of the map superimposed on it (as per the preview seen in surface view). Blocks used are attached.