I have a URI from the mediastore pointing to a image. I would like to set the wallpaper with this URI. I tryed using BitmapFactory.decodeFile but the problem is if its big it runs out of memory.
Is there another way i can do this.
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This question is a bit old, but what the hey…
You can get around this problem with the following code. However, if you make the image very small, and then stretch it to fit something very big, you will loose quality. That being said, if the image is so huge you can’t even load it, and you just want it to act as your wallpaper, I think you will be fine with the following.