// Path: EEG101/android/app/src/main/java/com/eeg_project/MainApplication.java
// public class MainApplication extends Application implements ReactApplication {
// 
//   // Global singleton Muse
//   public static Muse connectedMuse;
// 
//   // Global singleton event emitter
//   public static AppNativeEventEmitter eventEmitter;
// 
//   private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
//     @Override
//     public boolean getUseDeveloperSupport() {
//       return com.eeg_project.BuildConfig.DEBUG;
//     }
// 
//     // All packages for native libraries must be added to the array returned by this method
//     @Override
//     protected List<ReactPackage> getPackages() {
//       return Arrays.<ReactPackage>asList(
//           new MainReactPackage(),
//             new LottiePackage(),
//             new RNI18nPackage(),
//           new RCTTorchPackage(),
//           new SvgPackage(),
//           new EEGPackage()
//       );
//     }
//   };
// 
//   @Override
//   public ReactNativeHost getReactNativeHost() {
//       return mReactNativeHost;
//   }
// 
//   }


import com.eeg_project.MainApplication;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.WritableMap;
import javax.annotation.Nullable;
package com.eeg_project.components.signal;



// This class implements a simple EEG noise detector based on
// variance thresholding of a short epoch.
public class NoiseDetector {

    // ------------------------------------------------------------------------
    // Variables

    private double t;
    private ReactApplicationContext reactContext;
    private WritableMap noiseMap = Arguments.createMap();

    // grab reference to global singletons
// Path: EEG101/android/app/src/main/java/com/eeg_project/MainApplication.java
// public class MainApplication extends Application implements ReactApplication {
// 
//   // Global singleton Muse
//   public static Muse connectedMuse;
// 
//   // Global singleton event emitter
//   public static AppNativeEventEmitter eventEmitter;
// 
//   private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
//     @Override
//     public boolean getUseDeveloperSupport() {
//       return com.eeg_project.BuildConfig.DEBUG;
//     }
// 
//     // All packages for native libraries must be added to the array returned by this method
//     @Override
//     protected List<ReactPackage> getPackages() {
//       return Arrays.<ReactPackage>asList(
//           new MainReactPackage(),
//             new LottiePackage(),
//             new RNI18nPackage(),
//           new RCTTorchPackage(),
//           new SvgPackage(),
//           new EEGPackage()
//       );
//     }
//   };
// 
//   @Override
//   public ReactNativeHost getReactNativeHost() {
//       return mReactNativeHost;
//   }
// 
//   }


// Path: EEG101/android/app/src/main/java/com/eeg_project/components/signal/NoiseDetector.java
import com.eeg_project.MainApplication;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.WritableMap;
import javax.annotation.Nullable;

package com.eeg_project.components.signal;



// This class implements a simple EEG noise detector based on
// variance thresholding of a short epoch.
public class NoiseDetector {

    // ------------------------------------------------------------------------
    // Variables

    private double t;
    private ReactApplicationContext reactContext;
    private WritableMap noiseMap = Arguments.createMap();

    // grab reference to global singletons
    MainApplication appState;