我刚刚开始使用 Android 开发。我按照以下指南在 Eclipse 中创建了一个 App Engine 连接的 Android 项目:创建一个 App Engine 连接的 Android 项目。
该应用程序可以工作,但是当任务进入后台然后通过接收 GCM 消息再次激活时,由 GCMIntentService 类调用的意图不会到达相应的活动。可能是什么问题?
public class GCMIntentService extends GCMBaseIntentService {
    [...]
    @Override
    public void onMessage(Context context, Intent intent) {
        sendNotificationIntent(context, "Message received via Google Cloud Messaging:\n\n" + intent.getStringExtra("message"), true, false);   
    }
    [...]
    private void sendNotificationIntent(Context context, String message, boolean isError, boolean isRegistrationMessage) {
        Intent notificationIntent = new Intent(context, RegisterActivity.class);
        notificationIntent.putExtra("gcmIntentServiceMessage", true);
        notificationIntent.putExtra("registrationMessage", isRegistrationMessage);
        notificationIntent.putExtra("error", isError);
        notificationIntent.putExtra("message", message);
        notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(notificationIntent);
    }
    [...]
}
提前致谢!