Example usage for android.content Context NFC_SERVICE

List of usage examples for android.content Context NFC_SERVICE

Introduction

In this page you can find the example usage for android.content Context NFC_SERVICE.

Prototype

String NFC_SERVICE

To view the source code for android.content Context NFC_SERVICE.

Click Source Link

Document

Use with #getSystemService(String) to retrieve a android.nfc.NfcManager for using NFC.

Usage

From source file:com.feathercoin.wallet.feathercoin.ui.WalletAddressFragment.java

@SuppressLint("InlinedApi")
@Override//from  w  ww .j  a  v a  2  s . co m
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
        final Bundle savedInstanceState) {
    nfcManager = activity.getSystemService(Context.NFC_SERVICE);

    final View view = inflater.inflate(R.layout.wallet_address_fragment, container, false);
    feathercoinAddressButton = view.findViewById(R.id.feathercoin_address_button);
    feathercoinAddressLabel = (TextView) view.findViewById(R.id.feathercoin_address_label);
    feathercoinAddressQrView = (ImageView) view.findViewById(R.id.feathercoin_address_qr);

    feathercoinAddressButton.setOnClickListener(new OnClickListener() {
        public void onClick(final View v) {
            AddressBookActivity.start(activity, false);
        }
    });

    feathercoinAddressQrView.setOnClickListener(new OnClickListener() {
        public void onClick(final View v) {
            handleShowQRCode();
        }
    });

    feathercoinAddressQrView.setOnLongClickListener(new OnLongClickListener() {
        public boolean onLongClick(final View v) {
            startActivity(new Intent(activity, RequestCoinsActivity.class));
            return true;
        }
    });

    return view;
}

From source file:de.schildbach.wallet.ui.RequestCoinsFragment.java

@Override
public void onAttach(final Activity activity) {
    super.onAttach(activity);

    this.activity = (AbstractWalletActivity) activity;
    this.application = (WalletApplication) activity.getApplication();
    this.nfcManager = (NfcManager) activity.getSystemService(Context.NFC_SERVICE);
    this.clipboardManager = (ClipboardManager) activity.getSystemService(Context.CLIPBOARD_SERVICE);
}

From source file:com.feathercoin.wallet.feathercoin.ui.RequestCoinsFragment.java

@SuppressLint("InlinedApi")
@Override/*www  .  j a va 2s .c o m*/
public void onAttach(final Activity activity) {
    super.onAttach(activity);
    this.activity = (AbstractWalletActivity) activity;
    application = (WalletApplication) activity.getApplication();

    nfcManager = activity.getSystemService(Context.NFC_SERVICE);
    clipboardManager = (android.text.ClipboardManager) activity.getSystemService(Context.CLIPBOARD_SERVICE);
}

From source file:mintcoin.wallet.ui.WalletAddressFragment.java

@Override
public void onAttach(final Activity activity) {
    super.onAttach(activity);

    this.activity = activity;
    this.application = (WalletApplication) activity.getApplication();
    this.loaderManager = getLoaderManager();
    final NfcManager nfcManager = (NfcManager) activity.getSystemService(Context.NFC_SERVICE);
    this.nfcAdapter = nfcManager.getDefaultAdapter();
}

From source file:biz.wiz.android.wallet.ui.WalletAddressFragment.java

@Override
public void onAttach(final Activity activity) {
    super.onAttach(activity);

    this.activity = activity;
    this.application = (WalletApplication) activity.getApplication();
    this.wallet = application.getWallet();
    this.loaderManager = getLoaderManager();
    final NfcManager nfcManager = (NfcManager) activity.getSystemService(Context.NFC_SERVICE);
    this.nfcAdapter = nfcManager.getDefaultAdapter();
}

From source file:com.matthewmitchell.peercoin_android_wallet.ui.WalletAddressFragment.java

@Override
public void onAttach(final Activity activity) {
    super.onAttach(activity);

    this.activity = (WalletActivity) activity;
    this.application = (WalletApplication) activity.getApplication();
    this.loaderManager = getLoaderManager();
    final NfcManager nfcManager = (NfcManager) activity.getSystemService(Context.NFC_SERVICE);
    this.nfcAdapter = nfcManager.getDefaultAdapter();
}

From source file:com.kncwallet.wallet.ui.HomeFragment.java

@Override
public void onAttach(final Activity activity) {
    super.onAttach(activity);

    this.activity = (AbstractWalletActivity) activity;
    this.application = (WalletApplication) activity.getApplication();
    this.wallet = application.getWallet();
    this.prefs = PreferenceManager.getDefaultSharedPreferences(activity);
    this.loaderManager = getLoaderManager();
    this.nfcManager = (NfcManager) activity.getSystemService(Context.NFC_SERVICE);

}

From source file:com.kncwallet.wallet.ui.ReceiveFragment.java

@Override
public void onAttach(final Activity activity) {
    super.onAttach(activity);

    this.activity = (AbstractWalletActivity) activity;
    this.application = (WalletApplication) activity.getApplication();
    this.wallet = application.getWallet();
    this.prefs = PreferenceManager.getDefaultSharedPreferences(activity);
    this.loaderManager = getLoaderManager();
    this.nfcManager = (NfcManager) activity.getSystemService(Context.NFC_SERVICE);
    this.clipboardManager = (ClipboardManager) activity.getSystemService(Context.CLIPBOARD_SERVICE);
}

From source file:com.kncwallet.wallet.ui.TransactionsListFragment.java

@Override
public void onAttach(final Activity activity) {
    super.onAttach(activity);

    this.activity = (AbstractWalletActivity) activity;
    this.application = (WalletApplication) activity.getApplication();
    this.wallet = application.getWallet();
    this.prefs = PreferenceManager.getDefaultSharedPreferences(activity);
    this.nfcManager = (NfcManager) activity.getSystemService(Context.NFC_SERVICE);
    this.resolver = activity.getContentResolver();
    this.loaderManager = getLoaderManager();
}

From source file:cc.mintcoin.wallet.ui.TransactionsListFragment.java

@Override
public void onAttach(final Activity activity) {
    super.onAttach(activity);

    this.activity = (AbstractWalletActivity) activity;
    this.application = (WalletApplication) activity.getApplication();
    this.config = application.getConfiguration();
    this.wallet = application.getWallet();
    this.nfcManager = (NfcManager) activity.getSystemService(Context.NFC_SERVICE);
    this.resolver = activity.getContentResolver();
    this.loaderManager = getLoaderManager();
}