Code example for GoogleCloudMessaging

Methods: register

0
			protected Object doInBackground(Object... arg0)
			{ 
				String msg = "";
				try 
				{ 
					regid = gcm.register(GCM_SENDER_ID);
					System.out.println(regid);
					msg = "Enregistrement auprès de Google Cloud Messaging réussi";
					SharedPreferences.Editor editor = prefs.edit();
					editor.putString(PROPERTY_REG_ID, regid);
					editor.commit();
				} catch (IOException ex)
				{ 
					msg = "Enregistrement auprès de Google Cloud Messaging échoué :"
							+ ex.getMessage();
				} 
				return msg;
			} 
 
			@Override 
			protected void onPostExecute(Object result)