Code example for AppStateClient

Methods: connect