Ionic Autostart


Ionic Autostart – This plugin is basically used to start the Android Application automatically when device boot or auto-update of application. This is manageable from your app you can enable or disable this from your application. Here in this tutorial, we are going to explain how you can use this native plugin in Ionic.


Ionic Autostart Cordova Plugin Native Example

You can install and use th AutoStrat Plugin simply as below-

Installation

To install the cordova-plugin-autostart run the below command-

Ionic Autostart Plugin Native Example:

$ ionic cordova plugin add cordova-plugin-autostart
$ npm install --save @ionic-native/autostart

Supported Platforms

This plugin is supported in Only following platform-

  • Android

Example

Here is an example of Ionic Android Autostart Plugin

| Example:

import { Autostart } from '@ionic-native/autostart';


constructor(private autostart: Autostart) { }

...

this.autostart.enable();

this.autostart.disable();

Instance Methods

There are basically two instance methods enable and disable let us quickley go through.

  • enable– This is used to enable automatic start on boot.
  • disable– This is used to disable automatic start on boot.

Advertisements

Add Comment

📖 Read More