android
java.io.filenot found expception : no content provider while converting URI its UR '''I' not URL to bitmap
I have seen a lot of solutions regarding converting picture from url to bitmap please help me with this URI thing. Note that I am using firebase as a backend and user is the variable of firebaseUser. just like this FirebaseUser user=FirebaseAuth.getInstance().getCurrentUser(); I want the users profile picture which URI has been already obtained with the help of user.getPhotoUri() How to do this properly? Thanks in advance. code is attached imageView=(ImageView)findViewById(R.id.user_image); try{ Uri imageuri=Uri.parse(user.getPhotoUrl().toString()); System.out.println("photo url is : "+user.getPhotoUrl()); InputStream image_Stream; image_Stream=this.getContentResolver().openInputStream(imageuri); //Bitmap bitmap= MediaStore.Images.Media.getBitmap(this.getContentResolver(),imageuri); Bitmap bitmap= BitmapFactory.decodeStream(image_Stream); roundImage=new RoundImage(bitmap); imageView.setImageDrawable(roundImage); System.out.println("final photo uploaded"); } catch (Exception e){ System.out.println("Error occured this : "+ e); }
Related Links
optionsmenu both cases execute
Button with OnclickListener over Spinner with OnItemSelectedListener conflict Android
How can i turn on GPS automatically as my android application launches in Ice cream sandwhich [duplicate]
cannot tokenize string by space
How to find key from HashMap
How to force android layout to shift upward when softkeyboard is visible
Custom listview with checkbox crashes while scrolling
Click images of carousel view
Share mp3 via whatsapp, Android
Android: Control goes back to Splash Screen
How to validate a view or layout in robotium
Make radiobutton icon smaller
How can i register a Receiver in a service?
FileNotFoundException in Android with HttpURLConnection
Phsysical Home Button onStop in Android
Android - Instantiate a Fragment multiple times?