Skip to content
Advertisement

Can I add an image knowing its URI from the phone to the r.drawable folder in Android Studio to use it in a ListView?

I have got the URI of an image from an Input Image Activity. I have passed this URI to the Main Activity using .putExtra. Now I have the URI of the image in the Main Activity and I want to save the image somehow in r.drawable folder or to convert it to a picture which I can save to r.drawable. The URI is passed correctly.

How can I do this using java?

Advertisement

Answer

An app cannot at runtime put something in its drawable folder as it is read only.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement