2012-09-04 5 views
0

J'ai suivi ce sujet http://developer.android.com/guide/google/gcm/gs.html#libs pour créer GCM J'ai bien fait toutes les étapes mais quand je continue créer classe GCMIntenetService j'ai eu plus d'erreurs sur la classe quelques erreurs "ne peuvent pas être résolues à taper", "retour type de la méthode manquante ... "... s'il vous plaît si l'un d'aide.erreur lors de la création GCMIntenetService classe

paquet

com.example.elarabygroup;

GCMIntenetService public class étend GCMBaseIntentService {

private static final String LOG_TAG = "GetAClue::GCMIntentService"; 

public GCMIntentService() { 
    super(GCM_SENDER_ID); 
    // TODO Auto-generated constructor stub 
    Log.i(LOG_TAG, "GCMIntentService constructor called"); 
} 

@Override 
protected void onError(Context arg0, String errorId) { 
    // TODO Auto-generated method stub 
    Log.i(LOG_TAG, "GCMIntentService onError called: " + errorId); 
} 

@Override 
protected void onMessage(Context arg0, Intent intent) { 
    // TODO Auto-generated method stub 
    Log.i(LOG_TAG, "GCMIntentService onMessage called"); 
    Log.i(LOG_TAG, "Message is: " + intent.getStringExtra("message")); 
} 

@Override 
protected void onRegistered(Context arg0, String registrationId) { 
    // TODO Auto-generated method stub 
    Log.i(LOG_TAG, "GCMIntentService onRegistered called"); 
    Log.i(LOG_TAG, "Registration id is: " + registrationId); 
} 

@Override 
protected void onUnregistered(Context arg0, String registrationId) { 
    // TODO Auto-generated method stub 
    Log.i(LOG_TAG, "GCMIntentService onUnregistered called"); 
    Log.i(LOG_TAG, "Registration id is: " + registrationId); 
} 

}

Répondre

0

Merci j'avais résolu mes problèmes que je didnot ajouter des espaces de noms:

import com.google.android.gcm.GCMBaseIntentService; 
import android.content.Context; 
import android.content.Intent; 
import android.util.Log; 
Questions connexes