car/app/app/src/main/java/androidx/car/app/AppManager.java
/**
     * Shows a toast on the car screen.
     *
     * @param text     the text to show
     * @param duration how long to display the message
     * @throws HostException        if the remote call fails
     * @throws NullPointerException if {@code text} is {@code null}
     */
Shows a toast on the car screen.
@param text     the text to show
@param duration how long to display the message
@throws HostException        if the remote call fails
@throws NullPointerException if  text is  null
Shows a toast on the car screen . @param text the text to show @param duration how long to display the message @throws HostException if the remote call fails @throws NullPointerException if text is null
public void showToast(@NonNull CharSequence text, @CarToast.Duration int duration) {
        requireNonNull(text);
        mHostDispatcher.dispatch(
                CarContext.APP_SERVICE,
                "showToast", (IAppHost host) -> {
                    host.showToast(text, duration);
                    return null;
                }
        );
    }
public void showToast ( @ NonNull CharSequence text , @ CarToast . Duration int duration ) { requireNonNull ( text ) ; mHostDispatcher . dispatch ( CarContext . APP_SERVICE , "showToast" , ( IAppHost host ) -> { host . showToast ( text , duration ) ; return null ; } ) ; }
Shows a toast on the car screen.
Shows a toast on the car screen .