Tabnine Logo
MifareUltralight.get
Code IndexAdd Tabnine to your IDE (free)

How to use
get
method
in
android.nfc.tech.MifareUltralight

Best Java code snippets using android.nfc.tech.MifareUltralight.get (Showing top 5 results out of 315)

origin: RickyYu/Nfc-Android

  public String readTag(Tag tag) {
    MifareUltralight ultralight = MifareUltralight.get(tag);
    try {
      ultralight.connect();
      byte[] data = ultralight.readPages(4);
      return new String(data, Charset.forName("GB2312"));
    } catch (Exception e) {
    } finally {
      try {
        ultralight.close();
      } catch (Exception e) {
      }
    }
    return null;
  }
}
origin: skjolber/external-nfc-api

MifareUltralight mifareUltralight = MifareUltralight.get(tag);
if(mifareUltralight == null) {
  throw new IllegalArgumentException("No Mifare Ultralight");
origin: skjolber/external-nfc-api

MifareUltralight mifareUltralight = MifareUltralight.get(tag);
if(mifareUltralight == null) {
  throw new IllegalArgumentException("No Mifare Ultralight");
origin: RickyYu/Nfc-Android

  public void writeTag(Tag tag) {
    MifareUltralight ultralight = MifareUltralight.get(tag);
    try {
      ultralight.connect();
      //写入八个汉字,从第五页开始写,中文需要转换成GB2312格式
      ultralight.writePage(4, "北京".getBytes(Charset.forName("GB2312")));
      ultralight.writePage(5, "上海".getBytes(Charset.forName("GB2312")));
      ultralight.writePage(6, "广州".getBytes(Charset.forName("GB2312")));
      ultralight.writePage(7, "天津".getBytes(Charset.forName("GB2312")));
      Toast.makeText(this, "写入成功", Toast.LENGTH_SHORT).show();
    } catch (Exception e) {
    } finally {
      try {
        ultralight.close();
      } catch (Exception e) {
      }
    }
  }
}
origin: skjolber/external-nfc-api

  tagTech = MifareUltralight.get(tag);
} else if (tech.equals(android.nfc.tech.NfcA.class.getName())) {
  tagTech = NfcA.get(tag);        
android.nfc.techMifareUltralightget

Popular methods of MifareUltralight

  • close
  • connect
  • getType
  • readPages
  • transceive
  • writePage

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
  • getContentResolver (Context)
  • String (java.lang)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Github Copilot alternatives
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