In my previous post I thought that I would not make the app because I did not had a nice geocoding service. I did find Azure Maps, but there is no nice C# client at that time and I did not feel like doing manual REST calls. I know I can, I just didn’t feel like making it (sorry).

So I’ve worked in the past with the Geocoding.Net Nuget packages and decided to go for the Bing version. Googles version requires an account with billing because the first 200 dollar is free. It does feel like a hurdle for me as I do not work that much with Google Services.

So I did create an Azure Function which reads the kmz and extracts it to kml and for each unknown placemark would do a geo-location and store it in a file, so that only new bears would require a call to the Geocoding service of Bing.

The app is up now in the play store. Not in Apples App store, because I did not buy a license for it.

https://play.google.com/store/apps/details?id=com.companyname.bosscheberenbingo

I forgot to rename the package.

Here is a small snippet for the Geocoding:

var geocoder = new Geocoding.Microsoft.BingMapsGeocoder(“key”);

var geoCodeResponse = await geocoder.GeocodeAsync(“address here”);

var location = geoCodeResponse.First().Coordinates;


Good luck and happy bear hunting!

Pin on pinterest Plus on Googleplus Post on LinkedIn

To keep kids entertained, people from all over the world put a teddy bear in their window so that kids can spot them during a walk.

I don’t know the origin. It’s in Canada, USA, New Zealand, UK etc. It’s also in my hometown so I decided to make an app for it.

People made a Facebook group with a google form to submit the teddy bear and an URL with all bears on google maps.

I thought that I had to get access to the Google spreadsheet containing the data, but it seems that it would not hold that much info if we take a look at the entry form and the maps data. In Google maps you can download a KMZ file which is a zipped KML (Keyhole Markup Language) It’s XML. Here is the full KML:

full-kml

So there is a web link in it to get the live data. I used the webclient to pull it in and read it and tried to make pins out of it.

My first step was to add the Xamarin.Forms.Map Nuget package and the SharpKml.Core

Here is the full code:


private void AddMap()
{
	var map = new Map(MapSpan.FromCenterAndRadius(new Position(51.697815, 5.303675), Distance.FromMeters(10000)));

	using (var client = new WebClient())
	{
		var kmz = KmzFile.Open(client.OpenRead("https://www.google.com/maps/d/u/0/kml?mid=1kedGv2twtsWmzgxRpZcu5hr-qpE77plL"));
		Kml kml = kmz.GetDefaultKmlFile().Root as Kml;

		if (kml != null)
		{
			foreach (Placemark placemark in kml.Flatten().OfType())
			{
				Console.WriteLine(placemark.Name);

				var pin = new Pin()
				{
					Address = placemark.Address,
					Label = placemark.Name,
					Type = PinType.Place
				};
				map.Pins.Add(pin);
			}
		}
	}

	this.Content = map;
}

But the pins won’t show up (of course). Because I did not set the position. The real Kml contains data like this:

kml-detail

So as you can see there is no Latitude Longitude for the placemarks… So how does google maps work then? It seems that both Google Maps and Google Earth Geocode the address to get the lat lng. But that service unfortunately is not free. I tried to load the kml in Google Earth and export it, but that also does not add the latitude and longitude. I also thought that kml support for the map control could be used. So that I could just provide the kml to the map and have it sort it out, but that was build with monoandroid 9 instead of netstandard2.0 and would probably not fix the geocode issue.

I planned to make an app with no central backend. But because of geocoding, I would have to use a webapi or Azure Function to keep track of the “database” with all teddy bears and their corresponding lat lng. That would also lower the requests for geocoding if it would be moved from the phone (client) to the server.

But I’ve not found a good free geocoder

nominatim.openstreetmap.org does not work if I would provide the kml data. I think that I will come back to this one….


Good luck making your own KML/KMZ reading app!

Pin on pinterest Plus on Googleplus Post on LinkedIn
0 Comments

My previous blog post was about my history with mobile phones. How I have switched from Windows Mobile to Android to Windows Phone and back to Android. I have had a temporary car in the beginning of this month. It was a highline Volkswagen Polo which contained the native Volkswagen RS multimedia system. Android Auto worked perfect. Of course I had to download the .apk myself on the phone. But there are plenty of guides explaining that. I was really excited that my new car (Volkswagen Golf) photowould contain a Pioneer system. It was the Pioneer AVIC-EVO1-G72-BBF which has Apple Carplay and Android Auto. I connected my phone with a cable and…. nothing. So I called the Volkswagen dealer and they had to look into it. I got a call back that I would not have that option which seemed weird to me because it was the top most feature on the Pioneer website. After a few days my wife connected her iPhone to charge it and it launched Apple Carplay. I was blown away and took a look at the manuals that I found in the dashboard glovebox. In the installation manual it mentioned on page 8 that you had to connect a USB to a specific port on the back of the Pioneer. So that would explain that Carplay works and Android Auto did not. So I mailed and called the dealer again and they told me to bring the car in.

integration-manual

