-
-
Save JonaxelN/a5c7e0c4014290a69d51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| map.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() { | |
| @Override | |
| public void onMapLoaded() { | |
| map.snapshot(new GoogleMap.SnapshotReadyCallback() { | |
| @Override | |
| public void onSnapshotReady(Bitmap snapshot) { | |
| // TODO: Save this image into disk | |
| FileOutputStream out; | |
| try { | |
| out = new FileOutputStream("sdcard/zurich/" | |
| + String.valueOf(utilDate) + ".png"); | |
| snapshot.compress(Bitmap.CompressFormat.PNG, 90, | |
| out); | |
| shareImage = snapshot; | |
| if (image != null) { | |
| image = snapshot; | |
| } | |
| } catch (FileNotFoundException e) { | |
| e.printStackTrace(); | |
| } | |
| } | |
| }); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment