Windows Phone

Visual Studio 2012.4 RC 3 Available

September 12, 2013 .NET, .NET Framework, .NET Framework 4.5, ASP.NET, ASP.NET 4.5, ASP.NET MVC, C#.NET, HotFixes, Microsoft, Updates, VisualStudio, VS2012, Windows, Windows 8, Windows 8.1, Windows Phone No comments

Microsoft has released the Visual Studio 2012.4 RC3 Update for Visual studio 2012.  This update includes lots of bug fixes and improvements.

Here are some informative links for you:

Windows 8.1 RTM and Windows Server 2012 R2 RTM are available for MSDN/TechNet subscribers

September 9, 2013 .NET, Microsoft, Microsoft SDKs, MSDN, RTM, TechNet, Updates, Visual Studio 2013, VisualStudio, Windows, Windows 8.1, Windows Phone, Windows Server 2012 R2 No comments

Today, Microsoft has released the Windows 8 RTM and Windows Server 2012 R2 RTM bits for MSDN/TechNet Subscribers. As rumoured earlier final build version is  6.3.9600.16384.

If you are an MSDN/TechNet Subscriber you can download the latest build from:

MSDN: https://msdn.microsoft.com/en-US/subscriptions/securedownloads/hh442898 

image

TechNet: https://technet.microsoft.com/en-us/subscriptions/securedownloads/hh442904.aspx

image

image

Related blogs for reference:

Download Windows 8.1 RTM, Visual Studio 2013 RC and Windows Server 2012 R2 RTM Today by Steve “Guggs” Guggenheimer’s blog

http://www.zdnet.com/microsoft-reverses-course-releases-windows-8-1-rtm-to-developers-7000020402/

http://blogs.windows.com/windows/b/bloggingwindows/archive/2013/09/09/download-windows-8-1-rtm-visual-studio-2013-rc-and-windows-server-2012-r2-rtm-today.aspx

WP8Dev– How to identify the sensors supported on your Windows Phone

August 12, 2013 C#.NET, Codes, KnowledgeBase, Microsoft, Microsoft SDKs, Mobile-Development, VisualStudio, VS2012, Windows, Windows Phone, Windows Phone 8, Windows Phone 8.0 SDK, Windows Phone Development, Windows Phone SDK, Windows Phone Store, XAML No comments

This post will give you an  overview on how to identify the sensors supported on your Windows Phone. As a developer when you are developing for Windows Phone – and your application would need to interact with certain sensors in windows phone to achieve a certain functionality, you would need to verify whether the sensors are supported in  targeted devices.

Windows Phone 8 platform has support for the following sensors

  • Motion sensor  
  • Accelerometer
  • Compass
  • Gyroscope

You can access these API’s through the below namespace:

Microsoft.Devices.Sensors

You can check for any of the sensor support through “IsSupported” boolean property of the class

  • Motion sensor   [ Microsoft.Devices.Sensors.Motion ]
  • Accelerometer  [ Microsoft.Devices.Sensors.Accelerometer ]
  • Compass [ Microsoft.Devices.Sensors.Compass ]
  • Gyroscope  [ Microsoft.Devices.Sensors.Gyroscope ]

Here is the sample code block:

  public static string GetSensors()
        {
               StringBuilder sensorsList = new StringBuilder();

                if (Microsoft.Devices.Sensors.Gyroscope.IsSupported)
                {
                    sensorsList.Append("Gyroscope, ");
                }

                if (Microsoft.Devices.Sensors.Compass.IsSupported)
                {
                    sensorsList.Append("Compass, ");
                }

                if (Microsoft.Devices.Sensors.Accelerometer.IsSupported)
                {
                    sensorsList.Append("Accelerometer, ");
                }

                if (Microsoft.Devices.Sensors.Motion.IsSupported)
                {
                    sensorsList.Append("Motion,");
                }

            return sensorsList.ToString();
        }

Note: Only Accelerometer is supported in Windows Phone 8 emulator. To test remaining capabilities, you would need to deploy the application on a real Windows Phone device.

Sending Mobile Push notification using C#/.NET (iOS, Android, Windows Phone 8, Windows 8 and Blackberry)

August 9, 2013 .NET, ANDROID, Blackberry, Extensions, iOS, iPhone, KnowledgeBase, Microsoft, Microsoft SDKs, Mobile, Mobile Services, Mobile-Development, Nokia, Third-Party-Libraries and Frameworks, VisualStudio, VS2010, VS2012, Windows, Windows 8 apps development, Windows Phone, Windows Phone 8, Windows Phone 8.0 SDK, Windows Phone Development, Windows Phone SDK, Windows Phone Store, Windows SDK, Windows Store, Windows Store Development 2 comments

This is an update blog to my earlier blog about Sending Apple iOS Push notifications using C#.

With that blog – I  introduced you to  how to send push notification using Open Source library APNSharp, by the developer John Redth.  Redth announced that library is already deprecated.

Redth came up with  with another open source project called as PushSharp:,published under apache software foundation license.

PushSharp is a server-side library for sending Push Notifications to iOS (iPhone/iPad APNS), Android (C2DM and GCM – Google Cloud Message), Windows Phone, Windows 8, Amazon, Blackberry, and (soon) FirefoxOS devices!. Single library serves the purpose of sending push notifications to multiple platforms. Pretty decent isn’t it?

Here is the basic  architecture:

image

