Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
17060 Discussions

Exit from App (Working on Android devices only)

Rodrigo_M_1
New Contributor II
790 Views

Hi there,

I'm trying to figure out how to exit from the application on iOS ...

I have the follow code that's works fine on Android devices, but on iOS not!

<html>
  <head>
  <title>PhoneGap</title>

    <script type="text/javascript" src="cordova.js"></script>      
    <script type="text/javascript"">

        function onLoad()
        {
              document.addEventListener("deviceready", onDeviceReady, true);
        }

        function exitFromApp()
         {
            navigator.app.exitApp();
         }

    </script>
</head>
<body onload="onLoad();">
   <button name="buttonClick" onclick="exitFromApp()">Click Me!</button>
  </body>
</html>

 

0 Kudos
1 Solution
Elroy_A_Intel
Employee
790 Views

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

In iOS, the user is expected to press the Home button to close applications.

View solution in original post

0 Kudos
1 Reply
Elroy_A_Intel
Employee
791 Views

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

In iOS, the user is expected to press the Home button to close applications.

0 Kudos
Reply