When I use the subscribeToCloudMessage() function with CloudBackendMessaging.TOPIC_ID_BROADCAST as the topicId as is done in CloudBackendFragment.java everything works fine
It seems like the subscription ids are being generated using some algorythm that mainly uses the regid that is obtained when you first fire up the mobile backend starter app. To solve this issue when I had it I just called substring on the given regid and shortened it considerably but still left it long enough to guarantee some level of uniqueness.
private static String doRegister(Context context) { String msg = ""; try { GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context); String regId = gcm.register(Consts.PROJECT_NUMBER).substring(0,16); msg = "Device registered, registration ID=" + regId;
This method is located in the GCMIntentService.java file.
Notice the
.substring(0,16);
Worked for me! just thought I'd share.