Azure / azure-notificationhubs-java-backend

Azure Notification Hubs SDK for Java
https://docs.microsoft.com/en-us/azure/notification-hubs/
Apache License 2.0
35 stars 49 forks source link

method to get registration by Baidu ChannelId #19

Closed allenhula closed 3 years ago

allenhula commented 7 years ago

This existing method getRegistrationsByChannelAsync internal is sending query with filter "ChannelUri eq", seems only supports for MPNS, not for APNS, GCM and Baidu. I can follow REST API to implement corresponding methods for APNS and GCM, but no luck on Baidu with below queries. Does it not support? Or is my filter condition wrong? • https://{namespace}.servicebus.windows.net/{NotificationHub}/registrations/?$filter= BaiduChannelId eq ‘{BaiduChannelId}’&api-version=2015-01 • https://{namespace}.servicebus.windows.net/{NotificationHub}/registrations/?$filter= Channel eq ‘{BaiduUserId-BaiduChannelId}’&api-version=2015-01 • https://{namespace}.servicebus.windows.net/{NotificationHub}/registrations/?$filter= (BaiduChannelId eq ‘{BaiduChannelId}’) and (BaiduUserId eq ‘{BaiduUserId}’)&api-version=2015-01

allenhula commented 7 years ago

Found the channel name for Baidu. It is BaiduUserId-BaiduChannelId. But we still need the SDK to add corresponding GetRegistrationByChannel methods for APNS, GCM and Baidu.

mpodwysocki commented 3 years ago

@allenhula correct, the channel is as you stated. Will add pnsHandle to the registration class to clarify.