So it shows up to video type data with view action.
In the app code the changes have been:
start fragment is only initialised when savedInstanceState == null && when intent has no view action, so start fragment is null, and shouldn't be called:
if (savedInstanceState == null) {
if (intent?.action != Intent.ACTION_VIEW) {
getStartFragment()
} else {
loadVideoFromImplicitIntent(intent.data)
}
}
As a result, when hideStartFragment is called, it checks if it comes from an implicit intent, in which case it doesn't carry out the transaction, as start fragment is null:
if (intent?.action != Intent.ACTION_VIEW) {
supportFragmentManager.beginTransaction()
.hide(supportFragmentManager.findFragmentById(id.start_fragment_container) as StartFragment)
.commitAllowingStateLoss()
}
when overriding onBackPressed, if it is in an implicit intent, it goes straight to super.onBackPressed. So, if coming from an implicit intent, pressing back button will never trigger the start fragment to appear, still null:
if (intent?.action == Intent.ACTION_VIEW || areFragmentsInBackstack() ||
supportFragmentManager.findFragmentById(id.start_fragment_container)!!.isVisible) {
super.onBackPressed()
} else {
logic to make start fragment appear
}
keep testing for a bit see if there is no problems
Manifest now has this
So it shows up to video type data with view action.
In the app code the changes have been:
start fragment is only initialised when savedInstanceState == null && when intent has no view action, so start fragment is null, and shouldn't be called:
As a result, when hideStartFragment is called, it checks if it comes from an implicit intent, in which case it doesn't carry out the transaction, as start fragment is null:
when overriding onBackPressed, if it is in an implicit intent, it goes straight to super.onBackPressed. So, if coming from an implicit intent, pressing back button will never trigger the start fragment to appear, still null:
keep testing for a bit see if there is no problems