Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional method? #20

Closed
sikron opened this issue Feb 20, 2015 · 3 comments
Closed

Additional method? #20

sikron opened this issue Feb 20, 2015 · 3 comments

Comments

@sikron
Copy link

sikron commented Feb 20, 2015

Hi,
it would be great, if you could add an additional method to check, whether there is any app installed, which can open a file by mimetype. E.g. like "canOpenFile(...)" in "Smile-SA/cordova-plugin-fileopener".

Big thx for this plugin, it helped me a lot!

@pwlin
Copy link
Owner

pwlin commented Feb 24, 2015

Hi @sikron,
Thanks for your suggestion. The problem I am facing at the moment is that I don't own any iDevices, so any extra method I implement would be Android-only. I think this might be a problem in the long run, as normally PhoneGap/Cordova functions should be cross-platform. But on the other hand, I already have 2 Android-only functions (uninstall and appIsInstalled) so I really have some mix feelings about adding more Android-only functions.

What are your thought? Do you need this particular function cross-platform or only on Android?

@sikron
Copy link
Author

sikron commented Feb 24, 2015

Hi,
As this plugin also supports iOS i thought that you would also know how to implement it in iOS.
I agree with you, that both platforms should support the whole functionality, so a further Android-specific version would not be in the cross-platform sense.
I actually would need it in Android and iOS of course :-) Maybe i can ask a iOS-dev-colleague for help. I will come back to you again.

bye!

@sikron
Copy link
Author

sikron commented Feb 25, 2015

Hi,
my colleague tells me, that on iOS this is not so straight-forward. On iOS you have this UIDocumentInteractionController, which accepts files and either opens them directly or shows a grey modal containing apps, which can open the file. But it does not provide a "canOpen" functionality unfortunately.

My actual use-case was to check, whether the device can open a file, so to know, whether to download it in the first place (and thus maybe save megabytes of data-traffic).

So from my point of view, no common denominator here, unfortunately. :-(

@sikron sikron closed this as completed Feb 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants