Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@capacitor/app-launcher
Advanced tools
The AppLauncher API allows to open other apps
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>
npm install @capacitor/app-launcher
npx cap sync
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' });
};
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.
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
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 8 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.