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

Absolutely nothing happens when trying to open local file! #192

Closed
helenburns opened this issue Jan 24, 2018 · 5 comments
Closed

Absolutely nothing happens when trying to open local file! #192

helenburns opened this issue Jan 24, 2018 · 5 comments

Comments

@helenburns
Copy link

I am trying to open a local file, for which I have the correct path for, in the default app for that mime type. A PDF in this example.

FileOpener2 seemed like the only solution I bumped into, and seemed simple to implement, but absolutely nothing happens when I try to open the file... no errors, no successes, nothing! so I don't know where to start!

I know the path is right because this works:

window.open(path_and_file, '_blank', 'location=no,closebuttoncaption=Close,enableViewportScale=yes');

...but I need to be able to open it in an app that will allow the display of bookmarks and can have several files open at once, so the solution above is not really good enough.

So far I have added the plugin to my config.xml in the same way as I do all my other, correctly functioning plugins:

And have added the following code in place of the window.open code above:

cordova.plugins.fileOpener2.open(
    path_and_file,
    'application/pdf', 
    { 
        error : function(e) { 
            console.log('Error status: ' + e.status + ' - Error message: ' + e.message);
        },
        success : function () {
            console.log('file opened successfully');                
        }
    }
);

...but literally nothing happens! No errors in the console, no file opening, no nothing! I'd move onto the next solution but I can't find another plugin out there that does the same!

The path_and_file variable is in local format, beginning file:///var/mobile/Containers/Data/Application/...

Any help appreciated!

@darylldawn
Copy link

Same problem right now.

@Novan123
Copy link

Novan123 commented Jun 4, 2018

Sam problem with Method "showOpenWithDialog".
It seems, that if there should be shown a decision menu, it is not visible.
The open-method works also not every time. Only if exactly one app for the mimetype is registered. As soon there should be shown a decision menu, nothing happens (?!?)

@darylldawn
Copy link

@Novan123 try taking a look at issue #145 and see if it is related.

@shnist
Copy link
Collaborator

shnist commented Dec 18, 2018

hi @helenburns, thanks for raising this issue. Were you able to resolve it?

@shnist
Copy link
Collaborator

shnist commented Jan 3, 2019

I believe this issue is related to #67. Going to close this one as a duplicate.

@shnist shnist closed this as completed Jan 3, 2019
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

4 participants