Updated on 2024-07-30 GMT+08:00
Precautions
- You must register a proxy object to use a notification method.
Single-proxy registration modes:
- Assign a value to the attribute of the HWMOpenSDKConfig object during initialization.
1 2 3
HWMOpenSDKConfig *config = [[HWMOpenSDKConfig alloc] init]; // Example (Use the corresponding proxy as required.) config.confSettingHandler = [NotifyMessageHandler sharedInstance];
- Use [HWMSdk getSdkConfig] to obtain the initialization object and assign a value to the attribute.
1 2
// Example (Use the corresponding proxy as required.) [HWMSdk getSdkConfig].confSettingHandler = [NotifyMessageHandler sharedInstance];
Multi-proxy registration modes:
- Subscription
1 2 3
// Example (Use the corresponding proxy as required.) HWMOpenSDKConfig *config = [HWMSdk getSdkConfig].confSettingHandler; [config subscribeGlobalNotificationHandler:[NotifyMessageHandler sharedInstance]];
- Unsubscription
1 2 3
HWMOpenSDKConfig *config = [HWMSdk getSdkConfig].confSettingHandler; // Example (Use the corresponding proxy as required.) [config unsubscribeGlobalNotificationHandler:[NotifyMessageHandler sharedInstance]];
- Assign a value to the attribute of the HWMOpenSDKConfig object during initialization.
- The proxy method must be written in the proxy object.
- Ensure that the proxy object exists when using the proxy.
Parent topic: Notification Reference
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot