# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Methods | Inherited Methods

# UiTranslationManager

`public final class UiTranslationManager`
`extends Object` ``

java.lang.Object
↳ | android.view.translation.UiTranslationManager

The `UiTranslationManager` class provides ways for apps to use the ui translation function in framework.

## Summary

### Public methods
`void` | `registerUiTranslationStateCallback(Executor executor, UiTranslationStateCallback callback)` Register for notifications of UI Translation state changes on the foreground activity.
`void` | `unregisterUiTranslationStateCallback(UiTranslationStateCallback callback)` Unregister `callback`.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public methods

### registerUiTranslationStateCallback

    public void registerUiTranslationStateCallback (Executor executor,
                    UiTranslationStateCallback callback)

Register for notifications of UI Translation state changes on the foreground activity. This is available to the owning application itself and also the current input method.

The application whose UI is being translated can use this to customize the UI Translation behavior in ways that aren't made easy by methods like View#onCreateTranslationRequest().

Input methods can use this to offer complementary features to UI Translation; for example, enabling outgoing message translation when the system is translating incoming messages in a communication app.

Parameters
`executor` | `Executor`: This value cannot be `null`. Callback and listener events are dispatched through this `Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `Context.getMainExecutor()`. To dispatch events through a shared thread pool, you can use `AsyncTask#THREAD_POOL_EXECUTOR`.
`callback` | `UiTranslationStateCallback`: the callback to register for receiving the state change notifications This value cannot be `null`.

### unregisterUiTranslationStateCallback

    public void unregisterUiTranslationStateCallback (UiTranslationStateCallback callback)

Unregister `callback`.

Parameters
`callback` | `UiTranslationStateCallback`: This value cannot be `null`.

See also:

- `registerUiTranslationStateCallback(Executor, UiTranslationStateCallback)`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*