Exemplo n.º 1
0
  /** {@inheritDoc} */
  public void start(BundleContext bc) throws Exception {
    bundleContext = bc;
    try {
      logger.logEntry();
      logger.info("Android notification handler Service...[  STARTED ]");

      // Get the notification service implementation
      ServiceReference notifReference =
          bundleContext.getServiceReference(NotificationService.class.getName());

      notificationService = (NotificationService) bundleContext.getService(notifReference);

      vibrateHandler = new VibrateHandlerImpl();

      notificationService.addActionHandler(vibrateHandler);

      logger.info("Android notification handler Service...[REGISTERED]");
    } finally {
      logger.logExit();
    }
  }