【问题标题】:Android - Already have a pending vsync eventAndroid - 已经有一个待处理的 vsync 事件
【发布时间】:2015-02-06 23:54:51
【问题描述】:

我有三个服务。

MorningNotificationDinnerNotificationEveningNotification

我有这段代码来初始化它们:

morning_notification = new Intent();
    morning_notification.setClass(this, MorningNotification.class);

    dinner_notification = new Intent();
    dinner_notification.setClass(this, DinnerNotification.class);

    evening_notification = new Intent();
    evening_notification.setClass(this, EveningNotification.class);

之后我像这样使用它们:

    ... 
    /* Запуск сервера */
                        startService(morning_notification);
    ...
 ... 
    /* Запуск сервера */
                        startService(dinner_notification);
    ...
 ... 
    /* Запуск сервера */
                        startService(evening_notification);
    ...

但是,问题是只有 MorningNotification 服务在工作。但我需要开始所有三个。

我有这个日志:

 W/Choreographer﹕ Already have a pending vsync event.  There should only be one at a time.
12-09 09:35:03.025  12961-12961/ru.mentalcalculation E/ViewRootImpl﹕ sendUserActionEvent() mView == null
12-09 09:35:07.895  12961-12961/ru.mentalcalculation W/Choreographer﹕ Already have a pending vsync event.  There should only be one at a time.
12-09 09:35:07.895  12961-12961/ru.mentalcalculation E/ViewRootImpl﹕ sendUserActionEvent() mView == null
12-09 09:35:12.845  12961-12961/ru.mentalcalculation W/Choreographer﹕ Already have a pending vsync event.  There should only be one at a time.
12-09 09:35:12.845  12961-12961/ru.mentalcalculation E/ViewRootImpl﹕ sendUserActionEvent() mView == null

【问题讨论】:

    标签: android android-intent notifications


    【解决方案1】:

    您不能同时启动这三个服务。我建议你在打电话给下一个之前完成早晨的意图。这是为了避免可能失控的不受控制的分支。您可以查看:http://developer.android.com/reference/android/app/PendingIntent.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-16
      • 2012-02-21
      • 1970-01-01
      • 2013-03-04
      • 2011-11-17
      • 1970-01-01
      • 2016-03-22
      • 2012-06-25
      相关资源
      最近更新 更多