
package com.usbseriallibrary;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.Callback;

public class RNUsbSerialLibraryModule extends ReactContextBaseJavaModule {

  private final ReactApplicationContext reactContext;

  public RNUsbSerialLibraryModule(ReactApplicationContext reactContext) {
    super(reactContext);
    this.reactContext = reactContext;
  }

  @Override
  public String getName() {
    return "RNUsbSerialLibrary";
  }
}

@ReactMethod
public void show(String text) {
  Context context = getReactApplicationContext();
  Toast.makeText(context, text, Toast.LENGTH_LONG).show();
}