ShortcutsAndroid
Use this plugin to create shortcuts in Android. Use this plugin to handle Intents on your application. For more information on Android App Shortcuts: https://developer.android.com/guide/topics/ui/shortcuts.html For more information on Android Intents: https://developer.android.com/guide/components/intents-filters.html
The work that went into creating this plug-in was inspired by the existing plugins: cordova-plugin-shortcut and cordova-plugin-webintent2.
https://github.com/avargaskun/cordova-plugin-shortcuts-android
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 cordova-plugin-shortcuts-android $ npm install @ionic-native/shortcuts-android $ ionic cap sync$ ionic cordova plugin add cordova-plugin-shortcuts-android $ npm install @ionic-native/shortcuts-android 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#
Please do refer to the original plugin's repo for detailed usage. The usage example here might not be sufficient.
import { ShortcutsAndroid } from '@ionic-native/shortcuts-android/ngx';
constructor(private shortcutsAndroid: ShortcutsAndroid) { }
...
this.shortcutsAndroid.supportsDynamic() .then((supported: boolean) => console.log(`Dynamic shortcuts are ${supported ? '' : 'not'} supported`)) .catch((error: any) => console.error(error));