Code example for NfcManager

Methods: getDefaultAdapter

0
		return sb.toString();
	} 
 
	private boolean isNfcEnabled () { 
		NfcManager manager = (NfcManager) this.getSystemService(Context.NFC_SERVICE);
		NfcAdapter adapter = manager.getDefaultAdapter();
		return ( adapter != null && adapter.isEnabled() );
	} 
	 
	private boolean isNfcPresent () { 
		NfcManager manager = (NfcManager) this.getSystemService(Context.NFC_SERVICE);
		return ( manager.getDefaultAdapter() != null );
	} 
	 
	protected void alertNoNfc () { 
		AlertDialog.Builder b = new AlertDialog.Builder(this);
		b.setTitle(R.string.no_nfc_present_title)
		.setIcon(R.drawable.alerts_and_states_error) 
		.setMessage(R.string.no_nfc_present_desc) 
		.setNegativeButton(R.string.no_nfc_present_quit, new DialogInterface.OnClickListener() {
			@Override