Skip to content

Instantly share code, notes, and snippets.

@GSala
Last active August 29, 2015 14:13
Show Gist options
  • Save GSala/118cb6169fc24f5916c9 to your computer and use it in GitHub Desktop.
Save GSala/118cb6169fc24f5916c9 to your computer and use it in GitHub Desktop.
@Override
protected void onStop() {
/*// Stop bluetooth service
Intent intent = new Intent(this, BluetoothService.class);
stopService(intent);*/
if(!isChangingConfigurations()){
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(getApplicationContext(), BluetoothService.class);
stopService(intent);
}
}, 5000);
}
super.onStop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment