My app has several fragments and activities. Over the course of the main parent activity's lifecycle, the app presents information/options to the user in other activities.
The documentation for Fragments has the following stipulation for commit():
Caution: You can commit a transaction using commit() only prior to the activity saving its state (when the user leaves the activity). If you attempt to commit after that point, an exception will be thrown. This is because the state after the commit can be lost if the activity needs to be restored. For situations in which its okay that you lose the commit, use commitAllowingStateLoss().
The issue is that after returning to the parent activity, I can no longer use FragmentTransactions which are integral to the way I have designed navigation in the app.
One solution I have thought of is to change my activities to fragments, however my app will also eventually use in-app billing which I believe will always start its own activity. This seems like a huge restriction - at some point in development I will end up having to display a separate activity.
I could probably get away with using commitAllowingStateLoss(), but I feel like I am missing a major concept in Android tablet app development. Is there a way to start activities then return to the parent activity (which manages fragments) without losing the ability to commit FragmentTransactions?