Context.BindServiceAsUser 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
BindServiceAsUser(Intent, IServiceConnection, Context+BindServiceFlags, UserHandle) | |
BindServiceAsUser(Intent, IServiceConnection, Int32, UserHandle) |
와 동일한 방식으로 |
BindServiceAsUser(Intent, IServiceConnection, Context+BindServiceFlags, UserHandle)
[Android.Runtime.Register("bindServiceAsUser", "(Landroid/content/Intent;Landroid/content/ServiceConnection;Landroid/content/Context$BindServiceFlags;Landroid/os/UserHandle;)Z", "GetBindServiceAsUser_Landroid_content_Intent_Landroid_content_ServiceConnection_Landroid_content_Context_BindServiceFlags_Landroid_os_UserHandle_Handler", ApiSince=34)]
public virtual bool BindServiceAsUser (Android.Content.Intent service, Android.Content.IServiceConnection conn, Android.Content.Context.BindServiceFlags flags, Android.OS.UserHandle user);
[<Android.Runtime.Register("bindServiceAsUser", "(Landroid/content/Intent;Landroid/content/ServiceConnection;Landroid/content/Context$BindServiceFlags;Landroid/os/UserHandle;)Z", "GetBindServiceAsUser_Landroid_content_Intent_Landroid_content_ServiceConnection_Landroid_content_Context_BindServiceFlags_Landroid_os_UserHandle_Handler", ApiSince=34)>]
abstract member BindServiceAsUser : Android.Content.Intent * Android.Content.IServiceConnection * Android.Content.Context.BindServiceFlags * Android.OS.UserHandle -> bool
override this.BindServiceAsUser : Android.Content.Intent * Android.Content.IServiceConnection * Android.Content.Context.BindServiceFlags * Android.OS.UserHandle -> bool
매개 변수
- service
- Intent
- conn
- IServiceConnection
- flags
- Context.BindServiceFlags
- user
- UserHandle
반환
- 특성
적용 대상
BindServiceAsUser(Intent, IServiceConnection, Int32, UserHandle)
와 동일한 방식으로 #bindService
지정된 user
의 서비스에 바인딩합니다.
[Android.Runtime.Register("bindServiceAsUser", "(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/UserHandle;)Z", "GetBindServiceAsUser_Landroid_content_Intent_Landroid_content_ServiceConnection_ILandroid_os_UserHandle_Handler", ApiSince=30)]
public virtual bool BindServiceAsUser (Android.Content.Intent service, Android.Content.IServiceConnection conn, int flags, Android.OS.UserHandle user);
[<Android.Runtime.Register("bindServiceAsUser", "(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/UserHandle;)Z", "GetBindServiceAsUser_Landroid_content_Intent_Landroid_content_ServiceConnection_ILandroid_os_UserHandle_Handler", ApiSince=30)>]
abstract member BindServiceAsUser : Android.Content.Intent * Android.Content.IServiceConnection * int * Android.OS.UserHandle -> bool
override this.BindServiceAsUser : Android.Content.Intent * Android.Content.IServiceConnection * int * Android.OS.UserHandle -> bool
매개 변수
- service
- Intent
연결할 서비스를 식별합니다. 의도는 명시적 구성 요소 이름을 지정해야 합니다.
- conn
- IServiceConnection
서비스가 시작되고 중지될 때 정보를 받습니다. 유효한 ServiceConnection 개체여야 합니다. null이 아니어야 합니다.
- flags
- Int32
바인딩에 대한 작업 옵션입니다. 0, , , #BIND_AUTO_CREATE
, #BIND_DEBUG_UNBIND
#BIND_NOT_FOREGROUND
, #BIND_ABOVE_CLIENT
, 일 #BIND_ALLOW_OOM_MANAGEMENT
#BIND_WAIVE_PRIORITY
수 있습니다.
#BIND_IMPORTANT
또는 #BIND_ADJUST_WITH_ACTIVITY
중 하나입니다.
- user
- UserHandle
반환
true
시스템이 클라이언트에 바인딩할 권한이 있는 서비스를 가져오는 중이면 이고, false
시스템에서 서비스를 찾을 수 없으면 입니다. 이 메서드가 를 반환false
하더라도 를 호출 #unbindService
하여 연결을 해제해야 합니다.
- 특성
설명
와 동일한 방식으로 #bindService
지정된 user
의 서비스에 바인딩합니다.
다음 조건 중 하나가 충족되어야 합니다. ul>li caller에는<android.Manifest.permission.INTERACT_ACROSS_USERS_FULL
/li><>호출자가 android.Manifest.permission.INTERACT_ACROSS_USERS
있고 (구성 요소의 패키지에 의해 결정됨)와 동일한 패키지 service
가 있고 Android 버전은 적어도 android.os.Build.VERSION_CODES#TIRAMISU
</li><li>호출자가 있고 android.Manifest.permission.INTERACT_ACROSS_USERS
지정된 /li<>li>호출자가 android.Manifest.permission.INTERACT_ACROSS_PROFILES
있고 지정된 user
<user
와 동일한 프로필 그룹에 있으며 /li>와 동일한 패키지<service
에 있습니다.><<</Ul>
이 페이지의 일부는 만들고 공유하며 에 설명된 조건에 따라 사용되는 작업을 기반으로 수정됩니다.