Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@capacitor/app

Package Overview
Dependencies
Maintainers
12
Versions
667
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor/app

The App API handles high level App state and events.For example, this API emits events when the app enters and leaves the foreground, handles deeplinks, opens other apps, and manages persisted plugin state.

  • 4.1.1-nightly-20221108T150804.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
240K
increased by0.52%
Maintainers
12
Weekly downloads
 
Created

What is @capacitor/app?

@capacitor/app is a Capacitor plugin that provides various functionalities related to the app lifecycle and state. It allows developers to handle app state changes, manage app URLs, and more.

What are @capacitor/app's main functionalities?

App State

This feature allows you to listen for changes in the app's state, such as when the app becomes active or goes into the background.

import { App } from '@capacitor/app';

App.addListener('appStateChange', (state) => {
  console.log('App state changed. Is active:', state.isActive);
});

App URL Open

This feature allows you to handle URLs that open your app, which is useful for deep linking.

import { App } from '@capacitor/app';

App.addListener('appUrlOpen', (data) => {
  console.log('App opened with URL:', data.url);
});

App Restored Result

This feature allows you to handle the result when your app is restored from a terminated state.

import { App } from '@capacitor/app';

App.addListener('appRestoredResult', (data) => {
  console.log('App restored with result:', data);
});

Get Launch URL

This feature allows you to get the URL that was used to launch the app.

import { App } from '@capacitor/app';

App.getLaunchUrl().then((data) => {
  console.log('App launched with URL:', data.url);
});

Minimize App

This feature allows you to programmatically minimize the app.

import { App } from '@capacitor/app';

App.minimizeApp();

Other packages similar to @capacitor/app

Keywords

FAQs

Package last updated on 08 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc