“You need to install an app for this task” error with Windows Phone 8 App

为君一笑 提交于 2020-01-04 06:13:27

问题


My Windows Phone app gives me error "You need to install an app for this task do you want to search it on store?" on app but there's nothing shows up on debugging. if i click on yes it opens store and searching for something and founds nothing. how can I solve this?

edit: it goes away when I disable IsEnabledScript.


回答1:


Let me try to guess: you are using a WebControl. The page you initially navigate to probably tries to redirect to an URI that has a protocol extension (like facebook://) via Javascript (that explains why you don't have the problem with IsScriptEnabled is false).

Windows Phone tries to open that link with a native app. If you don't have an app that knows how to handle that protocol, it launches a search on the Store to find an app that does.

What you can do is subscribe to the Navigating event of the WebBrowser and look where it redirects.

EDIT :

In the Navigating event, set e.Cancel to true if you want to stop that behaviour.



来源:https://stackoverflow.com/questions/19539583/you-need-to-install-an-app-for-this-task-error-with-windows-phone-8-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!