Code example for GoogleCloudMessaging

Methods: send

0
					data.putString("userid", emailToUse);
					data.putDouble("latitude", currentLocation.getLatitude());
					data.putDouble("longitude", currentLocation.getLongitude());
					data.putDouble("altitude", currentLocation.getAltitude());
					final String id = Integer.toString(msgId.incrementAndGet());
					gcm.send(SENDER_ID + "@droidinactu.co.uk", id, data);
					msg = "Sent message";
				} catch (final IOException ex) {
					msg = "Error :" + ex.getMessage();
				} 
				return msg;
			} 
 
			@Override 
			protected void onPostExecute(final String msg) {
				// FIXME: mDisplay.append(msg + "\n"); 
			} 
		}.execute(null, null, null);
	} 
 
	/**