In my app , I need to use startActivity to see the content of the file , or use the default application to open the certain file , but sometimes the android system may not i
You can use resolveActivity method
resolveActivity
if (intent.resolveActivity(getPackageManager()) != null) { startActivity(intent); }else { Toast.makeText(this,"No suitable app found!",Toast.LENGTH_SHORT).show(); }