Create an ACTION_VIEW Intent with the correct MIME type and fake file path (or, even better, the path you are about to load). Then use PackageManager and queryIntentActivities() - if you return a list with 1 + elements in it, then startActivity() on this Intent will succeed after loading the file.
source share