ILocationButtonProvider.OpenSession Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Asynchronously requests a new Location Button session.
[Android.Runtime.Register("openSession", "(Landroid/app/Activity;Landroid/os/IBinder;ILandroid/app/permissionui/LocationButtonRequest;Ljava/util/concurrent/Executor;Landroid/app/permissionui/LocationButtonClient;)V", "GetOpenSession_Landroid_app_Activity_Landroid_os_IBinder_ILandroid_app_permissionui_LocationButtonRequest_Ljava_util_concurrent_Executor_Landroid_app_permissionui_LocationButtonClient_Handler:Android.App.PermissionUI.ILocationButtonProviderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=37)]
public void OpenSession(Android.App.Activity activity, Android.OS.IBinder hostToken, int displayId, Android.App.PermissionUI.LocationButtonRequest request, Java.Util.Concurrent.IExecutor clientExecutor, Android.App.PermissionUI.ILocationButtonClient client);
[<Android.Runtime.Register("openSession", "(Landroid/app/Activity;Landroid/os/IBinder;ILandroid/app/permissionui/LocationButtonRequest;Ljava/util/concurrent/Executor;Landroid/app/permissionui/LocationButtonClient;)V", "GetOpenSession_Landroid_app_Activity_Landroid_os_IBinder_ILandroid_app_permissionui_LocationButtonRequest_Ljava_util_concurrent_Executor_Landroid_app_permissionui_LocationButtonClient_Handler:Android.App.PermissionUI.ILocationButtonProviderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=37)>]
abstract member OpenSession : Android.App.Activity * Android.OS.IBinder * int * Android.App.PermissionUI.LocationButtonRequest * Java.Util.Concurrent.IExecutor * Android.App.PermissionUI.ILocationButtonClient -> unit
Parameters
- activity
- Activity
Host app activity which launch permission activity in its task.
- hostToken
- IBinder
A token for the host window.
- displayId
- Int32
The ID of the display where the button will appear.
- request
- LocationButtonRequest
A LocationButtonRequest defining the button's appearance.
- clientExecutor
- IExecutor
The Executor on which to invoke all client callbacks.
- client
- ILocationButtonClient
The LocationButtonClient to receive session events and results.
- Attributes
Remarks
Asynchronously requests a new Location Button session.
This method initiates a request to the system to create a location button. The button's UI is rendered in a separate process and embedded within the application's view hierarchy. User interaction with the button is handled securely by the system.
The outcome of this request, including the created LocationButtonSession or any errors, is delivered asynchronously to the provided LocationButtonClient.
Android reference for android.app.permissionui.LocationButtonProvider.openSession.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.