1

Is there a way to close/kill an web-app on a tablet (iPad or Android) with a button? At the moment, we have to double-click for example the iPad homebutton and close/kill the app. Is there also a way to do the same with a button? So we can put such a button in our application to close it faster.

The web-app is opened in a browser. We just generate a shortcut icon on the home screen of the tablet and opened it without the ugly browser container around it. Our web-app is used by younger and older people (hospital). So for the younger generation it's easy, because they know the features of a tablet device. The older people most don't. So they know just simply basics like a red "x" for closing something, which is placed in the right corner. For them such components are easier to work with the web-app. It's for the user experience and usability.

Thanks

maddy
  • 4,001
  • 8
  • 42
  • 65
webta.st.ic
  • 4,781
  • 6
  • 48
  • 98

3 Answers3

1

it's not a good idea to quit app if you are planning for app store or google play store submission. You must not quit for iOS at least. With jailbroken you can do whatever you want. Above answer from @duncan and @murat looks right to me.

i am not sure however there is some discussion going on :

quit web app1

quit web app2

Community
  • 1
  • 1
maddy
  • 4,001
  • 8
  • 42
  • 65
  • I now saw, that I forgott a importent information: It's a web-app and not a classic app, which will be available in the app store. It's a web-app, which is opened in a browser, and you can generate a shortcut icon on the tablet homescreen to use it in a web-app-view, without the browser container around it. So you have to close it fast and return to the homescreen... – webta.st.ic May 17 '16 at 13:44
  • Our software is used by young and older people (hospital), so the younger generation know the features with a modern touch device, but the older not. There are much people, who just know the basics (like a close-button in the right corner etc.). So for them it's easier to work with such components... – webta.st.ic May 17 '16 at 13:49
0

On iOS, it's technically possible but not allowed.

All you have to do is call exit(0), but any app that does that will be rejected by Apple.

Duncan C
  • 128,072
  • 22
  • 173
  • 272
0

For iOS you can try to use this code

[UIAlertView showWithTitle:@"Success"
                   message:@"Please restart application, to apply changes"
         cancelButtonTitle:@"Ok"
         otherButtonTitles:nil
                  tapBlock:^(UIAlertView *alertView, NSInteger buttonIndex)
{
    @throw [NSException exceptionWithName:@"restart"
                                   reason:@"restart"
                                 userInfo:nil];
}];

and there is some backdoor which can help you (but not guaranteed). You can hide your button for AppStore tests and show button after release from backend, but there still will be chance that in the future AppStore will test it again , but it's very small chance ;)

Hayk Petrosyan
  • 363
  • 1
  • 6