问题标签 [windows-phone-7.1]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
wcf - 如何实现从 Window Phone 7 到 PC 的流式上传
我试图实现从 Windows Phone 7 客户端到 PC 服务器的文件流式上传(~10 MB)。我尝试了以下方法:
- REST WCF 和 WebRequest POST -> 失败,因为 WP7 API 中的 HttpWebRequest 中缺少 AllowWriteStreamBuffering 和 SendChunked。
- 带有 MessageContract 和 Stream -> 的 WCF 失败,因为客户端应用程序上的服务代理生成器将 Stream 更改为 byte[]。
现在我正在考虑使用以下方法之一:
- 自定义数据分块和某种带有 WCF 的 StartNewTransfer/SendChunk/CompleteTransfer 模式。
- 使用 TCP 流式传输 (WP7.1)
我的问题:
- 流式 WCF 或 REST 上传是否可以在 WP7.1 中使用,还是应该已经在 WP7 中使用?(-> 我可能做错了什么)
- 我还有什么其他选择?
- 您更喜欢哪种方法?
c# - Windows Phone 7 芒果使用音频流
我想知道如何使用音频流。我有兴趣以最有效的方式发出声音,
谢谢 !!
windows-phone-7 - ScheduledTaskAgent 和 PeriodicTask 是否需要与主应用程序位于单独的程序集中?
我试着从微软的这个例子中学习,我可以说我做了所有事情,除了把 ScheduledTaskAgent 和 PeriodicTask 放在一个单独的程序集中。当我在模拟器中运行我的应用程序并尝试使用以下命令启动定期任务时:
ScheduledActionService.LaunchForTest(_task.Name, TimeSpan.FromSeconds(60));
什么都没有发生,没有例外,一分钟后,ScheduledTaskAgent 永远不会启动,当我在模拟器的“设置 > 后台任务”下查看时,没有列出任何内容。
windows-phone-7 - 检测手机角度问题 - Mango API
我最近开始研究 windows phone 7.1 (Mango) SDK。有没有一种简单的方法来获取手机相对于地面的角度(近距离预测也不错)?
谢谢,亚历克斯
windows-phone-7 - ResolveHostNameAsync 打破墓碑?
我注意到调用DeviceNetworkInformation.ResolveHostNameAsync
阻止应用程序从墓碑状态恢复的问题。如果在调试时(通过项目设置,调试选项卡)在停用时强制墓碑,按 Windows 按钮,然后按返回按钮返回应用程序会导致手机/模拟器显示“正在恢复...”并且永远不会真正返回墓碑状态。
为了测试这一点,我创建了一个新的 WP7.1 应用程序并添加了一个具有以下操作的按钮:
对于测试,我的回调方法实际上并没有做任何事情:
如果您点击按钮,退出,然后返回应用程序,它将显示“正在恢复...”,直到您再次按下 Windows 按钮。
我正在使用 WP7.1 Beta 2 Refresh SDK。
有任何想法吗?
silverlight - WP7 - Splash Screen not working outside debugger session
When my MainPage loads in my Windows Phone 7 application, it triggers a popup splash screen that includes a progress bar and a graphic in a usercontrol. After displaying the spash screen I do some work in a BackgroundWorker thread to load some resources while the spash displays. When the loading is done I dismiss the popup. This technique is well documented on WindowsPhoneGeek.
I noticed today that while this is working flawlessly when running in debug under Visual Studio, if I run the same build directly without the debugger connected, the splash screen animation and progress bar never appear and the DoWork() thread takes at least twice as long to execute the same operations. I can see that the MainPage constructor gets called as well as OnNavigatedTo, but the popup still does't display and the default jpg splash image remains on the screen, until the worker thread completes. Then the popup displays for < 1 second and the mainpage displays. Again, this all works flawlessly when debugging through VS 2010.
This is all in the Emulator, I don't have a device yet. I just noticed this today, and coincidently(?) I just updated the environment to 7.1 last night.
EDIT:
I ended up buying a device on ebay this week to ensure that I don't release an app where I can't confirm that it works properly. I can confirm that whatever the problem is, it does NOT occur when running the application on the device. Good news. Still, I can't explain what appears to be an approximately 3-5 second pause in my application after the consrtuctor is called. I even changed my logic in the constructor to set a System.Windows.Threading.DispatcherTimer
to fire in 100ms to kick off my logic. When this code executes, the constructor completes, but the timer doesn't tick for 3-5 seconds. Very odd, and only in the simulator when not attached to the debugger.
windows-phone-7 - 安装 Mango SDK 后无法启动 Windows Phone 模拟器
我在计算机上使用 Windows Phone SDK 7.0 已经有很长时间了。现在我安装了 SDK 7.1(测试版),由于某种原因我无法启动模拟器。我收到此错误:
程序无法启动,因为您的计算机缺少 MFPlat.DLL。尝试重新安装程序以解决此问题。
我的系统上没有那个 dll,但我从另一台计算机上抓取它并将它放在 System32 和模拟器目录中,但仍然没有运气。我尝试重新安装 SDK 两次也没有运气。
有任何想法吗?提前致谢
c# - 如何在 WP7 XNA 中检测 HorizontalDrag 的方向?
就像提到的那样,检测用户水平拖动方向的最佳方法是什么。我正在尝试创建一个响应此手势的相机类,但在确定它们拖动的方向时遇到问题。任何建议表示赞赏。
post - 发送 POST 数据
我正在尝试连接 HTTP 服务器并发送一些日期。我的代码看起来像->
我收到异常“远程服务器返回错误:NotFound。” 我的调试窗口看起来像
System.Windows.dll 中发生“System.Net.WebException”类型的第一次机会异常 System.Windows.dll 中发生“System.Net.WebException”类型的第一次机会异常 System.Net 类型的第一次机会异常.WebException' 发生在 System.dll
请帮忙!PS:我已经安装了 7.1 SDK Beta,但它应该在 7.0 模拟器上运行(目标 windows phone 版本是 WP7)。
编辑:
现在代码看起来像
它连接到我的 PHP 脚本
但反应就像
在此先感谢您的帮助 :)
编辑: 好的,我想通了;)一切正常;)
c# - Mango 快速应用切换 & 繁重的处理崩溃
我有一个 WP7 应用程序,有时必须进行长时间(5-25 秒)的处理。
使用 Mango,当应用程序在处理过程中设置为休眠状态时(例如:用户按下 Windows 按钮或锁定屏幕),当用户返回时,应用程序崩溃。
我在模拟器和我的设备上试过,同样的行为。
如果我在 Visual Studio 的调试模式下重现它,它不会崩溃,因此很难找到真正发生的事情。
要重现它,请启动一个新的 Windows Phone 项目,在 MainPage.xaml 上添加一个按钮并在执行无限循环的 click 事件上添加一个事件处理程序:
我的问题是:到底发生了什么?为什么会崩溃?快速应用程序切换不应该只是暂停应用程序进程并恢复它吗?
编辑:我注意到的另一件事是,在运行繁重的进程时,当我离开/进入应用程序时,似乎没有引发停用和激活的事件。