Comments (15)
Hi @dnwts
The WP8 part of this plugin is graciously contributed by @Gillardo and I think he might be in a better position to help you, as I can only test the Android parts. Can you please open a ticket on his fork to see if he is able to reproduce this bug?
from cordova-plugin-file-opener2.
Will do. Thanks
from cordova-plugin-file-opener2.
@pwlin Hmm, it seems i cannot add an issue there. Can you please send him a message to review this issue? I can't reach him..
from cordova-plugin-file-opener2.
I have posted a comment on the related pull request #26 (comment)
Hopefully he can help fixing this bug. I am really sorry for not being to help personally.
from cordova-plugin-file-opener2.
Hi there.
Will have a look for you. My original code was specific to an application
that I built so probably not striped something out. Will have a look as
soon as I can for you.
On 7 May 2015 12:36, "pwlin" [email protected] wrote:
I have posted a comment on the related pull request #26 (comment)
#26 (comment)Hopefully he can help fixing this bug. I am really sorry for not being to
help personally.β
Reply to this email directly or view it on GitHub
#27 (comment)
.
from cordova-plugin-file-opener2.
@pwlin no problem mate, i know you do your best and i appreciate your responsiveness π although i think i should've just mentioned @Gillardo ? :)
However, i think there's a chance we'll be aborting the FileTransfer
-> FileOpener2
route for downloading and opening files, and we'll just open the download URL's in the system browser, as it's also much faster than FileTransfer
at downloading stuff.
So basically, if i have my http://server.com/path/to/file.doc
uri in a uri
s variable, i'll do:
await Windows.System.Launcher.LaunchUriAsync(new Uri(uri));
And this currently seems to work ok on WP8.1 but then again i only tested with a couple of documents. I'm also leaving on a week long holiday so we'll see after that, i'll come back with findings.
Cheers
from cordova-plugin-file-opener2.
Oh, hi @Gillardo :) Thanks! It would be great for this to work in case my workaround fails or gets rejected by the client :)
from cordova-plugin-file-opener2.
What file path are u using to open the file?
On 7 May 2015 13:04, "dnwts" [email protected] wrote:
Oh, hi @Gillardo https://github.com/Gillardo :) Thanks! It would be
great for this to work in case my workaround fails or gets rejected by the
client :)β
Reply to this email directly or view it on GitHub
#27 (comment)
.
from cordova-plugin-file-opener2.
On the previous (wp8.0) version it was only using the file name, so that's what i was sending (just the file name) and it used to be like this:
var fileName = System.IO.Path.GetFileName(args[0]);
[...]
StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile file = await local.GetFileAsync(fileName);
I listed the local
folder and my file is getting there, but now this line
StorageFile file = await Windows.Storage.StorageFile.GetFileFromPathAsync(args[0]);
tells me the path is invalid. I'll try to play with the paths, maybe that's what's wrong. If you can't reproduce the issue, don't worry about it and i'll test it more thoroughly when i get back from my holiday. Thank you very much for looking into this π
from cordova-plugin-file-opener2.
Oh that's easy.
U need to pass in the full path for windows 8.1 and thus windows phone 8.1
as because u can use it on a pc the file could be anywhere.
Maybe I could add a setting to search in the local folder first and if not
found, then search for file.
But for now, if u pass in the full path it will work.
On 7 May 2015 15:16, "dnwts" [email protected] wrote:
On the previous (wp8.0) version it was only using the file name, so that's
what i was sending (just the file name) and it used to be like this:var fileName = System.IO.Path.GetFileName(args[0]);
[...]
StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile file = await local.GetFileAsync(fileName);I listed the local folder and my file is getting there, but now this line
StorageFile file = await Windows.Storage.StorageFile.GetFileFromPathAsync(args[0]);
tells me the path is invalid. I'll try to play with the paths, maybe
that's what's wrong. If you can't reproduce the issue, don't worry about it
and i'll test it more thoroughly when i get back from my holiday. Thank you
very much for looking into this [image: π]β
Reply to this email directly or view it on GitHub
#27 (comment)
.
from cordova-plugin-file-opener2.
What would be the full path? Maybe this?
String fullPath = Windows.Storage.ApplicationData.Current.LocalFolder.Path + "/" + fileName;
from cordova-plugin-file-opener2.
Yes but think u need to use \ instead of /.
On windows 8.1 machine it is something like c:....
On 7 May 2015 15:34, "dnwts" [email protected] wrote:
What would be the full path? Maybe this?
String fullPath = Windows.Storage.ApplicationData.Current.LocalFolder.Path + "/" + fileName;
β
Reply to this email directly or view it on GitHub
#27 (comment)
.
from cordova-plugin-file-opener2.
Cool, thanks! I'll be off now, i'll post back when i get back on it :)
from cordova-plugin-file-opener2.
Hey @Gillardo Thanks for your help :)
from cordova-plugin-file-opener2.
Hi there, i'm back :)
I tried what @Gillardo suggested but it didn't work. I don't think it's because of your code though, given it's working on your end, but more because of our possibly sloppy upgrade (it was kinda hectic). But, since WP8.1 didn't deliver the promised debugging capabilities and also introduced another bug which was a deal breaker and we simply couldn't fix (unrelated, some keyboard issue), we decided to revert to WP8.0 and we've got it working fine.
@pwlin @Gillardo Thank you very much for your help :)
from cordova-plugin-file-opener2.
Related Issues (20)
- FileOpener2 error in electron 11 HOT 1
- Plugin is not handling Cookies in React project HOT 1
- Add documentation for error codes
- USB PORT PARAM HOT 1
- doesnt work with IOS and assets-library
- Usage in Capacitor HOT 1
- pdf opened in an external app cannot save changes HOT 1
- Cannot open file while is at app data location '/data/data/<app_id>/cache' HOT 2
- unable to open application/pdf format in Android device (Samsung Galaxy S21 and Samsung Galaxy S21+) HOT 2
- android.support.v4.content.FileProvider not found HOT 7
- Relative URIs are not supported.
- remove: android.permission.REQUEST_INSTALL_PACKAGES from plugins.xml HOT 85
- Text Open file in always localized in english (Android) HOT 4
- There was a problem parsing the package for android install apk HOT 1
- Can't edit file HOT 2
- Getting error after updating plugin to 4.0.0 on Android Studio HOT 2
- Unable to open some MP4 files on iOSοΌ HOT 1
- This plugin has a maintained forked repo now - please use and follow HOT 4
- Error: Current working directory is not a Cordova-based project.
- iPadOS not supported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-file-opener2.