Code example for NfcAdapter

Methods: disableForegroundDispatch

0
  } 
   
  @Override 
  public void onPause() { 
    if (isFinishing()) {
      nfc.disableForegroundDispatch(this);
      inWriteMode=false;
    } 
     
    super.onPause(); 
  } 
   
  private byte[] buildUrlBytes(String url) {
    byte prefixByte=0;
    String subset=url;
    int bestPrefixLength=0;
     
    for (int i=0;i<PREFIXES.length;i++) {
      String prefix = PREFIXES[i];
      if (url.startsWith(prefix) && prefix.length() > bestPrefixLength) {
        prefixByte=(byte)(i+1);