Пример #1
0
  /** WARNING: Remove all notifications from indicator. */
  public void sendClearAllNotificationsSignal() {
    // Send command to NotificationListenerService
    Intent i = new Intent(Constants.NOTIFICATION_LISTENER_SERVICE);
    i.putExtra("command", "clearall");
    sendBroadcast(i);

    // Clear all contents in ContentManager
    mContentManager.clearAllNotifications();
  }
Пример #2
0
  /**
   * Extract all notifications currently registered. NotificationReceiverService will send results
   * one by one using broadcast. And service send each notification to activity handler.
   */
  public void sendGetAllNotificationsSignal() {
    // Send command to NotificationService
    Intent i = new Intent(Constants.NOTIFICATION_LISTENER_SERVICE);
    i.putExtra("command", "list");
    sendBroadcast(i);

    // Clear all contents in ContentManager
    mContentManager.clearAllNotifications();

    // ----- Result will be delivered on broadcast receiver
  }