User requirements: Users develop their own APP and want to send O2OA messages to their APP through O2OA integrated aurora push message. The premise is that this app needs to integrate aurora’s SDK.

The integration aurora SDK can be found in the official Aurora documentation: Integration Documentation

Get the mobile device number

After the integration is complete, use SDK to obtain the device number of the current device:

android, kotlin:

val device = JPushInterface.getRegistrationID(this)
Copy the code

ios, swift:

JPUSHService.registrationIDCompletionHandler { (resCode, RegistrationID) in if resCode == 0 {o2logger. debug(" "\(registrationID?? "")") O2AuthSDK.shared.setDeviceToken(token: "RegistrationIDerror0x0x ")}else{o2logger. debug( code:\(resCode)") O2AuthSDK.shared.setDeviceToken(token: registrationID ?? "registrationIDerror0x0x") } }Copy the code

Bind the device number to the user property

Can open O2OA push related API interface document:

Address http://host: 20020 / x \ _jpush \ _assemble \ _control jest/index. The HTML

DeviceAction: DeviceAction: DeviceAction: DeviceAction: DeviceAction: DeviceAction

API call description:

These apis require users to log in before they can use them. Therefore, external apps need to use single sign-on (SSO) first and pass tokens when requesting apis.

The API documentation explains how to invoke these requests, such as this binding device number:

POST request address: http://host address: 20020 / x \ _jpush \ _assemble \ _control/jaxrs/device/bind

Body: {“deviceName”: “device number obtained by aurora SDK above “, “deviceType”: “Current device is ios or Android “}

Header:

x-token: *******

Content-Type: application/json

.

Is followed to O2OA server configuration information push and some configuration of the aurora, refer to: www.yuque.com/docs/share/… “O2OA Mobile Terminal APP Directly Connected version how to open message Push”