Ejemplo n.º 1
0
  @Override
  protected void onPause() {

    nfcAdapter.disableForegroundDispatch(this);

    super.onPause();
  }
Ejemplo n.º 2
0
 @Override
 protected void onPause() {
   super.onPause();
   if (mAdapter != null) {
     mAdapter.disableForegroundDispatch(this);
   }
 }
Ejemplo n.º 3
0
 @Override
 protected void onPause() {
   LocalBroadcastManager.getInstance(this).unregisterReceiver(showNextActivityListener);
   super.onPause();
   if (nfcAvailable) {
     nfcAdapter.disableForegroundDispatch(this);
   }
 }
 @Override
 protected void onPause() {
   super.onPause();
   // disabling foreground dispatch:
   NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
   if (nfcAdapter != null) {
     nfcAdapter.disableForegroundDispatch(this);
   }
 }
Ejemplo n.º 5
0
  @Override
  protected void onPause() {
    active = false;
    rescanWifiTask.cancel(true);

    if (nfcAvailable) {
      nfcAdapter.disableForegroundDispatch(this);
    }

    super.onPause();
  }
  @Override
  public void onBackPressed() {
    int count = getSupportFragmentManager().getBackStackEntryCount();
    if (count == 1) {
      finish();
      return;
    }

    if (drawerLayout.isDrawerOpen(Gravity.LEFT)) {
      drawerLayout.closeDrawer(Gravity.LEFT);
    } else {
      super.onBackPressed();
      if (nfcAdapter != null) nfcAdapter.disableForegroundDispatch(this);
    }
  }
Ejemplo n.º 7
0
 public void onPause() {
   try {
     if (nfcAdapter != null) {
       nfcAdapter.disableForegroundDispatch(this);
     } else {
       throw new FsgException(
           new NullPointerException(
               "'Der NfcAdapter ist ein \"null\"-Objekt. Grund: Keine NFC-Unterstützung auf dem Gerät"),
           this.getClass().toString(),
           FsgException.NOT_NFC_SUPPORT);
     }
   } catch (FsgException e1) {
     Intent mIntent = new Intent(this, ErrorActivity.class);
     mIntent.putExtra("Exception", e1);
     startActivity(mIntent);
     finish();
   }
   super.onPause();
 }
 /** Disable dispacher Remove the most important priority for foreground application */
 public void disableDispatch() {
   if (mNfcAdapter != null) {
     mNfcAdapter.disableForegroundDispatch(mActivity);
   }
 }
Ejemplo n.º 9
0
 @Override
 public void onPause() {
   super.onPause();
   if (mNfcAdapter != null) mNfcAdapter.disableForegroundDispatch(this);
 }
Ejemplo n.º 10
0
 private void disableNFCAdapterSenses() {
   if (mAdapter != null) {
     mAdapter.disableForegroundDispatch(this);
     mAdapter.disableForegroundNdefPush(this);
   }
 }
Ejemplo n.º 11
0
 @Override
 public void onPause() {
   super.onPause();
   mAdapter.disableForegroundDispatch(this);
 }
 public static void stopForegroundDispatch(final Activity activity, NfcAdapter adapter) {
   adapter.disableForegroundDispatch(activity);
 }
Ejemplo n.º 13
0
 /**
  * this is where we stop the foreground dispatch of intents to this activity important: this must
  * be called before activity was paused!
  *
  * @param activity
  * @param adapter
  */
 private void stopForegroundDispatch(Activity activity, NfcAdapter adapter) {
   adapter.disableForegroundDispatch(activity);
 }
Ejemplo n.º 14
0
 /* Called when the system is about to start resuming a previous activity. */
 @Override
 protected void onPause() {
   super.onPause();
   Log.d(TAG, "onPause: " + getIntent());
   mNfcAdapter.disableForegroundDispatch(this);
 }
Ejemplo n.º 15
0
 /** Stops writing to NFC tags. */
 private void disableTagWriteMode() {
   nfcAdapter.disableForegroundDispatch(this);
 }
Ejemplo n.º 16
0
  @SuppressLint("NewApi")
  public void disableForegroundMode() {
    Log.d("TAG", "disableForegroundMode");

    nfcAdapter.disableForegroundDispatch(this);
  }
Ejemplo n.º 17
0
 private void disableForegroundDispatchSystem() {
   mNfcAdapter.disableForegroundDispatch(this);
 }
 private void WriteModeOff() {
   writeMode = false;
   adapter.disableForegroundDispatch(this);
 }
 @Override
 protected void onPause() {
   // TODO Auto-generated method stub
   super.onPause();
   if (NFCAdapter != null) NFCAdapter.disableForegroundDispatch(this);
 }
Ejemplo n.º 20
0
 @Override
 protected void onPause() {
   super.onPause();
   nfcAdapter.disableForegroundDispatch(this);
   toast("App Paused");
 }