I have a listview populated with some files,there can be various types like pdf or documents.When a user clicks on one i get the file mime type and start an intent that let\
try
if (resultCode == RESULT_CANCELED) instead of if (resultCode == Activity.RESULT_CANCELED )