Code example for GoogleCloudMessaging

Methods: register

0
            new AsyncTask(){
                @Override 
                protected Object doInBackground(Object[] objects) {
                        try{ 
                            gcm = GoogleCloudMessaging.getInstance(context);
                           regid =  gcm.register("601897773013");
                            System.out.println("El Registro es: "+ regid);
                        }catch (Exception e){
                            e.printStackTrace();
                        } 
                    return null; 
                } 
            }.execute(null,null,null);
 
 
    } 
 
    public class MessageReceiver extends BroadcastReceiver {
 
        public static final String procesarrepuesta = "com.bros.labs.MENSAJERECIBIDO";