public abstract class

TrustedWebActivityCallback

extends java.lang.Object

 java.lang.Object

↳androidx.browser.trusted.TrustedWebActivityCallback

Gradle dependencies

compile group: 'androidx.browser', name: 'browser', version: '1.4.0'

  • groupId: androidx.browser
  • artifactId: browser
  • version: 1.4.0

Artifact androidx.browser:browser:1.4.0 it located at Google repository (https://maven.google.com/)

Androidx artifact mapping:

androidx.browser:browser com.android.support:customtabs

Overview

A callback class for browser to get messages from client app. The callbacks should be called via TrustedWebActivityCallbackRemote on client app.

Summary

Constructors
publicTrustedWebActivityCallback()

Methods
public abstract voidonExtraCallback(java.lang.String callbackName, Bundle args)

Free-form callback that may be provided by the implementation.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public TrustedWebActivityCallback()

Methods

public abstract void onExtraCallback(java.lang.String callbackName, Bundle args)

Free-form callback that may be provided by the implementation.

Note:Clients should never rely on this callback to be called and/or to have a defined behavior, as it is entirely implementation-defined and not supported.

This can be used by implementations to add extra callbacks, for testing or experimental purposes.

Parameters:

callbackName: Name of the extra callback.
args: Arguments for the callback

Source

/*
 * Copyright 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.browser.trusted;

import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
 * A callback class for browser to get messages from client app. The callbacks should be called via
 * {@link TrustedWebActivityCallbackRemote} on client app.
 */
public abstract class TrustedWebActivityCallback {
    /**
     * Free-form callback that may be provided by the implementation.
     *
     * <p>
     * <strong>Note:</strong>Clients should <strong>never</strong> rely on this callback to be
     * called and/or to have a defined behavior, as it is entirely implementation-defined and not
     * supported.
     *
     * <p> This can be used by implementations to add extra callbacks, for testing or experimental
     * purposes.
     *
     * @param callbackName Name of the extra callback.
     * @param args         Arguments for the callback
     */
    public abstract void onExtraCallback(@NonNull String callbackName, @Nullable Bundle args);
}