BitmapFactory cannot load vector drawings. You must use the VectorDrawable or VectorDrawableCompat class. To download a vector drawing, you need to use the xml downloader.
Some parsers, like those needed for resources, require a precompiled xml binary. You can find them in the apk file when you put a vector that can be pulled into the resource directory.
Here is an example, to download it from assets, you should be able to use a similar code to download from an SD card.
final XmlResourceParser parser = context.getAssets().openXmlResourceParser("assets/folder/image.xml"); drawable = VectorDrawableCompat.createFromXml(context.getResources(), parser);
This requires at least Android 5.0.
source share