예제 #1
0
  @Override
  protected void onPause() {

    nfcAdapter.disableForegroundDispatch(this);

    super.onPause();
  }
예제 #2
0
 @Override
 protected void onPause() {
   super.onPause();
   if (mAdapter != null) {
     mAdapter.disableForegroundDispatch(this);
   }
 }
예제 #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);
   }
 }
예제 #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);
    }
  }
 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);
   }
 }
예제 #9
0
 @Override
 public void onPause() {
   super.onPause();
   if (mNfcAdapter != null) mNfcAdapter.disableForegroundDispatch(this);
 }
 private void disableNFCAdapterSenses() {
   if (mAdapter != null) {
     mAdapter.disableForegroundDispatch(this);
     mAdapter.disableForegroundNdefPush(this);
   }
 }
예제 #11
0
 @Override
 public void onPause() {
   super.onPause();
   mAdapter.disableForegroundDispatch(this);
 }
 public static void stopForegroundDispatch(final Activity activity, NfcAdapter adapter) {
   adapter.disableForegroundDispatch(activity);
 }
예제 #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);
 }
예제 #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);
 }
예제 #15
0
 /** Stops writing to NFC tags. */
 private void disableTagWriteMode() {
   nfcAdapter.disableForegroundDispatch(this);
 }
예제 #16
0
  @SuppressLint("NewApi")
  public void disableForegroundMode() {
    Log.d("TAG", "disableForegroundMode");

    nfcAdapter.disableForegroundDispatch(this);
  }
예제 #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);
 }
예제 #20
0
 @Override
 protected void onPause() {
   super.onPause();
   nfcAdapter.disableForegroundDispatch(this);
   toast("App Paused");
 }