http://developer.android.com/guide/google/gcm/gs.html#server-appに従って、アプリケーションに GCM を実装しました
GCMRegistrar.checkDevice(this);
GCMRegistrar.checkManifest(this);
if (GCMRegistrar.isRegistered(this)) {
Log.d(TAG, GCMRegistrar.getRegistrationId(this));
}
final String regId = GCMRegistrar.getRegistrationId(this);
if (regId.equals("")) {
GCMRegistrar.register(this, sender_id);
Log.d(TAG, "Registration id : "+GCMRegistrar.getRegistrationId(this));
}
else {
Log.d("info", "already registered as" + regId);
}
登録IDとして空の文字列を返します登録IDを取得するために他に何が必要ですか??