XPlat Windows APIs
  • XPlat Windows APIs
  • Getting started
  • XPlat.ApplicationModel
    • IPackage
    • IPackage2
    • IPackage3
    • IPackageId
    • Package
    • PackageId
    • PackageVersion
  • XPlat.ApplicationModel.DataTransfer
    • Clipboard
    • DataPackage
    • DataPackageView
    • IDataPackage
    • IDataPackageView
  • XPlat.Core
    • AppPermissionInvalidException
    • CollectionExtensions
    • NSDateExtensions
    • NSObjectExtensions
    • PackageManifestHelper
    • RequestCodeHelper
    • TaskSchedulerAwaiter
    • TimeoutTask
  • XPlat.Device.Display
    • DisplayRequest
    • IDisplayRequest
  • XPlat.Device.Geolocation
    • BasicGeoposition
    • Geocoordinate
    • GeolocationAccessStatus
    • Geolocator
    • Geoposition
    • IGeocoordinate
    • IGeolocator
    • IGeopoint
    • IGeoposition
    • IStatusChangedEventArgs
    • PositionAccuracy
    • PositionChangedEventArgs
    • PositionStatus
    • PositionStatusExtensions
    • StatusChangedEventArgs
  • XPlat.Device.Launcher
    • ILauncher
    • Launcher
    • LaunchQuerySupportStatus
  • XPlat.Device.Power
    • BatteryStatus
    • BatteryStatusChangedEventArgs
    • BatteryStatusChangedEventHandler
    • IPowerManager
    • PowerManager
  • XPlat.Device.Profile
    • AnalyticsInfo
    • AnalyticsVersionInfo
    • IAnalyticsVersionInfo
  • XPlat.Foundation
    • CollectionChange
    • IMapChangedEventArgs
    • IObservableMap
    • IPropertySet
    • MapChangedEventHandler
    • ApplicationData
    • StringMapChangedEventArgs
    • TypedEventHandler
  • XPlat.Media.Capture
    • BitmapExtensions
    • CameraCaptureUI
    • CameraCaptureUIMode
    • CameraCaptureUIPhotoCaptureSettings
    • CameraCaptureUIVideoCaptureSettings
    • ICameraCaptureUI
    • StorageFileExtensions
  • XPlat.Services.Maps
    • IMapAddress
    • IMapLocation
    • IMapLocationFinderResult
    • MapAddress
    • MapLocation
    • MapLocationDesiredAccuracy
    • MapLocationFinder
    • MapLocationFinderResult
    • MapLocationFinderStatus
  • XPlat.Storage
    • ApplicationDataContainer
    • ApplicationDataContainerSettings
    • ApplicationDataCreateDisposition
    • ApplicationDataLocality
    • BasicProperties
    • CreationCollisionOption
    • FileAccessMode
    • FileAttributes
    • IApplicationData
    • IApplicationDataContainer
    • IBasicProperties
    • IImageProperties
    • ImageProperties
    • IMusicProperties
    • IStorageFile
    • IStorageFileExtras
    • IStorageFolder
    • IStorageFolder2
    • IStorageFolderExtras
    • IStorageFolderQueryOperations
    • IStorageItem
    • IStorageItem2
    • IStorageItemContentProperties
    • IStorageItemProperties
    • IVideoProperties
    • KnownFolders
    • MusicProperties
    • NameCollisionOption
    • PhotoOrientation
    • StorageFile
    • StorageFileExtensions
    • StorageFolder
    • StorageItemContentProperties
    • StorageItemContentPropertiesExtensions
    • StorageItemCreationException
    • StorageItemException
    • StorageItemNotFoundException
    • StorageItemTypes
    • VideoOrientation
    • VideoProperties
  • XPlat.Storage.Pickers
    • FileOpenPicker
    • IFileOpenPicker
  • XPlat.UI
    • DispatcherTimer
    • IDispatcherTimer
  • XPlat.UI.Core
    • CoreDispatcher
    • CoreDispatcherPriority
    • DispatchedHandler
    • ICoreDispatcher
Powered by GitBook
On this page
  • Supported platforms
  • Constructors
  • Launcher()
  • Launcher(Android.Content.Context) - Android
  • Properties
  • Context - Android
  • Methods
  • LaunchFolderAsync(IStorageFolder)
  • LaunchUriAsync(Uri)
  • QueryUriSupportAsync(Uri)
  • LaunchFileAsync(IStorageFile)
  1. XPlat.Device.Launcher

Launcher

Namespace: XPlat.Device

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

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.

public Context Context { get; set; }

Methods

LaunchFolderAsync(IStorageFolder)

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

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.

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.

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.

public Task<bool> LaunchFileAsync(IStorageFile file);

Parameters

file (IStorageFile)

The file.

Returns

The launch operation.

PreviousILauncherNextLaunchQuerySupportStatus

Last updated 5 years ago