Authing DocsDocuments
Concept
workflow
Guides
Development Integration
Application integration
Concept
workflow
Guides
Development Integration
Application integration
Old Version
Development Integration
  • Single Sign-On (SSO)
  • Login component

  • JavaScript/Node.js

  • Java / Kotlin

  • Python

  • C#

  • PHP

  • Go

  • Ruby
  • Android

    • Quick start
    • Hosting page
    • APIs

      • Authentication
      • OIDC
      • MFA
      • Scan to login
      • Device management
      • Event subscription
    • Third-party identity source

    • Scenario

    • On-premise
    • Android Guard Change log
    • Error code
  • iOS

  • Flutter

  • React Native
  • WeChat Mini Program
  • WeChat webpage authorization
  • Framework Integration
  • Error code
  1. Development Integration
  2. /
  3. Android
  4. /
  5. APIs
  6. /
  7. Event subscription

¶ Event subscription API

Update Time: 2026-03-25 09:13:34
Edit

¶ Subscribe events

public static void subEvent(String eventCode, @NotNull Receiver receiver)

Parameter

  • eventCode event code

Example

AuthClient.subEvent("authing.user.updated", new Receiver() {
    @Override
    public void onOpen() {
    		// Connection successful
    }

    @Override
    public void onReceiverMessage(String s) {
     		// Receive a message
    }

    @Override
    public void onError(String s) {
 				// Connection failure
    }
});

¶ Publish event

public static void pubEvent(String eventCode, String eventData, @NotNull AuthCallback<JSONObject> callback)

Parameter

  • eventCode event code
  • eventData data

Example

AuthClient.pubEvent("authing.user.updated", data, (AuthCallback<JSONObject>) (code, message, data) -> {
    if (code == 200 && data != null) {
        // success
    }
});

Prev: Device management Next: Third-party identity source
  • Subscribe events
  • Publish event

User identity management

Integrated third-party login
Mobile phone number flash check (opens new window)
Universal login form component
Custom authentication process

Enterprise internal management

Single Sign On
Multi-factor Authentication
Authority Management

Developers

Development Document
Framework Integration
Blog (opens new window)
GitHub (opens new window)
Community User Center (opens new window)

Company

400 888 2106
sales@authing.cn
16 / F, Block B, NORTH STAR CENTURY CENTER, Beijing(Total)
room 406, 4th floor, zone B, building 1, No. 200, Tianfu Fifth Street, Chengdu(branch)

Beijing ICP No.19051205-1

© Beijing Steamory Technology Co.