Howto Close/Quit a MobileApplication?

I would find that very annoying, and likely leave negative reviews. I would assume that the app had crashed.

3 Likes

Many apps do close themselves. If someone havent seen it, it is not a valid reasion for not doing it.

To quit the app, it has to finish all secondary Activities, then from the main activity finish it and call the System.exit(0). I havent used android in xojo and the documentation sucks, but if MobileScreen translates to Activities, you should check if the App.CurrentScreen is the main activity and close all the other MobileScreens.

I’ve never seen one, only ones that crash. If an app disappeared on my iPhone I would think it had crashed.

1 Like

Bank apps usually have some option to fully end, even if kind of hidden in some menu.
I usually explicitly ask it from time to time.

The app is not deleted, just finished. :rofl:

By quit you mean the app is no longer in memory and you need to open it again? My family uses iPhone, I use Android and we don’t have any banking app (or any app for that matter) that quits (as is no longer listed on the device apps). We need to select the (banking or not) running app and ‘close it’ by swiping.

Edit: what I have seen with Banking apps is that if I want to make a screenshot using the system capture screen function, the resulting image is blank. Security feature. Other than that, the apps logout.

1 Like

Being in the recent task list does NOT means the app is still runing and viceversa :man_facepalming:t2: That list is not even for apps only, it can include tasks, displaying many ones for a single app.

Apps can set a flag to be listed even if the actuall process has ended.
Apps can remove themselves from the recents list
Apps can set a flag to be allways excluded from the recents list

Pretty sure that there are a few millions of apps you havent had.

I had. But I had to check. The behavior changed. They still close the task but seems to maintain a “cover” screen active now, a primary. So memory was zapped, secondary finished, and I find an empty screen with the bank icon in the list of tasks, if I touch it, it acts like reopening the app. Load, clean, asks for biometric id
 Wasn’t fully ended? Just sub tasks of it? Maybe intentional, so people like Ian get a sense of “here it is, as expected”. Maybe they used finishAffinity() instead of finishAndRemoveTask() so it keeps a “ghost” there (Task still listed) and touching it would be like pressing a not open app icon.

And you’d think it had crashed exactly because you have never seen one quitting.
I know at least one, perhaps two, app(s) that close on my phone, so I’ve learnt that a disappearing app may have quit gracefully.
I’m not saying that is the right way (nor the wrong one), just that expectations can come from having seen something or not.

No. The app quits only when you quit from the app. Thats what i expect to do when i close the app as well.

Unfortunately, there is no System.Exit() in MobileApps :frowning:

If you search the official Apple developer forums for ways to terminate an iOS app via code, you will quickly find that there is no function provided by Apple for this purpose.

Apple wrote on this topic:

There is no API provided for gracefully terminating an iOS application.

In iOS, the user presses the Home button to close applications. Should your application have conditions in which it cannot provide its intended function, the recommended approach is to display an alert for the user that indicates the nature of the problem and possible actions the user could take — turning on WiFi, enabling Location Services, etc. Allow the user to terminate the application at their own discretion.

I’m with @Ian_Kennedy here.

1 Like

This whole thread seems to me to be a metaphor for social media and smartphones: you can checkout but you can’t leave.

2 Likes

As others have said no such thing exists on iPhone.

Martin T post how to call the native function.

Correct. I was actually talking about Android.

Having never even handled an Android phone I’m not qualified to even comment. I’m talking about iPhone.

1 Like

I recognise this thread has mixed platforms discussed about.