pwlin / cordova-plugin-file-opener2

A File Opener Plugin for Cordova
MIT License
314 stars 584 forks source link

Errro opening file : no app found to open this type of file #280

Open sikuning opened 4 years ago

sikuning commented 4 years ago

i try open image with this plugin but, show error like this, any one can help me ? please

shnist commented 4 years ago

hi @robbiedh, it seems that the image you are trying to open does is not supported by any of the apps you have on your phone? Is this on iOS or Android? What image type are you downloading?

Thul999 commented 4 years ago

I have the same issue with CSV files on Android. I know my users could install an app to handle the files, but is there a way to perform a previous check if the user can open such particular MIME types?

If there is, at least we can hide the button that performs the action.

shnist commented 1 year ago

hi @Thul999, this could potentially be done using something like https://developer.android.com/reference/android/content/pm/PackageManager#queryIntentActivities(android.content.Intent,%20android.content.pm.PackageManager.ResolveInfoFlags) in Android. This would require the implementation of a new method, perhaps something like canOpenFile. The plugin isn't actively maintained with new features, but we would be happy to look over a PR.