---
updatedAt: 2025-07-15T08:43:45.000Z
agentTools:
  projectIndex: https://docs.appery.io/llms.txt
---

# Solutions

Cordova solutions.

This page provides solutions to various Cordova-related bugs, problems, or workarounds.

# Check if App is Running on Device

The following code helps determine if the app is running in a browser or on a device:

```javascript
var isCordovaApp = function () {
   return (document.URL.indexOf('http://') === -1 && 
    document.URL.indexOf('https://') === -1);
};
// this function will return 
// 'true' - if it's running on the device
// 'false' - if it's running in the browser
console.log(isCordovaApp());
```

# *resolveLocalFileSystemURL* doesn't work

Solving native path of android (**content://**) if **resolveLocalFileSystemURL** doesn't work. [Read more](http://ourcodeworld.com/articles/read/22/solve-native-path-of-android-content-if-resolvelocalfilesystemurl-doesn-t-work).

# PDF generating plugin

## Example with Generating PDF Files

You can watch the below video tutorial to learn how to generate PDF files in Appery.io mobile and web applications using the ***[jsPDF](https://www.npmjs.com/package/jspdf)*** *npm* module and complimentary plug-ins like *jsPDF AutoTable*.\
Follow these instructions to create well-structured PDFs that render correctly across a host of devices and screen resolutions:

<HTMLBlock>{`
<iframe width="610" height="315" src="https://www.youtube.com/embed/rYjFMipXm_0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
`}</HTMLBlock>