Features of PUsHSHARP

  • Supports sending push notifications for many platforms:
    • Apple (APNS – iPhone, iPad, Mountain Lion)
    • Android (GCM/C2DM – Phones/Tablets)
    • Chrome (GCM)
    • Amazon (ADM – Amazon Device Messaging)
    • Windows Phone 7 / 7.5 / 8 (including FlipTile, CycleTile, and IconicTile Templates!)
    • Windows 8
    • Blackberry (BIS and BES via PAP)
    • Firefox OS (Coming soon)
  • Fluent API for constructing Notifications for each platform
  • Auto Scaling of notification channels (more workers/connections are added as demand increases, and scaled down as it decreases)

Implementation using PushSharp is straight forward

Here’s some sample code: shared by Redth

//Create our push services broker
var push = new PushBroker();

//Registering the Apple Service and sending an iOS Notification
var appleCert = File.ReadAllBytes("ApnsSandboxCert.p12"));
push.RegisterAppleService(new ApplePushChannelSettings(appleCert, "pwd"));
push.QueueNotification(new AppleNotification()
                           .ForDeviceToken("DEVICE TOKEN HERE")
                           .WithAlert("Hello World!")
                           .WithBadge(7)
                           .WithSound("sound.caf"));


//Registering the GCM Service and sending an Android Notification
push.RegisterGcmService(new GcmPushChannelSettings("theauthorizationtokenhere"));
//Fluent construction of an Android GCM Notification
//IMPORTANT: For Android you MUST use your own RegistrationId here that gets generated within your Android app itself!
push.QueueNotification(new GcmNotification().ForDeviceRegistrationId("DEVICE REGISTRATION ID HERE")
                      .WithJson("{"alert":"Hello World!","badge":7,"sound":"sound.caf"}"));

You can get the Push Sharp for your .NET projects from below mentioned links:

Binaries from NuGet: https://www.nuget.org/packages/PushSharp 

To install PushSharp, run the following command in the Package Manager Console

PM> Install-Package PushSharp

Source Code from GitHub: https://github.com/Redth/PushSharp

Documentation and Implementation Guides available at wiki page: https://github.com/Redth/PushSharp/wiki 

Quick links to implementation guides

You can read my previous blogs here:

Sending Apple iOS Push notifications using C#

Apple Push Notifications Service API & C#

Installing Windows 8 Client Hyper-V inside VMware Workstation/Fusion/ESX

August 9, 2013 AMD-V/RVI, Client Hyper-V, ESX, Hyper-V, Hyper-V Platform, Virtualization, VMware, VT-x/EPT, Windows, Windows 8, Windows 8.1, Windows Phone, Windows Phone 8, Windows Phone 8.0 SDK, Windows Phone Development, Windows Phone SDK No comments

Typically I used to try latest version of Windows on VMWare Player, Workstation or VirtualBox. Recently I was trying to set up a Windows Phone 8.0 development environment inside a VMWare virtual machine.

I tried to enable Hyper-V platform components in my Windows 8.1 Preview Virtual machine. It shows an error.

Hyper-V cannot be installed: A hypervisor is already running

  • Unable to use Hyper-V platform inside a Windows 8 virtual machine
  • When trying to enable/install Hyper-V in a Windows 8 virtual machine, you will see the above error:

image

SOLUTION:

Solution for this problem is to edit your VMware Virtual Machine configuration(.vmx) file in your Windows 8 Virtual machine stored location.

  • Switch off/Shutdown your VMware virtual machine
  • Edit the corresponding .vmx file
  • Append the following entries to the vmx file (verify entry if already exists)

hypervisor.cpuid.v0 = “FALSE”
vhv.enable = “TRUE”
mce.enable = “TRUE”

  • Save the changes
  • Start your Windows 8 VMware Virtual machine
  • Now go to Control Panel –> ‘Programs and Features’ –> Turn windows features on or off
  • Viola!,  You can now enable ‘Hyper-V Platform’ . Now you can install Windows Phone SDK on your Windows 8 Virtual Machine

image

VMware Official Knowledgebase Reference Link:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2044876 

Hope that help you guys with similar problems.

Windows Phone SDK 8.0 Update for Windows Phone 8.0.10322–Released

August 2, 2013 .NET, HotFixes, KnowledgeBase, Microsoft, Microsoft SDKs, Updates, VisualStudio, VS2012, Windows, Windows Phone, Windows Phone 8, Windows Phone 8.0 SDK, Windows Phone Development, Windows Phone SDK, Windows Phone Store No comments

Microsoft has released a new Windows Phone SDK 8.0 Update. This update for Windows Phone 8.0.10322 adds four new emulator images to an existing installation of Windows Phone SDK 8.0. This update requires Visual Studio 2012 Update 2. Using this update, you can test how your apps will run on devices that have build 8.0.10322 or higher of Windows Phone 8.

This update adds the following to an existing installation of Windows Phone SDK 8.0:

  • New Windows Phone Emulator 8.0 (10322) WVGA
  • New Windows Phone Emulator 8.0 (10322) WVGA 512 MB
  • New Windows Phone Emulator 8.0 (10322) WXGA
  • New Windows Phone Emulator 8.0 (10322) 720p

image

Note: Windows Phone SDK 8.0 and Visual Studio 2012 Update 2 requires to be installed before this update.

Download: Windows Phone SDK 8.0 Update for Windows Phone 8.0.10322     (an MSI installer of 920MB)