[File Viewer Plugin] Not support Android 8.0?

Forge Component
(6)
Published on 1 Apr by Experts
6 votes
Published on 1 Apr 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.

Great news, it's been fixed. 


Check in Forge, go to File Viewer plugin, then check Version tab. 

Get version 1.2.0 (beta), it's working perfectly now.

Just pass file uri from File Plugin's SaveFile action.

You need to generate native APK again.


Thank you File Viewer Team for your time and effort. 

Hi,

I am using Fileviewerplugin is not working in Android version 10.I got the error, when I opening the attachement.

There is no error message and it is not logged in the Service Center. It can however be output as a drop down message using the output of the FileViewerPlugin Logic.

What I receive is Success = "False", ErrorCode = "", ErrorMessage = "".


thanks,

Jothi