cordova-plugin-fileopener icon indicating copy to clipboard operation
cordova-plugin-fileopener copied to clipboard

Fix issue #15

Open chingfeng opened this issue 7 years ago • 10 comments

Thank for this project(cordova-plugin-fileopener), it help me a lot. :)

This feature branch may be helpful to fix issue #15, and it work for me. Please review and decide merge or not.

chingfeng avatar Mar 08 '18 03:03 chingfeng

I haven't been able to make it work. The android.support.v4.content package is missing. Maybe we need to add <framework src="com.android.support:support-v4:23.3.0+" /> in plugins.xml?

marob avatar Mar 10 '18 18:03 marob

Yes, we need to add it in plugins.xml

chingfeng avatar Mar 10 '18 20:03 chingfeng

@marob does this work OK? I'm currently stuck with Android 7 not opening PDFs and I can't get the above fix working unfortunately - not sure what I'm doing wrong. Any ideas @chingfeng (also thanks for this fix! - not sure why its taking so long for Cordova to support Android 7.)

alsocalledchris avatar Apr 16 '18 07:04 alsocalledchris

@alsocalledchris I've not had the time to fully test it (also I'm not working in mobile development anymore so it doesn't really help). That's why the PR has not been merged yet. Have you tested with the fix in this PR or from the latest released version of this plugin?

marob avatar Apr 16 '18 08:04 marob

@marob thanks, that's a shame - testing with the fix from the PR.

alsocalledchris avatar Apr 16 '18 08:04 alsocalledchris

@alsocalledchris Do you have any logs we could use to investigate?

marob avatar Apr 16 '18 10:04 marob

In my case After merge PR, the plugin works well on SONY Tablet(Android 7.1.1) @alsocalledchris Maybe you can try some of bellow:

cordova plugin add https://github.com/chingfeng/cordova-plugin-fileopener.git

// Sample code const url = 'http://654lab.webstarts.com/uploads/csvt_overview.pdf' const onSuccess = (data) => { console.log('Success') } const onError = (error) => { console.log('Error') }
window.cordova.plugins.FileOpener.openFile(url, onSuccess, onError)

chingfeng avatar Apr 16 '18 11:04 chingfeng

It works for me at Android 8.1.0

Eyrum avatar Aug 06 '18 06:08 Eyrum

Works on Android 9.0

Flybring avatar Oct 17 '18 08:10 Flybring

Can anyone validate that the PR is working? I don't have time nor a project to test against on my end.

marob avatar Jan 02 '19 15:01 marob