javascript - Phonegap Application Get Crashed on backbutton click for android -


i'm working on phonegap application in combination angular js. here first off all, information you:

  1. cordova version: 3.6.3
  2. angular js version: v1.4.0-rc.0

now have overridden backbutton fuctionality android code:

commonservice.checkconnection(); if (sessionstorage.device == "android mobile" || sessionstorage.device    ==       "android tablet") {         document.addeventlistener("backbutton", onbackkey, false);     } 

my onbackkey function looks this:

function onbackkey() {    alert("onbackkey"); } 

now function called needed android application crashed (when click button in android).

edit:--

i getting following error log:-

    07-09 14:13:26.925: d/webview(24377):         loadurl=javascript:cordova.firedocumentevent('backbutton');     07-09 14:13:26.939: d/cordovaactivity(24377): onmessage(exit,null)     07-09 14:13:27.076: d/cordovaactivity(24377): paused application!     07-09 14:13:27.076: d/activitythread(24377): act-am_on_pause_called activityrecord{41f61d68 token=android.os.binderproxy@41f61538 {com.corecon.coreconapp/com.corecon.coreconapp.coreconmobile}}     07-09 14:13:27.079: w/pluginmanager(24377): thread warning: exec() call app.exitapp blocked main thread 140ms. plugin should use cordovainterface.getthreadpool().     07-09 14:13:27.089: d/activitythread(24377): act-pause_activity_finishing handled : 0 / android.os.binderproxy@41f61538       android.view.windowleaked: activity com.test.testapp has leaked window    com.android.internal.policy.impl.phonewindow$decorview{425281b8 v.e..... r.....i. 0,0-698,384} added here 07-08 12:45:43.883: e/windowmanager(14991) 

i can't figure out why happens. can me solving problem, have ideas why pressing button forces app crash?


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -