AI-generated Key Takeaways
-
NavigationApi.NavigatorListenerprovides status updates on theNavigatorobject. -
It offers two callbacks:
onErrorfor initialization failures andonNavigatorReadyfor successful creation. -
Callbacks are executed on the UI thread, potentially even after the Activity has finished, requiring checks for Activity status.
-
onErrorprovides an error code fromNavigationApi.ErrorCodefor diagnosing initialization issues. -
onNavigatorReadydelivers the ready-to-useNavigatorinstance.
Register a NavigatorListener with NavigationApi.getNavigator(Activity, NavigatorListener) to be
notified about the status of said Navigator. Note that only one of NavigatorListener's
methods will be called, and that all calls occur on the UI thread.
Note: That method may be called after Activity.finish(), and a check against Activity.isFinishing() or Activity.isDestroyed() may be necessary before some
operations. For example, during a rapid succession of context changes.
Public Method Summary
| abstract void | |
| abstract void |
onNavigatorReady(Navigator navigator)
Indicates that a
Navigator was created successfully, and returns it to the caller. |
Public Methods
public abstract void onError (int errorCode)
Indicates that an error occurred while initializing the Navigator.
Parameters
| errorCode | one of the NavigationApi.ErrorCode constants
|
|---|