Amplify has a local eventing system called Hub. It is a lightweight implementation of Publisher-Subscriber pattern, and is used to share data between modules and components in your app. Amplify uses Hub for different categories to communicate with one another when specific events occur, such as authentication events like a user sign-in or notification of a file download.
## Working with the API
### Listening for messages
import android0 from "/src/fragments/lib/utilities/android/hub/10_listen_start.mdx";
import ios1 from "/src/fragments/lib/utilities/ios/hub/10_listen_start.mdx";
import android2 from "/src/fragments/lib/auth/android/hub_events/10_listen_events.mdx";
import ios3 from "/src/fragments/lib/auth/ios/hub_events/10_listen_events.mdx";
### Stop Listening
import android4 from "/src/fragments/lib/utilities/android/hub/20_listen_stop.mdx";
import ios5 from "/src/fragments/lib/utilities/ios/hub/20_listen_stop.mdx";