ODK Collect Shortcut Automatically Closes App after Completion

What is the problem? Please be detailed.
For a survey that I am writing, we are trying to mimic the behavior of an app in that we would like the user to be able to click the icon and have the survey open up automatically (without having to go through the technical process of downloading the correct versions or selecting an option through the menu).

I have figured out how to create a shortcut to the specific survey using Widgets; this allows me to create an icone (similar to an app's) on the home page that the user can click to launch the survey. The only problem I am noticing is that when I finish the survey, the app closes. Is there a way to force ODK Collect to just return to the start of the survey without closing? Or is it programmed into ODK Collect that it has to close? Is this something that I could theoretically fix in the XForms code, or is it just a feature of ODK Collect, independent of my survey code?

What ODK tool and version are you using? And on what device and operating system version?
I am using XLSForms, ODK Collect (v1.17.2), and Android 9

What steps can we take to reproduce the problem?
Try creating a shortcut to a survey on your device, and completing the survey. Do you see the application automatically close?

What you have you tried to fix the problem?
I am not sure if there is anything I can actually do to fix the problem without advanced XForms coding knowledge.

Hi @Conor_Gallagher

When you click on the Save Form and exit button at the end of a form this happens https://github.com/opendatakit/collect/blob/master/collect_app/src/main/java/org/odk/collect/android/activities/FormEntryActivity.java#L1242

that means your form is saved and closed. I you want to chang this behavior you need to change that code.

Hi @Grzesiek2010

Thanks for getting back to me, and sorry for the delayed response! So it looks like, from the link you shared, that I would need to change the code in the Android file, not just in the XML code. Is that correct?

-Conor

Yes you would need to have your own edited fork of ODK Collect.