@Override
 public void onTerminate() {
   super.onTerminate();
   // release whatever is needed
   mBeaconManager.unbind(this);
   mBeaconManager = null;
   SugarContext.terminate();
 }
Пример #2
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   beaconManager.unbind(this);
 }
 public void stopScanning() {
   if (mBeaconManager != null && mBeaconManager.isBound(this)) mBeaconManager.unbind(this);
 }
Пример #4
0
 /**
  * <pre>
  * 调用该方法 以关闭搜索Beacon基站,解除绑定BeaconService
  * Unbinds an Android Activity or Service to the BeaconService.
  * This should typically be called in the onDestroy() method.
  */
 public void closeSearcher() {
   mBeaconManager.unbind(mBeaconConsumer);
 }