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

Backbutton Event Listener Android Crash

Rich_S_
Beginner
502 Views

Hi,

I'm using JQM.  I'm trying to trap the android "back" button.

            document.addEventListener("backbutton", function(e){               
                e.preventDefault();
                ipback();  // sends back to home page of app
                return false;
            }, false);

The code above seems to work fine when I build an APK file / install / run.

But, running from the App Preview, it works once, then crashes on the second time with:

!Sorry The application App Preview (process com.intel.html5tools.apppreview) has stopped unexpectedly. Please try again. Force close (button).

Is this a bug in the app preview, or is there a better way to code this?

Thanks in advance, Rich

 

 

 

0 Kudos
1 Reply
PaulF_IntelCorp
Employee
502 Views

My guess is that it is a bug in App Preview, because you are competing with App Preview for that feature... I'll alert the responsible engineer.

0 Kudos
Reply