Azure/azure-notificationhubs-java-backend

method to get registration by Baidu ChannelId

allenhula opened this issue · 2 comments

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

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.

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