I tried following code to get the user's google profile pic, but this is giving only thumbnail size blur photo:
FirebaseAuth.getInstance().getCurrentUser().getPhotoUrl();
This is giving me uri, which when converted to string shows following URL (URL is showing pic, but due to privacy modified few digits here):
https://lh3.googleusercontent.com/a-/AguE7mDKNdcXubEW0cMTTYzschAykXcWRQDYeMlHb8rf_g=s96-c
I am able to use this url to show picture in an ImageView using Picasso, but not sure how to download it & store in phone memory.
Picasso.get().load(FirebaseAuth.getInstance().getCurrentUser().getPhotoUrl().toString()).fit().into(profileImage);
I tried following by converting getPhotoURL into bitmap:
Bitmap bitmap = MediaStore.Images.Media.getBitmap(SplashActivity.this.getContentResolver(), userPhotoURLUri);
FileOutputStream fos = new FileOutputStream(pictureFile);
bitmap.compress(Bitmap.CompressFormat.PNG, 90, fos);
fos.close();
But this is giving me exception at the very first line:
FileNotFoundException: No content provider: for google getphotouri