Example #1
0
  public void initialize() {
    super.initialize();
    repository =
        (IAppRepositoryManager) getConnectedComponents().get(IAppRepositoryManager.class.getName());

    componentManager =
        (IComponentManager) getConnectedComponents().get(IComponentManager.class.getName());

    repository.open();
  }
Example #2
0
  public void startService() {
    super.startService();

    if (repository.getInstalledAppNames().size() > 0) {
      loadAndInitializeApps();

      Vector services = repository.listServices();
      String serviceName;
      IService service;

      for (int i = 0; i < services.size(); i++) {
        serviceName = (String) services.elementAt(i);
        service = (IService) componentManager.resolveComponent(serviceName);
        service.startService();
      }

      ISensorManager sensorManager =
          (ISensorManager) componentManager.resolveComponent(ISensorManager.class.getName());
      sensorManager.startService();
    }
  }
 public void destroy() {
   super.destroy();
   battery = null;
 }
 public void initialize() {
   super.initialize();
   battery = Spot.getInstance().getPowerController().getBattery();
 }