disusered / cordova-open

Open audio, video, images and more with applications installed on the user's device
MIT License
54 stars 55 forks source link

Not Prompted To Open #20

Closed rplace closed 9 years ago

rplace commented 9 years ago

Hi, new to github so if this is the wrong place I am sorry. Please point me in the right direction if not the proper place to ask a question. I've got the plugin installed when I access my local PDFs I'm not prompted to open in various readers. Instead it appears to open in InAppviewer. From there in the upper right hand corner there is a place to tap and get prompted for Adobe, etc.

Is that the intended usage? Anyway to get prompted for various readers on the initial selection and avoid InAppviewer? Hoping I am simply doing something wrong.

Thanks much!

disusered commented 9 years ago

Hi, this is definitely the right place! I've been absent after the holidays due to work but am freeing up this weekend and will take a look!

This behavior occurs on iOS as well, I made an issue about it (#15) some time ago. For now I default to InAppViewer/QuickLook where you can choose other options, but I definitely see the use case where you just want to select an app and not preview it. On Android it would just show the Intent modal while iOS could use UIDocumentInteractionController.

I've thought about forking that functionality into its own plugin, but it could also work as a parameter within Open. What do you think?

disusered commented 9 years ago

So just the recap:

Android Launch Intent, if single application exists preview immediately, if multiple applications exist disambiguate. User is presented with option to save intent for future use. Subsequent opens will use the saved intent, or show disambiguation screen again.

iOS Launch QuickLook, preview immediately. Handlers for other applications can be accessed via share menu. Subsequent opens follow this behavior.

As such I feel behavior is consistent: if the file can be viewed/preview, do it. If multiple apps can preview it, let us choose an app. Once in the preview app, we can do transformations and/or export the file.

Instead of making Open a jack-of-all trades, I'm aiming to write more specific file handlers, such as an image viewer that can handle multiple images and create galleries, a video player that can work on remote streams instead of having to download locally like Open does, audio player that uses OS level playback controls, etc.