I know how to get the screen density, and I know how to make images and put them in drawable-ldpi, mdpi, hdpi so that the correct one is automatically used for the device. What I want to know is if there is a way to download images that will be selected in a similarly automatic fashion based on screen density? In other words, can I download three versions of an image and tell my app to automatically select the version that is appropriate to screen density? Or would I have to code this myself?
Share
One way is to send this hdpi/mdpi value to server and there have appropriate logic to determine and send the correct screen type. Note that with latest version of Android they have added additional parameters so take a look here and here for that.