Answer: A private InputStream mInputStream;
int readavailableBytes = mInputStream.available();
Description:
Answer: A private InputStream mInputStream;
int readavailableBytes = mInputStream.available();
private byte Buffer = new byte[20];
mInputStream.read(Buffer, 0, readavailableBytes);
Description:
Answer: A Constructs a new LineNumberReader on the Reader in. The internal buffer gets the default size (8 KB).
Description:
Answer: A LineNumberReader r = new LineNumberReader(new FileReader("/proc/tty/drivers"));
Description:
Answer: A private native static FileDescriptor open(String path, int baudrate);
public native void close();
static {
System.loadLibrary("serial_port");
}
Description:
Answer: A public SerialPort(File device, int baudrate) throws SecurityException, IOException {
device.canRead()
device.canWrite()) here
File : The actual file referenced by a File may or may not exist. It may also, despite the name File, be a directory or other non-regular file.
This class provides limited functionality for getting/setting file permissions, file type, and last modified time.
Description:
Answer: A a data transmission rate (bits/second)
Description:
Answer: A Near Field Communication (NFC) is a set of short-range wireless technologies, typically requiring a distance of 4cm or less to initiate a connection.
Description:
Answer: A SIZE_1K Tag contains 16 sectors, each with 4 blocks.
SIZE_2K Tag contains 32 sectors, each with 4 blocks.
SIZE_4K Tag contains 40 sectors.
SIZE_MINI Tag contains 5 sectors, each with 4 blocks.
TYPE_CLASSIC A MIFARE Classic tag
TYPE_PLUS A MIFARE Plus tag
TYPE_PRO A MIFARE Pro tag
TYPE_UNKNOWN A MIFARE Classic compatible card of unknown type
Description:
Answer: A if (NfcAdapter.ACTION_TECH_DISCOVERED.equals(action)
|| NfcAdapter.ACTION_TAG_DISCOVERED.equals(action)
|| NfcAdapter.ACTION_TECH_DISCOVERED.equals(action))
Description:
Answer: A Tag is an immutable object that represents the state of a NFC tag at the time of discovery. It can be used as a handle to TagTechnology classes to perform advanced operations, or directly queried for its ID via getId() and the set of technologies it contains via getTechList(). Arrays passed to and returned by this class are not cloned, so be careful not to modify them
Description:
Answer: A Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
String UID = tag.getId()
Description:
Answer: A MifareClassic mfc = MifareClassic.get(TAG);
mfc.connect();
auth = mfc.authenticateSectorWithKeyA(0, MifareClassic.KEY_DEFAULT);
auth = mfc.authenticateSectorWithKeyB(0, MifareClassic.KEY_DEFAULT);
Description:
Answer: B to write
public void writeBlock (int blockIndex, byte[] data)
before writing find MifareClassic.BLOCK_SIZE
to Read
public byte[] readBlock (int blockIndex)
Description:
Answer: A Write block with Custom Key instead of MifareClassic.KEY_DEFAULT
Answer: A add these to your MainActivity in Manifest File
<intent-filter android:priority="100" >
<action android:name="android.nfc.action.TAG_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter android:priority="101" >
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<intent-filter>
<intent-filter android:priority="102" >
<action android:name="android.nfc.action.TECH_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Description: