npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fatlirmorina/cordova-plugin-autostart

v2.3.2

Published

The application will be automatically started after the every boot and the automatic update of your application. You can enable or disable the autostart function in your app.

Readme

Cordova Autostart Plugin

npm License

Automatically start your Cordova application after device boot or application update. This plugin provides autostart functionality for Android and macOS platforms.

Features

  • Android: Auto-start app after device boot
  • macOS: Launch helper applications at boot
  • Service Support: Start background services automatically
  • Easy Control: Enable/disable autostart functionality

Supported Platforms

  • Android (API level 14+)
  • macOS

Installation

Install from npm

cordova plugin add @fatlirmorina/cordova-plugin-autostart

Install from GitHub

cordova plugin add https://github.com/fatlirmorina/cordova-plugin-autostart.git

Usage

Basic Autostart

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {
  // Enable autostart for your main application
  cordova.plugins.autoStart.enable();

  // Disable autostart
  // cordova.plugins.autoStart.disable();
}

Service Autostart

// Android: Start a service automatically
// The service class name should be the full class name of your service
cordova.plugins.autoStart.enableService("com.yourcompany.yourapp.YourServiceClass");

// macOS: Launch a helper application with bundle identifier
cordova.plugins.autoStart.enableService("com.yourcompany.helper-app");

API Reference

Methods

enable()

Enables autostart for your main application.

Platforms: Android

cordova.plugins.autoStart.enable();

enableService(serviceClass)

Enables autostart for a specific service or helper application.

Parameters:

  • serviceClass (string):
    • Android: Full class name of the service (e.g., "com.yourcompany.yourapp.YourService")
    • macOS: Bundle identifier of the helper application

Platforms: Android, macOS

// Android
cordova.plugins.autoStart.enableService("com.yourcompany.yourapp.YourService");

// macOS
cordova.plugins.autoStart.enableService("com.yourcompany.helper-app");

disable()

Disables autostart functionality for both app and services.

Platforms: Android, macOS

cordova.plugins.autoStart.disable();

Platform-Specific Notes

Android

  • Requires RECEIVE_BOOT_COMPLETED permission (automatically added)
  • App must be installed on internal storage (not SD card)
  • Some Android (fireOS) versions may require users to manually enable autostart in device settings
  • For some Android (fireOS) generations, additional permissions may need to be granted manually via ADB:
adb shell pm grant com.yourapp android.permission.SYSTEM_ALERT_WINDOW

macOS

  • Requires helper application to be properly signed
  • May require user permission for login items
  • Helper applications should be lightweight and follow macOS guidelines

Permissions

Android

The plugin automatically adds the required permission:

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

For some Android (fireOS) generations, you may need to manually grant additional permissions via ADB:

# Grant system alert window permission (if required for your app)
adb shell pm grant com.yourapp android.permission.SYSTEM_ALERT_WINDOW

TypeScript Support

This plugin includes TypeScript definitions. Example usage:

declare var cordova: any;

// Enable autostart
cordova.plugins.autoStart.enable();

// Enable service autostart
cordova.plugins.autoStart.enableService("com.yourcompany.yourapp.YourService");

Troubleshooting

Android

  • App doesn't start after reboot: Check if the app is installed on internal storage, not SD card
  • Permission denied: Ensure the app has been launched at least once manually
  • Battery optimization: Some devices may require disabling battery optimization for the app
  • Missing permissions: For some Android generations, manually grant permissions via ADB:
    adb shell pm grant com.yourapp android.permission.SYSTEM_ALERT_WINDOW

macOS

  • Helper not launching: Check macOS Security & Privacy settings for login items
  • Permission issues: Ensure helper application is properly signed

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Author

fatlirmorina

Support

If you encounter any issues or have questions:

  1. Check the existing issues
  2. Create a new issue with detailed information
  3. Include device type, OS version, and plugin version in your report

Star this repository if you find it helpful!