I work with HERE map Android SDK and with its AndroidXMapFragment. I add map fragment to my fragment container in the next way:
appActivity.getSupportFragmentManager().beginTransaction()
.replace(R.id.fragment_container, hereMapFragment, TAG)
.addToBackStack(TAG)
.commit();
But when back press action happens, I get an empty fragment, without map and objects in it. So, question is: How I should process back press and should I recreate AndroidXMapFragment manually? In documentation the only thing I found is:
AndroidXMapFragment objects have their own lifecycle, state, and back stack, thus it is unsafe to assume objects returned by a AndroidXMapFragment instance (with the exception of Map) will be available throughout the lifetime of its attached activity.