언어

AppFunctionMetadata.ScopeGlobal 필드

정의

주의

This constant will be removed in the future version. Use Android.App.AppFunctions.AppFunctionMetadataScope enum directly instead of this field.

앱 함수가 전역 범위임을 나타내는 상수입니다.

[Android.Runtime.Register("SCOPE_GLOBAL", ApiSince=37)]
[System.Obsolete("This constant will be removed in the future version. Use Android.App.AppFunctions.AppFunctionMetadataScope enum directly instead of this field.", true)]
public const Android.App.AppFunctions.AppFunctionMetadataScope ScopeGlobal = 0;
[<Android.Runtime.Register("SCOPE_GLOBAL", ApiSince=37)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.App.AppFunctions.AppFunctionMetadataScope enum directly instead of this field.", true)>]
val mutable ScopeGlobal : Android.App.AppFunctions.AppFunctionMetadataScope

필드 값

Value = 0

구현

특성

설명

앱 함수가 전역 범위임을 나타내는 상수입니다.

이 범위에서 사용할 수 있는 동일한 AppFunctionName을 사용하여 최대 하나의 앱 함수 구현이 있을 수 있습니다. 이는 포그라운드 서비스와 같은 싱글톤 구성 요소에 연결된 함수에 유용합니다.

AppFunctionManager.registerAppFunction을 사용하는 경우 함수는 명시적으로 등록 취소되거나 호출 컨텍스트가 제거될 때까지 등록된 상태로 유지됩니다.

전역 범위 함수를 실행하려면 AppFunctionManager.executeAppFunction의 호출자가 ExecuteAppFunctionRequest.Builder.setActivityId를 사용하지 않아야 합니다(또는 null로 설정). 그렇지 않으면 AppFunctionException.ERROR_FUNCTION_NOT_FOUND 반환됩니다.

항상 AppFunctionService 기반 함수의 범위입니다.

중요: 작업 컨텍스트에서 호출된 AppFunctionManager.registerAppFunction과 함께 제공되는 함수는 SCOPE_ACTIVITY 선호해야 합니다. 해당 활동의 인스턴스가 하나만 있을 수 있다고 절대적으로 확신하는 경우에만 이러한 함수에 SCOPE_GLOBAL 사용합니다.

에 대한 android.app.appfunctions.AppFunctionMetadata.SCOPE_GLOBALAndroid 참조

이 페이지의 일부는 만들고 공유한 작업을 기반으로 하며 에 설명된 조건에 따라 사용됩니다.

적용 대상