empeeinteractive
Aspiring developer
Profile
Posts: 7
Reg: Jan 18, 2011
USA
1,570
02/15/14 01:32 AM (11 years ago)

Push Notification setup/GCM Error

Hello, My app is setup to send out push notifications and I'm using the buzztouch panel. However, when the app is installed and the popup for user to allow notification comes up, when the user accepts notification, the following error pops up "There was a problem communicating with the Google Cloud Messaging system. Is the device online? Is the device logged into a Google Account?" I've already setup GCM from buzztouch control panel and also the device was online and was logged into a google account. What I'm I doing wrong? Please kindly help as I'm supposed to have the app launched on Google Store by next week :( Any help will be appreciated. Thanks
 
Masons App Design
Aspiring developer
Profile
Posts: 206
Reg: Aug 06, 2013
Andrews, TX
12,660
like
03/17/14 09:12 AM (11 years ago)
Did you add the project number into the config.gcm.java file in your code? Check out this how at the bottom it shows about this. I had the same issue and this seemed to clear it up. https://www.buzztouch.com/files/howtos/HowToAndroidPushWithGCMForBuzzTouchPush.pdf
 
Andrusito
Aspiring developer
Profile
Posts: 45
Reg: Jun 17, 2013
cordoba
450
like
12/17/14 08:23 AM (10 years ago)
I have the same problem.. but the new location to set the Project number is on the manifest.xml. This is how BT_gcmConfig.java looks like to me: ========================= package com.pruebasandroid; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; public class BT_gcmConfig{ //name of this class for the debugger... static final String CLASS_NAME = "BT_gcmConfig"; //Google GCM API Project Number (provided by google), setup in AndroidManifest.xml... static final String SENDER_ID = getGCMProjectNumber(); //tags for log messages... static final String TAG = "GCM"; static final String DISPLAY_MESSAGE_ACTION = "com.pruebasandroid.DISPLAY_MESSAGE"; static final String EXTRA_MESSAGE = "message"; //tells UI to show a message... static void displayMessage(Context context, String message) { Intent intent = new Intent(DISPLAY_MESSAGE_ACTION); intent.putExtra(EXTRA_MESSAGE, message); context.sendBroadcast(intent); } //get GCM Project Number from AndroidManifest.xml... public static String getGCMProjectNumber(){ //get the googleAPIProjectNumber from the AndroidManifest.xml file... ApplicationInfo ai = null; String tmpGcmNumber = ""; try{ ai = pruebasandroid_appDelegate.getApplication().getPackageManager().getApplicationInfo(pruebasandroid_appDelegate.getApplication().getPackageName(), PackageManager.GET_META_DATA); tmpGcmNumber = (String)ai.metaData.get("googleCloudMessagingProjectNumber"); BT_debugger.showIt(CLASS_NAME + ":getGCMProjectNumber. Using Google GCM Project Number in AndroidManifest: \"" + tmpGcmNumber + "\""); }catch(NameNotFoundException e) { BT_debugger.showIt(CLASS_NAME + ":getGCMProjectNumber. EXCEPTION. Google GCM Project Number not found in AndroidManifest?"); } //retuan... return tmpGcmNumber; } } =================== I tried putting the Project number on the manifest.xml file, but the app crashed and closed. Then, I replace this line: static final String SENDER_ID = getGCMProjectNumber(); With: static final String SENDER_ID = "35346556730" (hey, that is an example number, not real) And the app runs ok, but I get the message "There was a problem communicating with the Google Cloud Messaging system. Is the device online? Is the device logged into a Google Account?" Anyone knows what happens? Thanks.-
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.