Alpha Software Blog



Open Sesame! See How to Use Other Mobile Apps with Cordova-Open

Offline appsAlpha Anywhere now supports the Cordova-Open PhoneGap plugin. The Cordova-Open plugin is used to open a file with its associated native app. For example, a PDF file can be displayed using the native PDF viewer on the device or a .mov video file can be watched using the native video player. Files can be loaded from either the mobile device's filesystem or a remote server.

Imagining the Possibilities for Offline-Enabled Mobile Apps

Imagine an app used by a team of service reps who make on-site calls to repair equipment. The equipment at each job site may be different, and the service reps may need access to documentation (PDFs, videos, Word documents, spreadsheets, etc) for the equipment to consult on-site. Additionally, the documentation needs to be accessible offline because there is no guarantee that connectivity is available at each job site. This means the documentation must be downloaded and stored on-device before each service rep leaves the office and viewable on-site without needing to connect to a server.

Alpha Anywhere includes the ability to download and store large amounts of data - videos, PDF documents, databases, etc - on the mobile device using the PhoneGap - File download Action Javascript. However, providing the capabilities to view these files in-app required extending an Alpha Anywhere application to include the ability to open PDFs, play videos, load Word documents, and open spreadsheets.

With the addition of the Cordova-Open plugin, including support to view various files within a PhoneGap application is no longer necessary. This opens up a whole new class of offline accessible mobile apps to Alpha Anywhere developers. Now, native apps on a mobile device can be leveraged by applications created with Alpha Anywhere to view files.

Taking Mobile Apps to the Next Level With Cordova-Open

A mobile application that supports storing files offline and viewing files using native apps can be built using Action Javascript. Only two actions are needed to create this functionality:

    • PhoneGap - File download - Download and store a library files on the mobile device that can be accessed while offline.
To learn more about the PhoneGap - Open File with Native Application action, watch the videos below.

Using the PhoneGap - Open File with Native Application Action to View PDF Files in a Mobile Application

The PhoneGap Cordova-Open plugin allows you to open various file types using the associated native app on a mobile device. For example, if you open a .pdf file, the PDF file is displayed using the native PDF viewer app on the mobile device. If you open a .mp4 file, the video is displayed using the native video viewer on the device. A common use case for this plugin is to download several files when a connection is available so that the files can then be viewer later on when no connection is available.

In the video below, we show how to build an application that displays a list of PDF files stored locally in the device's filesystem. Each file is opened using the PDF viewer on the mobile device using the 'PhoneGap - Open File with Native Application' Action Javascript action. Because the PDF files are stored in the filesystem on the device, they can be viewed even if the device has no network connection.

Viewing Reports in PDF Format on a Mobile Device

Alpha Anywhere's report writer can save reports as PDF files. Using the Cordova-Open plugin in tandem with Alpha Anywhere's report writer, you can build applications that generate and display PDF reports on a mobile device using the native PDF viewer.

Watch the video below to learn how to use the 'PhoneGap - Open File with Native Application' Action Javascript action to display a PDF report on a mobile device using the native PDF viewer. The video explains how to generate and download a PDF report to a mobile device. The PDF report is then displayed using a mobile device's native PDF viewer using the 'PhoneGap - Open File with Native Application' action.

Prev Post Image
Mobile will Eat the World in 2017, says Forrester
Next Post Image
"Write-Your-Own-Apps" (by Citizen Developers) Is the Next Big Trend

About Author

Sarah Mitchell
Sarah Mitchell

Technical Writer and Documentation Expert at Alpha Software

Related Posts
Top Security Concerns for Low-code and No-code Development
Top Security Concerns for Low-code and No-code Development
What Are Super Apps? Get the Facts
What Are Super Apps? Get the Facts
Alpha Anywhere Enables Music Students to Share Performances Despite COVID
Alpha Anywhere Enables Music Students to Share Performances Despite COVID

The Alpha platform is the only unified mobile and web app development and deployment environment with distinct “no-code” and “low-code” components. Using the Alpha TransForm no-code product, business users and developers can take full advantage of all the capabilities of the smartphone to turn any form into a mobile app in minutes, and power users can add advanced app functionality with Alpha TransForm's built-in programming language. IT developers can use the Alpha Anywhere low-code environment to develop complex web or mobile business apps from scratch, integrate data with existing systems of record and workflows (including data collected via Alpha TransForm), and add additional security or authentication requirements to protect corporate data.

Comment