# Launch External Apps

The launcher is a feature in Wisej.NET Hybrid that enables applications to open a URI by the system. This functionality is particularly useful for deep linking into other applications' custom URI schemes.

## Sample

{% embed url="<https://github.com/iceteagroup/wisej-hybrid-examples/tree/main/ExternalApps>" %}

## Android

*If you want to use deep links to open other Android apps you should define an intent filter in your app. This can be achieved by adding the following XML to the Platforms/Android/AndroidManifest.xml file:*

```xml
<activity android:name="appName" android:exported="true">
    <intent-filter>
       <action android:name="android.intent.action.VIEW" />
       <category android:name="android.intent.category.DEFAULT" />
       <category android:name="android.intent.category.BROWSABLE" />
       <data android:scheme="lyft"/>
       <data android:scheme="fb"/>
       </intent-filter>
</activity>
```

The `<data>` elements are the URI schemes pre-registered with your app. You can't use schemes that aren't defined in the intent filter.

To make your app browsable from other apps declare a `<data>` element with the `android:scheme` attribute:

```xml
<data android:scheme="appName"/>
```

## iOS / MacCatalyst

Apple requires that you define the schemes you want to use. Add the `LSApplicationQueriesSchemes` key and schemes to the *Platforms/iOS/Info.plist* and *Platforms/MacCatalyst/Info.plist* files:

```xml
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>lyft</string>  
    <string>fb</string>
</array>
```

## Usage (Wisej.NET Hybrid)

```csharp
private void button1_Click(object sender, System.EventArgs e)
{
	if (Device.Launcher.CanOpen("lyft://"))
		Device.Launcher.Open("lyft://ridetype?id=lyft_line");
}
```

## Further Reading

{% embed url="<https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/appmodel/launcher?view=net-maui-8.0&tabs=macios>" %}
.NET MAUI Launcher
{% endembed %}
