Ejemplo n.º 1
0
  public void initialize() {
    super.initialize();
    repository =
        (IAppRepositoryManager) getConnectedComponents().get(IAppRepositoryManager.class.getName());

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

    repository.open();
  }
Ejemplo n.º 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();
    }
  }
Ejemplo n.º 3
0
 public void destroy() {
   super.destroy();
   battery = null;
 }
Ejemplo n.º 4
0
 public void initialize() {
   super.initialize();
   battery = Spot.getInstance().getPowerController().getBattery();
 }