I'm having a hard time updating the categories a user is subscribed to recibe push notifications. Here is my scenario:
Every time the app starts, I'm registering the app for notifications as suggested here by Microsoft using the user preferences stored in the local DB, if the user is not subscribed to any category, I send an empty string array:
try
{
regid = _gcm.register(_senderId);
_hub.register(regid, categories.toArray(new String[categories.size()]));
}
After that, I can see the response back from the server without any problem:
protected void onPostExecute(Object result)
{
String message = "No alert configured";
if(categories.size() > 0)
{
message = "Configured alerts: " + categories.toString();
}
Toast.makeText(_context, message, Toast.LENGTH_LONG).show();
}
But even after that, the device keeps getting push notifications for categories that have been un-subscribed from.
I'm using the same Notification Hub (.net Backend) with the same app in iOS and Android, but this problem only occurs in Android.
Any ideas/suggestions?