@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // creating pending intent
    pendingIntent =
        PendingIntent.getActivity(
            this,
            0,
            new Intent(getApplicationContext(), this.getClass())
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NO_HISTORY),
            0);

    i[0] = new IntentFilter(NfcAdapter.ACTION_TAG_DISCOVERED);
    // creating tech list for tag
    techListsArray =
        new String[][] {
          new String[] {
            NfcV.class.getName(),
            NfcA.class.getName(),
            NfcB.class.getName(),
            NfcF.class.getName(),
            Ndef.class.getName(),
            NdefFormatable.class.getName(),
            MifareClassic.class.getName(),
            MifareUltralight.class.getName()
          }
        };

    // creating object of nfc adapter of mobile device
    NFCAdapter = NfcAdapter.getDefaultAdapter(this);

    // if app is opened after pop up....
    ScanTag(getIntent());
  }