Open nindzyago opened 8 years ago
Same here. It blurs everything but the map.
I got this to work by taking a snapshot of the map, and then having a separate imageview to show the blurred view:
map.snapshot(new GoogleMap.SnapshotReadyCallback() {
@Override
public void onSnapshotReady(Bitmap bitmap) {
mapBlurImage.setVisibility(View.VISIBLE);
Blurry.with(SUActivity.this)
.radius(12)
.sampling(3)
.from(bitmap)
.into(mapBlurImage);
I am initializing a view that does not currently have a map. I initialize the map on the users current location and then grab a screenshot and blur. However to grab a screenshot I believe that the map has to be visible. This means that the map shows unblurred for a few seconds and then blurs.
It can not work on SurfaceView or other opengl view
I have added surface-copy using PixelCopy. See my pull request: https://github.com/wasabeef/Blurry/pull/120
PixelCopy can copy pixels on the Google Map surface, and as far as I know any other surface shown in the window. It only works for API-26+, so snapshot into ImageView is still needed before API-26. I have also added some code to the Readme that can help with that, like the suggestion of Gregliest above.
I've tried to apply Blurry on google map but it only blurs the Google logo. Am I doing something wrong or it's just a bug ?