Skip to content

Commit

Permalink
added support for Electron platform
Browse files Browse the repository at this point in the history
  • Loading branch information
pwlin committed Jul 26, 2020
1 parent 3a6047c commit 5c9b725
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Opens a file
- Android 4.4+
- iOS 9+
- Windows
- WP8
- Electron

### Quick Examples
Open an APK install dialog:
Expand Down Expand Up @@ -90,6 +90,8 @@ cordova.plugins.fileOpener2.open(
);
```

__Note on Electron:__ Do not forget to enable Node.js in your app by adding `"nodeIntegration": true` to `platforms/electron/platform_www/cdv-electron-settings.json` file, See [Cordova-Electron documentation](https://cordova.apache.org/docs/en/latest/guide/platforms/electron/index.html#customizing-the-application's-window-options).

### Market place installation
Install From Market: to install an APK from a market place, such as Google Play or the App Store, you can use an `<a>` tag in combination with the `market://` protocol:

Expand Down
8 changes: 8 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,12 @@
<runs/>
</js-module>
</platform>

<!-- electron -->
<platform name="electron">
<js-module src="src/electron/FileOpener2.js" name="fileOpener2">
<merges target="" />
</js-module>
</platform>

</plugin>

0 comments on commit 5c9b725

Please sign in to comment.