Programming, Xamarin.Forms, Xamarin.Forms.Android

Obtaining a Google Maps API Key

I recently observed an issue when debugging my Xamarin.Forms.Android solution which uses Xamarin.FormsMaps in two different development environments.

The problem was, that I received an error stating that I was missing authentication with the Google Maps API in only one development environment.

Solving the issue

This guide assumes that you have already succesfully established a connection with the Google Maps API in at least one development environment. If you havn’t already worked with Xamarin.FormsMaps before, here is a guide on how to get started, and here is a detailed list of the required permissions in your Android project.

Anywho, on to the issue at hand:

  1. First, obtain the SHA1 fingerprint from your debug key by following this guide
    1. While you’re at it, grab the SHA1 fingerprint for your release key as well by following the same process, but by select the certificate you use for release
  2. Open the Google Developers Console
  3. Select your project and navigate to “APIs & auth” => “Credentials”
  4. In here, click “Edit allowed Android applications”
  5. For each key you have (I’ve got 3 in total: 2 development enviroments, and 1 release certifcate) add a new line with the following contents:
    1. <SHA1-fingerprint>;com.your.packagename
  6. Click “Update”

By now, your “Key for Android applications” should resemble that of the screenshot below. If it does, the Google Maps API has been succesfully registered with both your development and release certficates.

Android SHA1 Fingerprints

Android SHA1 Fingerprints

// Dave

Standard
Programming

Synchronising Google Calendar with Windows Phone 8

My main concern using a Windows Phone 8, is that Google has only promised compatibility until the end of 2013 for their services. This means, that the support will gradually be phased out, and currently, synchronisation options must be set up manually which is a hassle. Keeping those reasons in mind, this post intends to walk you through how I personally solved the issue.

It would obviously be way easier simply to switch to another provider, but I personally use nearly all the services Google provide and have been doing so for a long time.

Before Getting Started

The basic requirements to get started are as follows:

Synchronising Google Calendar with Windows Phone 8

First, you are ought to switch to a different user-agent (see the next section), which enables Chrome to behave as other user agents such as smartphones. After doing so, you simply select the calendars which you wish to synchronise; that’s it! This section will walk you through the steps in detail.

Notice that it will take some time before the calendar is actually be available on your phone.

Switching User Agents

First, click on the User-Agent Switcher in the top-most right corner of Chrome and select iOS –> iPhone as seen in Figure 1.

Switiching User Agents

Figure 1 – Switching the User-Agent to iOS

Configuring Your Synchronisation Options

After having selected a User Agent, the icon will change as seen in Figure 2:

Figure 2 - Before and After changing User Agents

Figure 2 – Before and After changing User Agents

This means, that you are now browsing as if you were using your smartphone. Now, simply browse to the following site:

https://m.google.com/sync/settings/iconfig/

You will now see the website as illustrated in Figure 3:

Figure 3 - Choosing Your Device

Figure 3 – Choosing Your Device

By now, simply select “WindowsPhone” which will redirect you to the most important part, namely synchronising your calendars (see Figure 4):

Figure 4 - Choosing Your Calendars

Figure 4 – Choosing Your Calendars

After having selected the calendars which you wish to synchronise to your Windows Phone device, simply click “Save” on the bottom of the screen. There you go! You are now synchronising your Google Calendars with your Smartphone.

As stated in the very start of the post, notice that it will take some time before the calendar is actually be available on your phone.

Enjoy!

// David

Standard