
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@capacitor/app-launcher
Advanced tools
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 or url schemes you want to query in the AndroidManifest.xml inside the queries tag.
Example:
<queries>
<!-- Query by package name -->
<package android:name="com.twitter.android" />
<!-- Query by url scheme -->
<intent>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="twitter"/>
</intent>
</queries>
npm install @capacitor/app-launcher
npx cap sync
import { AppLauncher } from '@capacitor/app-launcher';
const checkCanOpenTwitterUrl = async () => {
const { value } = await AppLauncher.canOpenUrl({ url: 'twitter://timeline' });
console.log('Can open url: ', value);
};
const openTwitterUrl = async () => {
const { completed } = await AppLauncher.openUrl({ url: 'twitter://timeline' });
console.log('openUrl completed: ', completed);
};
// Android only
const checkCanOpenTwitterPackage = async () => {
const { value } = await AppLauncher.canOpenUrl({ url: 'com.twitter.android' });
console.log('Can open package: ', value);
};
// Android only
const openTwitterPackage = async () => {
const { completed } = await AppLauncher.openUrl({ url: 'com.twitter.android' });
console.log('openUrl package completed: ', completed);
};
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.
On Android the URL can be a known URLScheme or an app package name.
On Android 11
and newer you have to add the app package names or url schemes you want to query in the AndroidManifest.xml
inside the queries tag.
| Param | Type |
|---|---|
options | CanOpenURLOptions |
Returns: Promise<CanOpenURLResult>
Since: 1.0.0
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.
| Param | Type |
|---|---|
options | OpenURLOptions |
Returns: Promise<OpenURLResult>
Since: 1.0.0
| Prop | Type |
|---|---|
value | boolean |
| Prop | Type |
|---|---|
url | string |
| Prop | Type |
|---|---|
completed | boolean |
| Prop | Type |
|---|---|
url | string |
FAQs
The AppLauncher API allows to open other apps
The npm package @capacitor/app-launcher receives a total of 53,346 weekly downloads. As such, @capacitor/app-launcher popularity was classified as popular.
We found that @capacitor/app-launcher demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 18 open source maintainers collaborating on the project.
Did you know?

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.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.