When tools for developing Windows 10 Universal Apps were released couple of days ago I started porting one of my apps to find out, what are the changes and possible issues.
First issue I ran into was that I was unable to add Behaviors SDK to my project – the list of Extension SDKs was almost empty:
In Windows/Phone 8.1 project:
In Windows 10 UAP project:
Luckily, there is a workaround, according to Release Notes for the first version of Windows 10 Tools it’s necessary to copy the extension SDKs from the Windows 8.1 Extension SDK location to the universal apps location—that is:
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs
C:\Program Files (x86)\Microsoft SDKs\UAP\v0.8.0.0\ExtensionSDKs
After restarting Visual Studio 2015 the copied SDKs are then available in the list and you can add it just like before. Done.
Following the previous WPdev quick tip how to initiate Email Compose from your app, here is another API that developer often need:
- Navigate to Rate and Review dialog for the current app – if you want to initiate app rating from the current user
- Navigate to Windows/Phone Store to the currently running app – if you want the user to purchase full version of current app or upgrade to a new version
- Navigate to Windows/Phone Store to all apps published by the current developer – if you want to encourage the user to download other of your apps
Unfortunately all these tasks require different type of API in Windows Phone 7.5/8/8.1 Silverlight apps, in Windows 8.1 apps and another one in Windows Phone 8.1 WinRT apps and since I needed all these methods in my recent Windows Universal App NASA TV Live, I decided to put it all into short article for future use, so here it is:
When developing Windows Phone or Windows Store app it’s often useful to give your user option to send you feedback email or feature request. In this short #WPdev article I’ll cover all three different approaches you could use in all current Windows Store platforms.
Windows Phone 7, 7.5, 8 and 8.1 (Silverlight)
Sending emails from original Windows Phone 7+ Silverlight apps is done using the EmailComposeTask:
string to = "email@example.com";
string subject = "Idea for your app";
string body = "Hi, here's an idea for your cool app...";
EmailComposeTask emailTask = new EmailComposeTask
To = to, Subject = subject, Body = body,
//Cc = , Bcc = , CodePage = ,
When the Show method is called the system dialog appears where you can choose the mail account that will be used for sending the email.
As you can see the usage is really simple, one class and one method is all you need. Note there is no way how to send emails with attachments using this API.
Another problem also is that this API is no longer available when developing Windows 8/8.1 or Windows Phone 8.1 WinRT apps. So what is the alternative?