Part 2 of 4: Introduction to Consuming Azure Mobile Services from Android


Next steps

001

  1. The next post will cover the following:
    • Adding data to a relational database
    • Understanding the application key
    • Creating a database and a table
    • Managing the database through the portal
    • Modifying table structures (adding columns)
    • Inserting data into the table (TodoItem table)

Previous Posts

Part 1 of 4: Introduction to Consuming Azure Mobile Services from Android https://blogs.msdn.com/b/brunoterkaly/archive/2012/10/03/part-1-of-5-introduction-to-consuming-azure-mobile-services-from-android.aspx
Part 2 of 4: Introduction to Consuming Azure Mobile Services from Android https://blogs.msdn.com/b/brunoterkaly/archive/2012/10/03/part-2-of-5-introduction-to-consuming-azure-mobile-services-from-android.aspx
Part 3 of 4: Introduction to Consuming Azure Mobile Services from Android https://blogs.msdn.com/b/brunoterkaly/archive/2012/10/03/part-3-of-4-introduction-to-consuming-azure-mobile-services-from-android.aspx
Part 4 of 4: Introduction to Consuming Azure Mobile Services from Android https://blogs.msdn.com/b/brunoterkaly/archive/2012/10/03/part-4-of-4-introduction-to-consuming-azure-mobile-services-from-android.aspx
Download Android Source Code https://skydrive.live.com/embed?cid=98B7747CD2E738FB&resid=98B7747CD2E738FB%213151&authkey=AN1ukGyTBgIY76Q
No obligation free trial for Azure Mobile Services https://www.microsoft.com/click/services/Redirect2.ashx?CR_CC=200114759

You will need a trial account for Windows Azure

003_thumb1

  1. Please sign up for it here:

Note the name of our created service

002

  1. Service Name
    • BrunoToDoService
  2. URL
  3. Next Steps
    • Click on BrunoToDoService to prepare to have client applications connect to it.

Managing Our Service (brunotodoservice)

003

  1. Do the following:
    • Click on CREATE A NEW WINDOWS STORE APP
      • This will be just a way to see how data can be added
      • It isn't the only way, but it will be the way for this post
  2. A future release will provide direct support for iOS and Android

Getting the APPLICATION KEY

004

  1. You will need the application key and place it in your application.
  2. Perform the following:
    • Click on MANAGE KEYS
    • Copy the APPLICATION KEY somewhere safe
      • Your application key will be different
      • You will use it inside of Fiddler (Debugging tool) and inside your Android application.

Application Creation Wizard (will create a table in the previously created SQL Database)

005

  1. The screen presents 3 steps
    • Step 1
      • For Windows Devs (get the developer tools and SDK)
        • Since we are writing code in Java for Android, this step isn't needed
    • Step 2
      • This step creates a ToDoItem table in our previously created database
      • This is the only step we will run
    • Step 3
      • This step creates a sample project for Visual Studio and Windows 8.
        • Since we are writing code in Java for Android, this step isn't needed
  2. Do the following:
    • Click on CREATE A TODOITEM TABLE
  3. The next step
    • We should add some data to our TODOITEM table

Adding Data (the table and database already exist)

006

  1. On the left side of the screen you should see a database icon
  2. This will allow us to add some data
  3. Step 1
    • Click on the DB icon
  4. Step 2
    • Click on our recently created database and server

Preparing to add data to our TodoItem table

007

  1. You could use SQL Server Management Studio to manage the database
    • But we will use the built in tools
  2. Perform the following:

Looking at our table structure

008

  1. We are going to add a column
  2. There is just one column here now
    • That column is the ID column
    • We will add a TEXT column.
  3. Perform the following:
    • Click on DESIGN
    • Click on EDIT

Looking at our table structure

009

  1. We are going to add a column
  2. Perform the following:
    • Click on ADD COLUMN
    • Add a column called text
    • Click SAVE at the top
  3. Next we will add some data.

Two rows have been added

010

  1. There will only be two rows for now
  2. But you can add as many as you like
  3. We added:
    • Eat Lunch
    • Finish Blog Post

Next Steps

011

  1. The next post will cover these topics:
    • Interacting with Azure Mobile Services using a web proxy client
    • This can give you an in-depth knowledge of REST and HTTP
    • Downloading and configuring Fiddler
    • Using Fiddler to issue GET requests

Thanks..
I appreciate that you took the time to read this post. I look forward to your comments.