Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Exit from App (Working on Android devices only)

Rodrigo_M_1
New Contributor II
725 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
725 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
726 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