Tabnine Logo
BluetoothScan.invalidateOptionsMenu
Code IndexAdd Tabnine to your IDE (free)

How to use
invalidateOptionsMenu
method
in
com.eveningoutpost.dexdrip.BluetoothScan

Best Java code snippets using com.eveningoutpost.dexdrip.BluetoothScan.invalidateOptionsMenu (Showing top 8 results out of 315)

origin: NightscoutFoundation/xDrip

  @Override
  public void run() {
    is_scanning = false;
    try {
      if ((bluetooth_adapter != null) && (mLeScanCallback != null)) {
        bluetooth_adapter.stopLeScan(mLeScanCallback);
      }
    } catch (NullPointerException e) {
      // concurrency pain
    }
    invalidateOptionsMenu();
  }
}, SCAN_PERIOD);
origin: jamorham/xDrip-plus

  @Override
  public void run() {
    is_scanning = false;
    try {
      if ((bluetooth_adapter != null) && (mLeScanCallback != null)) {
        bluetooth_adapter.stopLeScan(mLeScanCallback);
      }
    } catch (NullPointerException e) {
      // concurrency pain
    }
    invalidateOptionsMenu();
  }
}, SCAN_PERIOD);
origin: jamorham/xDrip-plus

@TargetApi(19)
private synchronized void scanLeDevice(final boolean enable) {
  if (enable) {
    // Stops scanning after a pre-defined scan period.
    Log.d(TAG, "Start scan 19");
    mHandler.postDelayed(new Runnable() {
      @Override
      public void run() {
        is_scanning = false;
        try {
          if ((bluetooth_adapter != null) && (mLeScanCallback != null)) {
            bluetooth_adapter.stopLeScan(mLeScanCallback);
          }
        } catch (NullPointerException e) {
          // concurrency pain
        }
        invalidateOptionsMenu();
      }
    }, SCAN_PERIOD);
    is_scanning = true;
    if (bluetooth_adapter != null) bluetooth_adapter.startLeScan(mLeScanCallback);
  } else {
    is_scanning = false;
    if (bluetooth_adapter != null && bluetooth_adapter.isEnabled()) {
      bluetooth_adapter.stopLeScan(mLeScanCallback);
    }
  }
  invalidateOptionsMenu();
}
origin: NightscoutFoundation/xDrip

@TargetApi(19)
private synchronized void scanLeDevice(final boolean enable) {
  if (enable) {
    // Stops scanning after a pre-defined scan period.
    Log.d(TAG, "Start scan 19");
    mHandler.postDelayed(new Runnable() {
      @Override
      public void run() {
        is_scanning = false;
        try {
          if ((bluetooth_adapter != null) && (mLeScanCallback != null)) {
            bluetooth_adapter.stopLeScan(mLeScanCallback);
          }
        } catch (NullPointerException e) {
          // concurrency pain
        }
        invalidateOptionsMenu();
      }
    }, SCAN_PERIOD);
    is_scanning = true;
    if (bluetooth_adapter != null) bluetooth_adapter.startLeScan(mLeScanCallback);
  } else {
    is_scanning = false;
    if (bluetooth_adapter != null && bluetooth_adapter.isEnabled()) {
      bluetooth_adapter.stopLeScan(mLeScanCallback);
    }
  }
  invalidateOptionsMenu();
}
origin: jamorham/xDrip-plus

  @Override
  public void run() {
    is_scanning = false;
    if (bluetooth_adapter != null && bluetooth_adapter.isEnabled()) {
      try {
        lollipopScanner.stopScan(mScanCallback);
      } catch (IllegalStateException e) {
        JoH.static_toast_long(e.toString());
        UserError.Log.e(TAG, "error stopping scan: " + e.toString());
      }
    }
    invalidateOptionsMenu();
  }
}, SCAN_PERIOD);
origin: NightscoutFoundation/xDrip

  @Override
  public void run() {
    is_scanning = false;
    if (bluetooth_adapter != null && bluetooth_adapter.isEnabled()) {
      try {
        lollipopScanner.stopScan(mScanCallback);
      } catch (IllegalStateException e) {
        JoH.static_toast_long(e.toString());
        UserError.Log.e(TAG, "error stopping scan: " + e.toString());
      }
    }
    invalidateOptionsMenu();
  }
}, SCAN_PERIOD);
origin: jamorham/xDrip-plus

invalidateOptionsMenu();
origin: NightscoutFoundation/xDrip

invalidateOptionsMenu();
com.eveningoutpost.dexdripBluetoothScaninvalidateOptionsMenu

Popular methods of BluetoothScan

  • doScan
  • finish
  • getApplicationContext
  • getLayoutInflater
  • getMenuInflater
  • getString
  • getSystemService
  • initializeScannerCallback
  • requestSerialNumber
  • requestTransmitterId
  • returnToHome
  • runOnUiThread
  • returnToHome,
  • runOnUiThread,
  • scanLeDevice,
  • scanLeDeviceLollipop,
  • setContentView,
  • setListAdapter,
  • setTheme,
  • startActivity

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now