Skip to content

An Intelligent Serverless Xamarin App Challenge

License

Notifications You must be signed in to change notification settings

icebeam7/santa-talk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Santa Talk Challenge

Extend the intelligent, serverless Santa Talk Xamarin application and get some cool swag! See this article for more details!

The Challenge

The Santa Talk app in this repo allows you to send a note to Santa, and then find out whether he'll deliver a gift to your house.

It's built using Xamarin.Forms, Microsoft Cognitive Services Text Analytics, and Azure Functions. Read this article, and this blog post, to see how everything fits together.

Your challenge is to extend the app in some way.

Some quick things that come to mind are:

  • Add in the ability to take a photo, and use Cognitive Services Computer Vision to have Santa figure out if you've been naughty or nice.
  • Save the responses from Santa on device and display them with a CarouselView.
  • Redesign the user interface using Shell.
  • Track the user's location when they make a request, and make annotations on a map where the naughty and nice developers live.
  • Connect to Azure Logic Apps to send a Tweet whenever Santa gets a "letter".

Get creative! There are no right or wrong answers!

When you've thought of something, clone or fork this repo, make your changes, and then put in a pull request.

Along with that, let us know the features you added/replaced/made better. What you thought of the Azure services and Xamarin products you used. And what went well and what didn't.

Get Up and Running

To get you up and running as quickly as possible, here is a way to get Text Analytics and Functions to work without any cost to you!

Creating the Text Analytics Service

  1. If you don't already have one, sign up for a free Azure subscription here.
  2. Once done, open up the Azure portal: https://portal.azure.com - and sign in.
  3. Then open up the Azure Cloud Shell. You can do that by clicking on the button that looks like the command prompt. Azure portal cloud shell screen shot
  4. Once the Cloud Shell opens, you'll want to do two things. Create a Resource Group and then the Text Analytics service. So go ahead and think of names for both right now ... you'll need them for the next step.
  5. Enter the following command in the Cloud Shell
az group create -l westus2 -g YOUR-RESOURCE-GROUP-NAME-GOES-HERE
  1. Once the Resource Group is created, then you can create the Text Analytics service. Enter the following command in the Cloud Shell.
az cognitiveservices account create \
--kind TextAnalytics \
--location westus2 \
--sku F0 \
--resource-group YOUR-RESOURCE-GROUP-NAME-GOES-HERE \
--name YOUR-SERVICE-NAME-GOES-HERE

That's it! What's neat is that the --sku F0 indicates the free tier of Text Analytics.

Then you'll be able to browse the Text Analytics service you just created. Make note of the Endpoint url and the Key name.

Text analytics endpoint url and key screenshot

Running Azure Functions Locally

You'll also want to get the Azure Functions runtime locally. So you can run everything from your machine without having to deploy it to Azure. (Although if you want to deploy to Azure - by all means do so!)

Follow the documentation to get everything installed for the 2.x version of Functions.

What I like to do is run my Xamarin app from Visual Studio, then run my Functions app from VS Code.

So in VS Code, open up the Functions folder, and then if VS Code prompts you, allow it to optimize the project to run for VS Code.

You'll also need to do one last thing. And that's create a local.settings.json file for the Functions project.

At the same level as the *csproj file for the Functions project add a file named local.settings.json and add to it the following contents.

{
    "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "APIKey": "YOUR KEY WILL GO HERE",
    "APIEndpoint": "https://westus2.api.cognitive.microsoft.com/"
  }
}

Make sure you replace the APIKey and APIEndpoint with the values you found from your Text Analytics service in the Azure portal.

And if you're really digging the Serverless Lifestyle - here are several FREE courses on creating serverless apps with Azure Functions!

Make Some Changes!

That should be it! You should now be ready to go and make some changes to the app... we can't wait to see what you come up with!

About

An Intelligent Serverless Xamarin App Challenge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%