Web Intent
This Plugin provides a general purpose shim layer for the Android intent mechanism, exposing various ways to handle sending and receiving intents.
https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent
Stuck on a Cordova issue?
If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.
Installation
- Capacitor
- Cordova
- Enterprise
$ npm install com-darryncampbell-cordova-plugin-intent
$ npm install @awesome-cordova-plugins/web-intent
$ ionic cap sync
$ ionic cordova plugin add com-darryncampbell-cordova-plugin-intent
$ npm install @awesome-cordova-plugins/web-intent
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us
Supported Platforms
- Android
Usage
React
Learn more about using Ionic Native components in React
Angular
For usage information please refer to the plugin's Github repo.
import { WebIntent } from '@awesome-cordova-plugins/web-intent/ngx';
constructor(private webIntent: WebIntent) { }
...
const options = {
action: this.webIntent.ACTION_VIEW,
url: 'path/to/file',
type: 'application/vnd.android.package-archive'
}
this.webIntent.startActivity(options).then(onSuccess, onError);