It took them over three hours to switch the cable on the back and test it. They could not get it to work. They even called Pioneer support and got an answer that it was not supported and would not work. They retrieved a brand new Pioneer system from the warehouse and it was largely displayed on the outside of the box that it would have Android Auto support. So a lot of effort and still no Android Auto. But at least the radio was connected to USB 2. I searched a while online and found this link. I thought it would not affect me because I do not have a Pixel. But I do have USB-C (Nokia 8) and when they delivered the car, there was an USB extension cable in the glovebox so I decided to give it a try. And it finally worked. So buying a short USB-C did not help me, because due to an issue on Pioneers end, I will always need an extension cable Confused smile

Next step: try to update firmware of the adapter and the system itself. Currently I just keep getting incompatible USB stick. Even when it’s formatted as FAT32 filesystem and only has the firmware file on it in the root directory.



Pin on pinterest Plus on Googleplus Post on LinkedIn
0 Comments

I’d decided to make a good list of my previous owned mobile phones. I have blogged about it before. And made a list of it back in 2013, so it’s time for an update:

  1. Nokia 5110
    https://upload.wikimedia.org/wikipedia/commons/5/58/Nokia_5110.jpg
  2. Nokia 3210
    Nokia 3210.jpg
  3. Nokia 5210
    https://cf4.s3.souqcdn.com/item/2013/04/28/64/51/46/item_XL_645146_1899588.jpg
  4. Alcatel 511
  5. Motorola T720
    https://www.technopat.net/db/wp-content/uploads/2016/10/Motorola-T720-600x600.png
  6. Sony Ericsson W800
    https://i-cdn.phonearena.com/images/phones/4611-large/Sony-Ericsson-W800-0.jpg
  7. HTC S710 (first Windows Mobile phone for me)
    https://image.coolblue.nl/600x315/products/48538
  8. LG Cookie (worst phone ever!)
  9. HTC Touch Diamond 2 (2nd Windows Mobile)
  10. HTC Desire (Android 2.x never got to 4.x)
    /posts/files/image1.jpg
  11. HTC Desire C (Android 4.x never got to 4.1 etc.)
  12. Nokia Lumia 920 (Windows Mobile 7, 7.5 and even Phone 8)
  13. Nokia Lumia 930 (Windows Phone 8)
  14. Microsoft Lumia 950 (Windows 10 Mobile)
  15. Nokia 8 (Android 7 or 8, now running 9)
    http://cdn.eglobalcentral.nl/images/detailed/59/nokia-8-dual-sim-4gb-ram-64gb-blue.jpg

There are rumors about the Nokia 9 which seems awesome, but I've also heard good stories about the Xaomi Mix serie. I will stick to my Nokia 8 for a bit longer.

Pin on pinterest Plus on Googleplus Post on LinkedIn

It’s inevitable, but I have to upgrade from my Lumia 950 running 10.0.15254.527

It drains my battery so it does not last for a day anymore. I believe it is because the Twitter app is deprecated and they moved from a UWP to a PWA type. Since that moment my battery drained faster. I even ordered a new battery. That’s how dedicated I am to UWP apps and the win10 ecosystem.

I thought that I did not care that I missed some apps. But just yesterday I broadcasted my session of Super Lucky Tale’s on Xbox with Mixer and I needed a Mixer app on my mobile which redirected me to the Google/Android store!

During my holiday there was an issue with Azure. So I needed to borrow the iPhone from my wife to use the Azure app… I am on a Microsoft phone and cannot have an Azure app. That is just brutal!

So I have 2 options: the Apple eco-system or the Google eco-system. Option 1 is not an option for me. Because I don’t like the phone’s price. For instance there was an issue in the Netherlands with the new ID cards. You would receive a letter from the government that you need to scan your ID card with an app. This was only possible with Android because of the NFC chip and because of the iOs SDK limitation it was only possible on Android.

Microsoft also launched it’s own Android Launcher. So I am moving to Android. There are then two options (imho) a Samsung or a Nokia. I have been a Nokia fan for ages. (5110, 3210 etc. Lumia 920, 930, “950”)  Samsung has been in the news a lot about staying behind on the updates and not having a vanilla Android. So I will move to Nokia.

Next step: decide what Nokia. Wait for a 6.1 release in Europe? Or go for a 7 or 8 or even the Sirocco? Because of the price, I think that I would go for the 8. I am out the Android eco-system for several years, so I have not a lot of hands on experience with perf and the effect certain hardware can have on the UX.

I had to lookup how long it was ago. My first Android app release in the Google store was in 2010 (8 years ago!) The last person who bought it was in 2014. I took it offline not much after.

I am slowly getting a bit exited about moving to the Nokia+Android eco-system. Would prefer a Surface phone though, but you can’t wait forever! I blogged in 2013 about moving to Windows Phone 8.x and Android custom roms in 2011 http://jphellemons.nl/category/android reading back the app list makes me want to move even faster. An official Sonos app would be great! Miss it on a daily basis. And Android will give me the option to switch my bank to Bunq!

Thanks for reading my 2¢!

Pin on pinterest Plus on Googleplus Post on LinkedIn