http://tools.oesf.biz/android-4.2.0_r1.0/xref/frameworks/base/core/java/android/nfc/NdefRecord.java#309
139 public static final short TNF_EXTERNAL_TYPE = 0x04;
223 public static final byte[] RTD_ANDROID_APP = "android.com:pkg".getBytes();
309 public static NdefRecord createApplicationRecord(String packageName) {
310 if (packageName == null) throw new NullPointerException("packageName is null");
311 if (packageName.length() == 0) throw new IllegalArgumentException("packageName is empty");
312
313 return new NdefRecord(TNF_EXTERNAL_TYPE, RTD_ANDROID_APP, null,
314 packageName.getBytes(Charsets.UTF_8));
315 }
0 件のコメント:
コメントを投稿