[File Viewer Plugin] Not support Android 8.0?

[File Viewer Plugin] Not support Android 8.0?

  
Forge Component
(4)
Published on 25 Jul (4 weeks ago) by Experts
4 votes
Published on 25 Jul (4 weeks ago) by Experts

It's working fine on Android 6.x and 7.x. It save to the file system successfully, but when I try to open the file through file system, then it fails and without any error message. Is there any work around to handle it?

File Viewer plugin currently is broken with Android N.

The reason that i've upgraded to 1.1.1 was because of the error while generating the app). But now, i've published an older version of this plugin (1.0.0 and 1.1.0), republished consumers and generated the app successfully but the document still not opening by device path.


Android N now no longer permit the use of file:/// uri to access local files.

The owner of this plugin will have to change Android cordova plugin source code in github before we can use this on Android N.

I have replaced "file:///" by "content:///" on File.URI string and works fine on Android 7, but Google Drive don't show a preview anymore :(  


You can't just do that.

Replacing file:// with content:// won't do the job.

It need some permission thing using FileProvider class. 

But I'm no android programmer, so I can't help... 

Harlin Setiadarma wrote:

You can't just do that.

Replacing file:// with content:// won't do the job.

It need some permission thing using FileProvider class. 

But I'm no android programmer, so I can't help... 


It worked by opening the pdf file with Acrobat, but it did not work by opening it with Google Drive to preview.