惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
T
Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Engineering at Meta
Engineering at Meta
T
Tenable Blog
C
Cisco Blogs
T
The Blog of Author Tim Ferriss
NISL@THU
NISL@THU
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
P
Privacy & Cybersecurity Law Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Secure Thoughts
N
News and Events Feed by Topic
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
H
Hacker News: Front Page
I
InfoQ
L
LangChain Blog
Security Latest
Security Latest
The Cloudflare Blog
Forbes - Security
Forbes - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Stack Overflow Blog
Stack Overflow Blog
TaoSecurity Blog
TaoSecurity Blog
量子位
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
Scott Helme
Scott Helme
爱范儿
爱范儿
A
Arctic Wolf
F
Full Disclosure
酷 壳 – CoolShell
酷 壳 – CoolShell
Schneier on Security
Schneier on Security
N
News and Events Feed by Topic
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
LINUX DO - 最新话题
V2EX - 技术
V2EX - 技术
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Know Your Adversary
Know Your Adversary
Application and Cybersecurity Blog
Application and Cybersecurity Blog

博客园 - 被遗弃的小指

微软今日开始向开发者推送版本号为7712的Mango 微软发布Android应用的WP7迁移指导工具 你不可不知的Mango — 开发者篇(4) 你不可不知的Mango — 开发者篇(3) 你不可不知的Mango — 开发者篇(2) 你不可不知的Mango — 开发者篇(1) 第六届 Mobile Dev Day – WP7优秀应用经验分享日 Windows Phone 7 漂流记 WPMind Framework for WP7 开源项目启动 TechEd 2010微软技术大会 Windows Phone 7 相关课程预告 Windows Phone 7 Marketplace现状分析 Windows Phone 7 开发技术在线学习【3】 — Launchers & Choosers 助力Windows Phone 7,微软推出APP HUB Windows Phone 7 SDK 正式版本RTW Windows Phone 7的XNA游戏开发系列教程 Windows Phone 7 Jump Start Training视频教程 Windows Phone 7 开发技术在线学习【2】 -- WP7 多任务之道 比一比,秀一秀!微软正版软件拿回家! Windows Phone 7开发技术在线学习系列活动正式开始
给你的Windows Phone 7模拟器加入GPS和加速度传感器模拟功能
被遗弃的小指 · 2010-08-03 · via 博客园 - 被遗弃的小指

想必现在已经有了很多开发人员开始了Windows Phone 7的学习,如果您还没有开始的话,可以看看这篇文章来 下载Windows Phone Developer Tools Beta版以及对应的Training Kit。对于现在还拿不到Windows Phone 7的广大开发者来说,使用Windows Phone Developer Tools里面自带的模拟器来进行开发不失为一种方便的替代。但是,使用模拟器也有一定的局限性,例如性能无法和真实的设备保持一致,无法访问真正的移动 网络,无法获取GPS数据以及各种传感器的数据。现在,国外已经有些开发者解决了GPS和加速度传感器的模拟数据问题。

对于GPS的模拟keyboardP给出了一个解决方案。他使用一个普通的WinForm程序来访问Bing地图,并将地图中的GPS数据通过WCF服务的形式发布出来,然后在Windows Phone 7的程序中来访问这个WCF服务来获取模拟的GPS数据。

image

感兴趣的朋友可以下载其代码研究一番。当然,也可以看看下面的视频简单了解一番。

而对于加速度传感器的模拟,相对来说稍微麻烦一些。毕竟不像上面的程序那样通过浏览器控件来访问Bing就可以获取到坐标位置。所以Prabhu Kumar的解决之道是 使用一台真实的HD2来获取加速度传感器的数据,然后把这些数据再传回WCF服务,同时,Windows Phone 7的程序在通过这个WCF服务来获取加速度传感器的值。当然,微软并没有给出在Windows Mobile操作系统上有关加速度传感器的API,而HTC也没有公开这些。但是这些也难不倒大家的智慧,这里Prabhu Kumar也给出了Windows Mobile操作系统上HTC的加速度传感器的相关文章。原理很简单,操作起来很麻烦,好吧,还是让我们先看看视频吧:

怎么样?很有意思的实现吧。好了,如果您感兴趣的话,快点搭建你的Windows Phone 7开发环境来试试看吧:
1. Windows Phone 7开发环境搭建
2. No Device? No GPS? No Matter! – (With Code!)
3. HTC HD2, Accelerometer and Windows Phone 7 – Source Code