How to make the Socket not disconnect from the server when you rotate the screen, or rather did not become null 'ohm? In principle, it would be possible to save it with the help of the Bundle , but for some reason, saving of all types there occurs in the String type ...
private static final String autherised=null; @Override public void onSaveInstanceState(Bundle savedInstanceState) { savedInstanceState.putBoolean(autherised,true); super.onSaveInstanceState(savedInstanceState); } Therefore, it seems to me that with a complex object (Socket) such a trick will not work. So where should I save the Socket or where to create it so that its activity doesn’t touch its reboots?