Skip to main content

OH_ArkWeb_RegisterCustomSchemes

Function OH_ArkWeb_RegisterCustomSchemes 

Source
pub unsafe extern "C" fn OH_ArkWeb_RegisterCustomSchemes(
    scheme: *const c_char,
    option: i32,
) -> i32
Available on crate features api-11 and api-12 only.
Expand description

Register custom scheme to the ArkWeb.

Should not be called for built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.

This function should be called on main thread.

§Arguments

  • scheme - The scheme to regist.

  • option - The configuration of the scheme.

§Returns

  • [ARKWEB_NET_OK] 0 - Success. [ARKWEB_ERROR_UNKNOWN] 17100100 - Unknown error. [ARKWEB_INVALID_PARAM] 17100101 - Invalid param. [ARKWEB_SCHEME_REGISTER_FAILED] 17100102 - Register custom schemes should be called before create any ArkWeb.

Required System Capabilities: SystemCapability.Web.Webview.Core

Available since API-level: 12