How do you leave the juket untouched during the screen coup?



  • How to do it Socket I didn't disconnect from the server when the screen was turning, so I didn't. nullHuh? In principle, it could be retained by Bundle♪ but there's a way to keep all types ♪ String ...

        private static final String autherised=null;
    

    @Override
    public void onSaveInstanceState(Bundle savedInstanceState) {

        savedInstanceState.putBoolean(autherised,true);
    
        super.onSaveInstanceState(savedInstanceState);
    }
    

    That's why I don't think there's a trick like that with a complex object. So I'd better keep it. Socket or where to create it activity Didn't you touch your reboot?



  • Take all your online code into a separate code. https://developer.android.com/guide/components/bound-services.html and reloading Activity He won't touch it.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2