Web Intent

Contents

This Plugin provides a general purpose shim layer for the Android intent mechanism, exposing various ways to handle sending and receiving intents.

Ionic Web Intent插件的安装(Installation)

ionic cordova plugin add com-darryncampbell-cordova-plugin-intent npm install @ionic-native/web-intent

Ionic Web Intent插件支持的平台(Supported Platforms)

  • Android

Ionic Web Intent插件的用法(Usage)

For usage information please refer to the plugin's Github repo.

import { WebIntent } from '@ionic-native/web-intent';

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);