- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I am trying to test my cordova app which has been built using Intel XDK for windows phone.
I am testing the app in windows phone 8.1 emulator, the backbutton event is not firing, instead it exits the app.
And I tried with some suggestions I read from internet to use winjs to capture backclick event which is not also working.
Please help me resolve this problem.
Code to capture backbutton:
document.addEventListener('backbutton', function(){
// Code to handle;
e.preventDefault();
}, false);
With WinJS:
window.WinJS.Application.onbackclick = function (e) {
// Code to handle
e.handled = true;
return true;
};
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Sam, also, try including this script in the front of your app, there may be some issues related to the strict security model that Microsoft imposes on that webview > https://github.com/xmnboy/xdk-win8x-compat.js < this will also allow you to use alert() in your code for debugging on a real device.
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hello Sam Deepak,
I would recommend you to try building our one of the existing samples and watch the response of the back button.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Sam, also, try including this script in the front of your app, there may be some issues related to the strict security model that Microsoft imposes on that webview > https://github.com/xmnboy/xdk-win8x-compat.js < this will also allow you to use alert() in your code for debugging on a real device.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi Paul,
Thanks. It worked. Here is what I can summarize.
Basically in my previous question, you have referred to a plugin from MSOPENTECH (winstore-jscompat,) which made javascript plugins work. But backbutton was still the issue I was facing. Then, I came to know that backbutton event from cordova has been ignored in windows phone 8.1 runtime and it delivers the hardware backbutton event to a Microsoft javascript library called WinJS. So I used it, but still was the issue unresolved. Now after referring the plugin you have referred in your reply (https://github.com/xmnboy/xdk-win8x-compat.js) which is once again customized and corrected by Intel XDK team (this is what I read there in this link), the backclick event works.
So the solution is to refer xdk-win8x-compat.js before all scripts. And backclick event is fired only in conjuction with this library. So for windows phone build, it is required to add this library before the script that starts the app. And for backbutton event in windows phone, it is required to add the base library from WinJS, i.e., you can see in the attached zip which is what I used.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
please help me I can not publish my app for windows phone 8.1 , I have tried everything ...
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi, Pablo,
Could you please summarize what did not work.
