Skip to content

tvd12/ezyfox-server-android-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ezyfox-server-android-client

android client for ezyfox server

Synopsis

android client for ezyfox server

Documentation

https://youngmonkeys.org/ezyfox-android-client-sdk/

Code Example

1. Create a TCP Client

val clients = EzyClients.getInstance()
val client = clients.newClient(config)

2. Setup the client

val setup = client.setup()
setup.addEventHandler(EzyEventType.CONNECTION_SUCCESS, ExConnectionSuccessHandler())
setup.addEventHandler(EzyEventType.CONNECTION_FAILURE, EzyConnectionFailureHandler())
setup.addEventHandler(EzyEventType.DISCONNECTION, ExDisconnectionHandler())
setup.addDataHandler(EzyCommand.HANDSHAKE, ExHandshakeHandler())
setup.addDataHandler(EzyCommand.LOGIN, ExLoginSuccessHandler())

3. Setup an application

val appSetup = setup.setupApp(APP_NAME)
appSetup.addDataHandler(Commands.SUGGEST_CONTACTS, SuggestContactsResponseHandler())
appSetup.addDataHandler(Commands.SEARCH_CONTACTS, SearchContactsResponseHandler())
appSetup.addDataHandler(Commands.ADD_CONTACTS, AddContactsResponseHandler())

Used By

  1. freechat

Releases

No releases published

Packages

No packages published

Languages

  • Java 97.1%
  • Kotlin 2.9%