Exemplo n.º 1
0
  @Override
  public void onCreate() {
    super.onCreate();
    DebugHelper.logi(TAG, "Service creating..");

    INSTANCE = this;

    mNotification =
        new NotificationHelper(this, TAG, this.getClass().getName(), R.drawable.ic_launcher);
    mNotification.showNotificationNow("FlowEngine starting..");

    DebugHelper.startTrace();
  }
Exemplo n.º 2
0
  @Override
  public void onDestroy() {
    DebugHelper.logi(TAG, "Service destroying..");
    DebugHelper.stopTrace();

    mNotification.showNotificationNow("FlowEngine destryong..");

    for (Map.Entry<Integer, Device> entry : mDeviceMap.entrySet()) {
      try {
        entry.getValue().getInterface().kill();
      } catch (RemoteException e) {
        e.printStackTrace();
      }
    }

    super.onDestroy();
  }