Skip to content

Instantly share code, notes, and snippets.

@bragonznx
Created June 21, 2016 13:46
Show Gist options
  • Save bragonznx/47e3065ee2431f77e469694171fc8b1c to your computer and use it in GitHub Desktop.
Save bragonznx/47e3065ee2431f77e469694171fc8b1c to your computer and use it in GitHub Desktop.
Bleutooth Zcam
protected void onPause()
{
super.onPause();
AntAgent.onPause(this);
this.mPause = true;
AppActiveUtils.onActivityPause("BleControlActivity");
unbindService(this.mServiceConnection);
this.mReceiveAction.setActivityPauseValue(true);
unregisterReceiver(this.mBleBroadcastReceiver);
}
protected void onResume()
{
super.onResume();
AntAgent.onResume(this);
this.mPause = false;
this.mBleNetworkRequesting = true;
AppActiveUtils.onActivityResume("BleControlActivity");
initCameraDefaultStatus();
updateUi();
JPushReceiver.setReceivePushListener(this.mPushListener);
this.mReceiveAction.setActivityPauseValue(false);
Intent localIntent = new Intent(this, BLeService.class);
startService(localIntent);
bindService(localIntent, this.mServiceConnection, 1);
registerReceiver(this.mBleBroadcastReceiver, getBleBroadcastIntentFilter());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment