Exemplo n.º 1
0
  @Override
  public void onLocationUpdate(Map<String, User> reply) {
    NotificationManager mNotificationManager =
        (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
    NotificationCompat.Builder myBuilder = new NotificationUtil().prepareBuilder(mContext);
    myBuilder.setNumber(reply.size());
    // mId allows you to update the notification later on.
    mNotificationManager.notify(NotificationUtil.NOTIFICATION_ID, myBuilder.build());

    for (User user : reply.values()) {
      passiveLocationController.addProximityAlert(user);
    }
  }