Exit from app when click button in android phonegap?

前端 未结 7 1895
时光取名叫无心
时光取名叫无心 2020-12-28 11:13

I am new to phonegap. I have prepared one sample application. My application has 2 pages, the first page has one button, when clicked the second page will open. It is workin

7条回答
  •  无人及你
    2020-12-28 12:01

    sorry i can't reply in comment. just FYI, these codes

    if (navigator.app) {
    navigator.app.exitApp();
    }
    else if (navigator.device) {
      navigator.device.exitApp();
    }
    else {
              window.close();
    }
    

    i confirm doesn't work. i use phonegap 6.0.5 and cordova 6.2.0

提交回复
热议问题