Socket
Book a DemoInstallSign in
Socket

@capacitor/app-launcher

Package Overview
Dependencies
Maintainers
15
Versions
862
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor/app-launcher

The AppLauncher API allows to open other apps

7.0.2
latest
Source
npmnpm
Version published
Weekly downloads
54K
12.59%
Maintainers
15
Weekly downloads
 
Created
Source

@capacitor/app-launcher

The AppLauncher API allows your app to check if an app can be opened and open it.

On iOS you can only open apps if you know their url scheme.

On Android you can open apps if you know their url scheme or use their public package name.

Note: On Android 11 and newer you have to add the app package names you want to query in the AndroidManifest.xml inside the queries tag.

Example:

<queries>
  <package android:name="com.getcapacitor.myapp" />
</queries>

Install

npm install @capacitor/app-launcher
npx cap sync

Example

import { AppLauncher } from '@capacitor/app-launcher';

const checkCanOpenUrl = async () => {
  const { value } = await AppLauncher.canOpenUrl({ url: 'com.getcapacitor.myapp' });

  console.log('Can open url: ', value);
};

const openPortfolioPage = async () => {
  await AppLauncher.openUrl({ url: 'com.getcapacitor.myapp://page?id=portfolio' });
};

API

canOpenUrl(...)

canOpenUrl(options: CanOpenURLOptions) => Promise<CanOpenURLResult>

Check if an app can be opened with the given URL.

On iOS you must declare the URL schemes you pass to this method by adding the LSApplicationQueriesSchemes key to your app's Info.plist file. Learn more about configuring Info.plist.

This method always returns false for undeclared schemes, whether or not an appropriate app is installed. To learn more about the key, see LSApplicationQueriesSchemes.

ParamType
optionsCanOpenURLOptions

Returns: Promise<CanOpenURLResult>

Since: 1.0.0

openUrl(...)

openUrl(options: OpenURLOptions) => Promise<OpenURLResult>

Open an app with the given URL. On iOS the URL should be a known URLScheme. On Android the URL can be a known URLScheme or an app package name.

ParamType
optionsOpenURLOptions

Returns: Promise<OpenURLResult>

Since: 1.0.0

Interfaces

CanOpenURLResult

PropType
valueboolean

CanOpenURLOptions

PropType
urlstring

OpenURLResult

PropType
completedboolean

OpenURLOptions

PropType
urlstring

Keywords

capacitor

FAQs

Package last updated on 05 Aug 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.