简体   繁体   English

相机镜头应用程序导航在Windows Phone 8中不起作用

[英]Camera Lens app navigation is not working in Windows Phone 8

My problem is somewhat specific moreover i am working on this scenario for the first time. 我的问题有点具体,而且我是第一次处理这种情况。 I am building the application in Windows Phone 8 , here my requirement is to launch the page from my application when user taps on the Listed lens apps list from the ViewFinderLaunch. 我正在Windows Phone 8中构建应用程序,在这里,我的要求是当用户从ViewFinderLaunch轻按“列出的镜头应用程序”列表时,从应用程序启动页面。

This MSDN link helped me a lot. 这个MSDN链接对我帮助很大。

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj662936(v=vs.105).aspx http://msdn.microsoft.com/zh-CN/library/windowsphone/develop/jj662936(v=vs.105).aspx

Below link too: 下面的链接也是:

http://www.developer.nokia.com/Community/Wiki/Extending_the_Windows_Phone_8_Camera_App_with_Lenses http://www.developer.nokia.com/Community/Wiki/Extending_the_Windows_Phone_8_Camera_App_with_Lenses

So far above tutorials helped me to complete the Camera Lens application. 到目前为止,以上教程已帮助我完成了Camera Lens应用程序。 But one problem is stopping me to complete it 100%. 但是一个问题是阻止我100%完成它。 When the application is running, if i put the code to navigate to the Page A.xaml, it is not navigating. 当应用程序运行时,如果我将代码导航到Page A.xaml,它就不会导航。 Unfortunately this works perfectly fine when the my application is not running. 不幸的是,当我的应用程序未运行时,这工作得很好。

Code that is used to navigate to page A.xaml from ViewFinderLaunch. 用于从ViewFinderLaunch导航到页面A.xaml的代码。

if (uri.IsWellFormedOriginalString())
            {
                if (uri.OriginalString.Contains("ViewfinderLaunch"))
                {
                    return new Uri("/A.xaml",UriKind.RelativeOrAbsolute);
                }
            }

Could you please anyone help me on this ? 可以请任何人帮我吗?

After a week, i found the reason for the problem. 一周后,我找到了问题的原因。 In my Windows Phone app, i had enabled Application resume in the WPAppManifest.xml. 在我的Windows Phone应用程序中,我已在WPAppManifest.xml中启用了应用程序简历。

<Tasks>
      <DefaultTask Name="_default" NavigationPage="HomePage.xaml" ActivationPolicy="Resume" />
    </Tasks>

When ActivationPolicy is Resume, it created this problem. 当ActivationPolicy为Resume时,它会产生此问题。 So I just resolved this problem by changing this ActivationPolicy into Replace. 因此,我只是通过将ActivationPolicy更改为Replace来解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM