I am new in Windows Phone 7. I want to develop an application that tells current position (lat long) of device and highlight the current position in bing map that works on emulator because I dont have device for testing. Any help.
Thanks in advance.
Have a look at this http://create.msdn.com/en-us/education/catalog/article/GPS-Emulator
CodePlex has a FakeGPS utility (just a .cs file).
I just hard-code a known location:
if (location == GeoCoordinate.Unknown)
{
// Use Palo Alto if we're running in the emulator.
location_string = "&latitude=37.47&longitude=-122.12";
}
Related
How can I add media files to library folders of WP emulator so that I can list them in my program?
The Windows Phone 8.1 SDK allows you to use a folder on your dev machine to simulate an SD card for the emulator. If you put a bunch of media files in that folder before "inserting" it into the emulator, they will get picked up and added to the appropriate libraries.
Note that it can take a few seconds for media indexer to wake up and go through the content but you can easily check on its progress in the appropriate built-in app (eg. Music or Photos).
You can find this feature in the emulator's Additional Tools window:
you need to use SaveSong from MediaLibrary
have a look at this
One of the new features of the Windows Phone 8 SDK is the ability to save(add) songs to the phone's MediaLibrary.
Try this out for Songs.
for photos
Try this
I'm developing a windows phone app and want to show the maps app. I know about the uri scheme's ms-drive-to, ms-walk-to and the HERE equivalents, but I don't want navigation. I also don't want to rely on HERE maps, because someone might not have installed that one. The question:
Is there a way of opening the default Map app on windows phone 8?
You could use the MapsTask API;
MapsTask mapsTask = new MapsTask();
//Omit the Center property to use the user's current location.
//mapsTask.Center = new GeoCoordinate(47.6204, -122.3493);
mapsTask.ZoomLevel = 2;
mapsTask.Show();
You should check the sdk.
If you really want to open the apps, you can do it with a trick. Add a brower task an follow steps of this article.
Does anybody know how to access the Xbox Live Avatar from within an XNA based Windows Phone 7 application?
Examples I have found seem to use a SignedInGamer.Avatar property, but this is not accessible from Windows Phone 7.
Is there another way or is this not possible in the first place?
as a side note, I'm using the recent Mango beta 7.1 SDK
Thanks!
It's not available in code unless you have the elevated privileges of access to XBox live.
You can, however get an image of your avatar from the web. try:
http://avatar.xboxlive.com/avatar/XXXXXXX/avatar-body.png
where xxxxx is the XBox account name. e.g. http://avatar.xboxlive.com/avatar/kris/avatar-body.png
My understanding is they are only available to partners. See this post for more information:
http://www.ozymandias.com/how-do-i-use-xbox-live-apis-on-windows-phone
However, it looks like you can demo them, here's a quick tutorial on using them:
http://xnaessentials.com/archive/2009/06/11/xna-game-studio-3-1-avatar-tutorial.aspx
Is there a method I can call to see if I am currently running in the emulator vs. running on an actual physical phone?
I need to run some code a bit differently when I am in the emulator (I have a mock gps location service).
You can get this from Microsoft.Devices.Environment.DeviceType
if (System.Environment.DeviceType == DeviceType.Emulator)
{
}
Hope that helps
For wp 7.5 Mango sdk, it has moved to the namespace Microsoft.Devices
if (Microsoft.Devices.Environment.DeviceType == DeviceType.Emulator)
{
//Do Stuff
}
what is the tool used to project the screen from the phone to the PC?
I've seen it being used in a presentation but can't find it anywhere.
Thanks!
This is an internal tool used by Microsoft staff only at the moment.
Camera / projector is another option.
You can achieve it by using for instance the following tools and after connecting a projector to your pc ofc:
http://www.mymobiler.com/
ActiveSync Remote Display (Microsoft Mobile Dev. Powertoys)