{"id":46022,"date":"2019-12-23T12:04:23","date_gmt":"2019-12-23T20:04:23","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/xamarin\/?p=46022"},"modified":"2019-12-24T10:42:33","modified_gmt":"2019-12-24T18:42:33","slug":"santa-talk-xamarin-challenge","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/santa-talk-xamarin-challenge\/","title":{"rendered":"Xamarin Challenge: Santa Talk &#8211; Build an Intelligent, Serverless Xamarin App"},"content":{"rendered":"<p>It&#8217;s the holiday season, and you know what that means&#8230; Santa will be coming to town to give gifts to all the well-behaved developers out there! Do you want to know a sure way to get on Santa&#8217;s &#8220;Nice List&#8221;? Building an intelligent, Serverless, Xamarin app. Or as we like to call it, completing the Santa Talk challenge.<\/p>\n<p>Time to cozy up and hack away! <\/p>\n<h2>Santa Talk &#8211; The App<\/h2>\n<p>The Santa Talk app allows you to send a note to Santa, and then find out whether he&#8217;ll deliver a gift to your house.<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/12\/Santa-Talk.gif\"><img decoding=\"async\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/12\/Santa-Talk.gif\" alt=\"Santa Talk App\" width=\"518\" height=\"874\" class=\"aligncenter size-full wp-image-46031\" \/><\/a><\/p>\n<p>(A very special thanks to the <a href=\"https:\/\/snppts.dev\/\" rel=\"noopener noreferrer\" target=\"_blank\">snppts website<\/a> for the great <a href=\"https:\/\/snppts.dev\/snippet\/in-space\" rel=\"noopener noreferrer\" target=\"_blank\">inspiration on the user interface<\/a> for Santa Talk! Y&#8217;all are definitely on the nice list this year!)<\/p>\n<p>Santa&#8217;s a busy guy this time of year though. So this Xamarin.Forms app relies on <a href=\"https:\/\/docs.microsoft.com\/azure\/cognitive-services\/text-analytics\/overview?WT.mc_id=santatalkchallenge-xamblog-masoucou\" rel=\"noopener noreferrer\" target=\"_blank\">Microsoft Cognitive Services &#8211; Text Analytics<\/a> and <a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/functions-overview?WT.mc_id=santatalkchallenge-xamblog-masoucou\" rel=\"noopener noreferrer\" target=\"_blank\">Azure Functions<\/a> to determine if you&#8217;re getting a gift.<\/p>\n<p>You can download the app, and read instructions on how to install the Azure components of it from this GitHub repo.<\/p>\n<h3>Cognitive Services &#8211; Text Analytics<\/h3>\n<p>Text Analytics is one of over twenty different Cognitive Services products. And it can do some pretty neat things.<\/p>\n<p>For example, it can parse a string of text and pick out the key phrases. In essence telling you just the important parts. It can also identify entities, or people, places, or things contained within a sentence.<\/p>\n<p>Santa Talk uses Text Analytics&#8217; ability to detect the language a string a text was written in. And it also parses the general sentiment of a string. Positive or negative thoughts behind the text.<\/p>\n<h3>Azure Functions<\/h3>\n<p>Even though Text Analytics provides a .NET SDK, you should not invoke it directly from a Xamarin app (or any client-based application for that matter).<\/p>\n<p>Rather, you should only invoke a private resource like Text Analytics from a server-based client. You do not want to leak the private API key for Text Analytics after all.<\/p>\n<p>And Azure Functions makes a great server-based client.<\/p>\n<p>The benefits of Azure Functions are numerous, but Santa Talk exploits the ability to have a Function run in response to an HTTP call. Essentially making a Function a backing Web API.<\/p>\n<h2>Santa Talk &#8211; The Challenge<\/h2>\n<p>So what&#8217;s the challenge? How do you get on Santa&#8217;s &#8220;Nice List&#8221;?<\/p>\n<ul>\n<li>Visit the existing Santa Talk app repo and fork\/clone it.<\/li>\n<li>Extend it in some way.<\/li>\n<li>Open a pull request on the original repo and let us know:\n<ul>\n<li>How you extended the repo, and include some screenshots.<\/li>\n<li>Your thoughts on the Azure services and\/or Xamarin products that you used.<\/li>\n<li>What went well and what did not.<\/li>\n<li>Final date for submission is January 5th at 11:59PM Pacific<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Get Sweet Xamarin Swag!<\/h3>\n<p>Everyone who participates can apply for some swag. Everyone will win Xamarin stickers and 10 entries will be chosen at random to receive a $25 gift card to the <a href=\"https:\/\/stores.kotisdesign.com\/dotnetfoundation\">.NET Foundation Store<\/a>. Which is packed with Xamarin t-shirts, monkeys, and stickers!<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/12\/image-1.png\" alt=\"Xamarin swag including stickers, monkeys, and shirts\" width=\"835\" height=\"626\" class=\"aligncenter size-full wp-image-46042\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/12\/image-1.png 835w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/12\/image-1-300x225.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/12\/image-1-768x576.png 768w\" sizes=\"(max-width: 835px) 100vw, 835px\" \/><\/p>\n<h3>What Can You Add or Extend?<\/h3>\n<p>The world is your snow globe. Which means, any idea is a good idea!<\/p>\n<p>Here are a few that we thought of:<\/p>\n<ul>\n<li>Add in the ability to take a photo, and use <a href=\"https:\/\/docs.microsoft.com\/azure\/cognitive-services\/computer-vision\/home?WT.mc_id=santatalkchallenge-xamblog-masoucou\" rel=\"noopener noreferrer\" target=\"_blank\">Cognitive Services Vision<\/a> to have Santa figure out if you&#8217;ve been naughty or nice.<\/li>\n<li>Save the responses from Santa on device and display them with a <a href=\"https:\/\/docs.microsoft.com\/xamarin\/xamarin-forms\/user-interface\/carouselview\/?WT.mc_id=santatalkchallenge-xamblog-masoucou\" rel=\"noopener noreferrer\" target=\"_blank\">`CarouselView`<\/a>.<\/li>\n<li>Redesign the user interface using <a href=\"https:\/\/docs.microsoft.com\/xamarin\/xamarin-forms\/app-fundamentals\/shell\/?WT.mc_id=santatalkchallenge-xamblog-masoucou\" rel=\"noopener noreferrer\" target=\"_blank\">`Shell`<\/a>.<\/li>\n<li>Track the user&#8217;s location when they make a request, and <a href=\"https:\/\/docs.microsoft.com\/xamarin\/xamarin-forms\/user-interface\/map\/?WT.mc_id=santatalkchallenge-xamblog-masoucou\" rel=\"noopener noreferrer\" target=\"_blank\">make annotations on a map<\/a> where the naughty and nice developers live.<\/li>\n<li>Connect to <a href=\"https:\/\/docs.microsoft.com\/azure\/logic-apps\/?WT.mc_id=santatalkchallenge-xamblog-masoucou\" rel=\"noopener noreferrer\" target=\"_blank\">Azure Logic Apps<\/a> to send a Tweet whenever Santa gets a &#8220;letter&#8221;.<\/li>\n<\/ul>\n<h2>So Get Going!<\/h2>\n<p><em>Additionally, there is a free tier of Cognitive Services and you can run Azure Functions locally &#8211; so this can all be done for FREE!<\/em><\/p>\n<p>Here are some resources to get you started:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/codemillmatt\/santa-talk\" rel=\"noopener noreferrer\" target=\"_blank\">The Santa Talk Challenge Repo!<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/azure\/azure-functions\/functions-develop-local?WT.mc_id=santatalkchallenge-xamblog-masoucou\" rel=\"noopener noreferrer\" target=\"_blank\">How to code and debug Azure Functions locally<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/azure\/cognitive-services\/welcome?WT.mc_id=santatalkchallenge-xamblog-masoucou\" rel=\"noopener noreferrer\" target=\"_blank\">Everything you could ever want to know about Cognitive Services<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/learn\/paths\/create-serverless-applications\/?WT.mc_id=santatalkchallenge-xamblog-masoucou\" rel=\"noopener noreferrer\" target=\"_blank\">Several FREE courses on creating serverless applications with Azure Functions<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This Winter Solstice, give the Xamarin holiday challenge a spin for a chance to win awesome Xamarin swag by forking or cloning the Santa Talk repo and submitting to GitHub!<\/p>\n","protected":false},"author":569,"featured_media":46042,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2,383,1],"tags":[867,7081,7699,7700,7701],"class_list":["post-46022","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developers","category-events","category-xamarin","tag-azure","tag-challenge","tag-cloud","tag-holiday","tag-santa-talk"],"acf":[],"blog_post_summary":"<p>This Winter Solstice, give the Xamarin holiday challenge a spin for a chance to win awesome Xamarin swag by forking or cloning the Santa Talk repo and submitting to GitHub!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/46022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/569"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=46022"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/46022\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media\/46042"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=46022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=46022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=46022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}