Resources$NotFoundException - This exception is thrown by the resource APIs when a requested resource can not be found.
Problem is here
int imageResource = vi.getContext().getApplicationContext().getResources().getIdentifier(uri, null, vi.getContext().getApplicationContext().getPackageName());