I have a problem for implementing up navigation on an app with this navigation tree:
this is an old post for sure, but as I was studying the SharedPreferences, I think it could be a possibility to stack this information within a sharedPreferences data, and to modify its value each time before going down the 2 parents. Then by reading it, you should be able to directly know your parent, and this without having to build a whole class for that.