> For the complete documentation index, see [llms.txt](https://xplat.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xplat.gitbook.io/docs/xplat.device.launcher/launcher.md).

# Launcher

> Namespace: XPlat.Device

Starts the default app associated with the specified file or URI.

```csharp
public class Launcher : ILauncher
```

## Supported platforms

| Platform        | Version    |
| --------------- | ---------- |
| Xamarin.Android | 9.0        |
| UWP             | 10.0.16299 |

## Constructors

### Launcher()

The default constructor.

### Launcher(Android.Content.Context) - Android

#### Parameters

**context (Android.Content.Context)**

The current Android context.

## Properties

### Context - Android

Gets or sets the Android context to be used for launching an Activity with.

```csharp
public Context Context { get; set; }
```

## Methods

### LaunchFolderAsync(IStorageFolder)

Launches a file explorer and displays the contents of the specified folder.

```csharp
public Task<bool> LaunchFolderAsync(IStorageFolder folder);
```

#### Parameters

**folder (IStorageFolder)**

The folder to display in a file explorer.

#### Returns

The result of the operation.

### LaunchUriAsync(Uri)

Launches a web browser and displays the contents of the specified URI.

```csharp
public Task<bool> LaunchUriAsync(Uri uri);
```

#### Parameters

**uri (Uri)**

The URI.

#### Returns

Returns true if the default app for the URI scheme was launched; false otherwise.

### QueryUriSupportAsync(Uri)

Asynchronously query whether an app can be activated for the specified URI.

```csharp
public Task<LaunchQuerySupportStatus> QueryUriSupportAsync(Uri uri);
```

#### Parameters

**uri (Uri)**

The URI for which to query support.

#### Returns

A value that indicates whether an application is available to launch the URI.

### LaunchFileAsync(IStorageFile)

Starts the default app associated with the specified file.

```csharp
public Task<bool> LaunchFileAsync(IStorageFile file);
```

#### Parameters

**file (IStorageFile)**

The file.

#### Returns

The launch operation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xplat.gitbook.io/docs/xplat.device.launcher/launcher.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
