I am trying to set the project sender id dynamically by fetching it from a server but it throws the invalid sender id exception. I am fetching the sender id from server in the base Application class to make sure i get it before the application launches and i have also overrided the getSenderIds() method in GCMIntentService.
public GCMIntentService() {
super();
}
@Override
protected String[] getSenderIds(Context context) {
String[] ids = new String[1];
ids[0] = SENDER_ID;
return ids;
}
But i am getting the invalid sender id exception. I'd would really appreciate if some one could give me an informed opinion on how to set the sender id dynammically from a server.