microsoft xamarin heros c# iOS Android UWP

Xamarin Forms Dependency Injection

Calling native platform code in your portable class library (PCL) is achievable via Dependency Injection. It’s a common question for people starting out, who are using a PCL or .NET Standard Library for developing their Xamarin apps. Dependency Injection involves creating an interface that can be commonly applied across all native platforms, then coding the…

Read More
Xamarin Application Developed to Track and Manage COVID-19 in Real-time

New Xamarin Application Developed to Track and Manage COVID-19 in Real-time

Volunteers re-engineer cancer treatment software to monitor coronavirus pandemic using Microsoft’s Xamarin mobile framework with Azure Mobile Angel has released a new mobile application built on the Xamarin platform to manage potential and at-risk coronavirus patients in real-time.  The free application monitors patients in clinics across the country through self-reported symptoms and prioritizes them in…

Read More

Xamarin build error: defining a default interface method requires –min-sdk-version >= 24

I added to my project Xam.Plugins.Android.ExoPlayer and then I received this error: java/lang/Object;I)V: defining a default interface method requires –min-sdk-version >= 24 (currently 13) for interface methods: com.google.android.exoplayer2.Player$EventListener.onTimelineChanged : (Lcom/google/android/exoplayer2/Timeline;Ljava/lang/Object;I)V Looking around, I discovered that other people had the same issue and the problem sits in the Android Options in Project Properties. No Dex compiler…

Read More

UriBuilder in Xamarin Forms

In Xamarin Forms there is a native function called UriBuilder: it allow you to create a well-formed url. In my implementation, all parameters are in a Dictionary called parameters. Using Linq, I put in builder.Query only the parameters with a value. UriBuilder builder = new UriBuilder(yourUrl); Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters.Add(“reference”, Reference);…

Read More

Binding FormattedString for Xamarin Forms

Xamarin Forms doesn’t have a Label with a Bindable FormattedString. For example, if you want a bindable bold word in the middle of a sentence in a Label, it’s very hard to design it with common control. For that, I create my own component for that. LabelRenderer.cs using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Linq;…

Read More
microsoft xamarin heros c# iOS Android UWP

Xamarin Forms Repeater View

A ListView is a kind of repeater but isn’t always what I want. It’s surprising something like this isn’t included in the framework but making your own is fairly simple. namespace PSC.Controls { /// <summary> /// Repeater view. /// </summary> public class RepeaterView : StackLayout { /// <summary> /// The item template property. /// </summary>…

Read More
microsoft xamarin heros c# iOS Android UWP

Device name in Xamarin

Using Device Information Plugin for Xamarin and Windows, you have access to same information for a device: GenerateAppId: used to generate a unique Id for your app. Id: this is the device specific Id Device Model: get the model of the device Version: get the version of the Operating System If you want the device…

Read More

An error occurs with MobileCenter for Xamarin iOS

I added Microsoft Mobile Center to my project after creating the app there. On MobileCenter documentation you can know the Install Identifier for your application (MobileCenter documentation is here). System.Guid installId = MobileCenter.InstallId; This function is working fine if you have Android or iOS 10. With iOS less than 10 an error occurs: Guid should…

Read More