Udostępnij za pośrednictwem


Platform Class

Definition

Platform specific helpers.

public static class Platform
Inheritance
System.Object
Platform

Properties

AppContext

The current application's context.

CurrentActivity

Gets the current Activity. This value is set OnCreate, OnPause, and OnResume.

MapServiceToken

Get or sets the map API key.

Methods

ContinueUserActivity(UIApplication, NSUserActivity, UIApplicationRestorationHandler)

Callback forwarded from the equivalent iOS AppDelegate method.

GetCurrentUIViewController()

Get the currently visible UIViewController.

Init(Activity, Bundle)

Initialize Xamarin.Essentials with Android's activity and bundle.

Init(Application)

Initialize Xamarin.Essentials with Android's application class.

OnLaunched(LaunchActivatedEventArgs)
OnNewIntent(Intent)
OnRequestPermissionsResult(Int32, String[], Permission[])

Pass permission request results from an activity's overridden method to the library for handling internal permission requests.

OnResume(Activity)
OpenUrl(UIApplication, NSUrl, NSDictionary)

Passes the OpenUrl callback of your app to be used for internal API handling.

PerformActionForShortcutItem(UIApplication, UIApplicationShortcutItem, UIOperationHandler)
WaitForActivityAsync(CancellationToken)

Wait for an Activity to be create or active.

Events

ActivityStateChanged

Event that is triggered when any Android Activity's state changes.

Applies to