Skip to content

Android platform specific customization

githubcatw edited this page Apr 7, 2023 · 4 revisions

This page lists platform specific customization options for Android.

BWAndroidConfig.SetColor(Color)

Introduced in Browser Window 1.1.

Sets the color of a browser window's toolbar (usually the place where the page's title or URL is shown).

Accepts a Unity Color.

Example

To make the custom tab red:

// Assuming androidConfig is a BWAndroidConfig
androidConfig.SetColor(Color.red);

To set the same color as the main camera's background (useful in UI apps):

var cam = Camera.main;
if (cam != null) {
    androidConfig.SetColor(cam.backgroundColor);
}

A more complete example can be found in the sample scene: OpenColored()

BWAndroidConfig.DisableSharing()

Introduced in Browser Window 1.2.

Disables the sharing feature of a browser window.

Example

// Assuming androidConfig is a BWAndroidConfig
androidConfig.DisableSharing();

Clone this wiki locally