Beispiel #1
0
  public void resumeApps() {
    IApp app;

    Vector names = repository.getInstalledAppNames();

    for (int i = 0; i < names.size(); i++) {
      app = repository.getApp((String) names.elementAt(i));
      app.resume();
    }
  }
Beispiel #2
0
  public void loadAndInitializeApps() {
    IApp app;
    Thread thread;

    Vector names = repository.getInstalledAppNames();

    for (int i = 0; i < names.size(); i++) {
      app = repository.getApp((String) names.elementAt(i));
      if (app instanceof ThreadedApp) {
        thread = new Thread((Runnable) app);
        thread.start();
      }
    }
  }
Beispiel #3
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();
    }
  }