How to view documents in mobile APP

Hi,

We have a requirement where we need to view documents like (.pdf,.doc,.ppt,.ps,.scrom) inside the mobile app without downloading. Can you please suggest us how to achieve this in Appzillon
Hi Sreenadh,

You can use launchWebview plugin to open a file without downloading it by passing URL link of the file hosted in the network.
Mentioned plugin accepts URL as param to open the file. Also please mention Appzillon version you are using in case of further queries.
Hi,

We are using Appzillon version 3.1.42. Does the launchWebview plugin available in the mentioned version.
Instead of network URL directly is it possible to open the file using BASE64 (entire file will be converted as base64 string) content.

Regards,
Sreenadh
Hi Sreenadh,

We'd like to know the exact requirement details in steps.

Regards,

Siddu.
Hi,

Our requirement is we have a admin portal where different type of documents(.ps,.doc,.scorm,.pdf,.ppt and etc) will be uploaded and we have a mobile app where uploaded documents can be viewed without downloading the documents.

As you suggested earlier we have used launchWebView plugin, with this only pdf documents are viewable without downloading other documents are redirecting to browser and downloading. Is there any option to enable plugin options for webview. It is like enabling plugins in native android app please find below example for reference

WebSettings webSettings = myWebView.getSettings();
webSettings.setPluginState(PluginState.ON);

Is there any option like mentioned above in Appzillon using launchWebView ?

Regards,
Sreenadh
Hi Sreenadh,

As of now there is no plugin support for viewing documents within webview in Appzillon.
However you can try below sample code that uses google drive gview to view the document.
add "https://drive.google.com/gview?embedded=true&url=" as prefix to your URL that you pass for launchWebView plugin.
below is snippet

var complete_url = "https://drive.google.com/gview?embedded=true&url=" + "your_url_link_to_hosted_file";
i.e
var complete_url = "https://drive.google.com/gview?embedded=true&url=" + "https://www.w3.org/WAI/ER/tests/xhtml/t ... /dummy.pdf";

var json = {
"URL": complete_url,
...............
}
appzillon.plugin.launchWebview(json);

Disclaimer : Please check terms and conditions for using drive.google.com/gview? from Google website from your end.

Regards,
Siddu