<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Developer Tutorials on Junian Dev</title>
    <link>https://www.junian.dev/dev/</link>
    <description>Recent content in Developer Tutorials on Junian Dev</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>author@junian.dev (Junian Triajianto)</managingEditor>
    <webMaster>author@junian.dev (Junian Triajianto)</webMaster>
    <copyright>Copyright &amp;copy; 2014 - 2026 Junian.dev</copyright>
    
	    <atom:link href="https://www.junian.dev/dev/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>I Challenge Myself to Complete freeCodeCamp Responsive Web Design V9 Certification</title>
      <link>https://www.junian.dev/dev/freecodecamp-responsive-web-design-v9/</link>
      <pubDate>Sat, 28 Feb 2026 04:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/freecodecamp-responsive-web-design-v9/</guid>
      <description>&lt;p&gt;In this age of AI, I use LLMs to do my development work for like 80% of the time.
I reduce the time writing code manually as much as possible for more efficient work.&lt;/p&gt;
&lt;p&gt;But sometimes I just miss writing code by hand.
No code completion, no AI suggestions, no interruptions.
Just typing whatever is in my brain.&lt;/p&gt;
&lt;p&gt;I recently noticed that freeCodeCamp updated their curriculum. It now has more workshops, labs, and even quizzes than the previous curriculum.
I see this as a good challenge.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install TradeNote on Windows</title>
      <link>https://www.junian.dev/dev/install-tradenote-on-windows/</link>
      <pubDate>Wed, 25 Feb 2026 04:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/install-tradenote-on-windows/</guid>
      <description>&lt;p&gt;Recently, I installed TradeNote on Windows for a client.&lt;/p&gt;
&lt;p&gt;TradeNote is an open-source trading journal that helps traders store, analyze, and review all their trades so they can become more consistent and profitable.&lt;/p&gt;
&lt;p&gt;Installation on Linux or other Unix-based operating systems is pretty straightforward.
However, on Windows, there are a few additional steps—especially if you&amp;rsquo;re not familiar with Unix-based environments.&lt;/p&gt;
&lt;p&gt;Here’s how I install TradeNote on Windows.&lt;/p&gt;
&lt;h2 id=&#34;requirements&#34;&gt;Requirements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Windows 10 version 2004 or higher (Build 19041+) or Windows 11&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://learn.microsoft.com/en-us/windows/wsl/install&#34; title=&#34;How to Install WSL2&#34;&gt;WSL 2 installed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.docker.com/&#34; title=&#34;Download Docker Desktop&#34;&gt;Docker Desktop installed&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Make sure Docker Desktop is configured to use WSL 2 as its backend.
It is enabled by default, but better make sure of it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install .NET 11 SDK Preview on macOS Side-by-Side with Homebrew</title>
      <link>https://www.junian.dev/dev/install-dotnet-sdk-11-macos/</link>
      <pubDate>Mon, 23 Feb 2026 04:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/install-dotnet-sdk-11-macos/</guid>
      <description>&lt;p&gt;Microsoft recently released &lt;a href=&#34;https://devblogs.microsoft.com/dotnet/dotnet-11-preview-1/&#34;&gt;.NET 11 Preview 1&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to try it without removing your existing installed .NET SDKs on macOS, you can install it side-by-side using the Homebrew package manager.&lt;/p&gt;
&lt;p&gt;First, tap the Homebrew repository I maintain:&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;brew tap junian/homebrew-dotnet&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;Then install the .NET 11 SDK Preview:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Xcode Command Line Tools Download and Installation FAQ</title>
      <link>https://www.junian.dev/dev/xcode-command-line-tools-installation-faq/</link>
      <pubDate>Thu, 19 Feb 2026 04:25:35 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/xcode-command-line-tools-installation-faq/</guid>
      <description>&lt;p&gt;Xcode is a full-featured IDE from Apple for creating apps for iPhone, iPad, Mac, Apple Watch, and Apple TV.&lt;/p&gt;
&lt;p&gt;You probably need some of its tools without installing the entire package.
Maybe you want to write command-line software on macOS, or maybe you need to use the &lt;a href=&#34;https://brew.sh&#34;&gt;Homebrew&lt;/a&gt; package manager.&lt;/p&gt;
&lt;p&gt;In that case, you only need a subset of it, which is the Xcode Command Line Tools.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Not in the mood for reading? Watch the &lt;a href=&#34;https://www.junian.dev/dev/xcode-command-line-tools-installation-faq/#video&#34;&gt;video&lt;/a&gt; instead.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Install Visual Studio Community 2017 and Fix the Startup Error</title>
      <link>https://www.junian.dev/dev/install-visual-studio-2017/</link>
      <pubDate>Thu, 12 Feb 2026 19:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/install-visual-studio-2017/</guid>
      <description>&lt;p&gt;Ah Yes.
Visual Studio 2017.
What a good memory.
That was a good year before COVID-19 happened.&lt;/p&gt;
&lt;p&gt;I still install it sometimes, especially when dealing with older projects that don’t behave nicely in newer Visual Studio versions.
Legacy apps are real, and sometimes the safest move is just using the original toolchain.&lt;/p&gt;
&lt;p&gt;Here’s how I install &lt;strong&gt;Visual Studio 2017 Community Edition&lt;/strong&gt; plus how I fix that annoying &lt;code&gt;System.InvalidOperationException&lt;/code&gt; startup error that sometimes appears right after installation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fixing .NET SDK Resolver Failure</title>
      <link>https://www.junian.dev/dev/dotnet-sdk-resolver-failure/</link>
      <pubDate>Wed, 11 Feb 2026 15:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/dotnet-sdk-resolver-failure/</guid>
      <description>&lt;p&gt;Recently, with .NET 10.0.103 installed on my macOS (it also happened on Windows and probably Linux too), I tried to run a C# script and ran into this issue.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ dotnet run Program.cs
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;SDK Resolver Failure: &lt;span class=&#34;s2&#34;&gt;&amp;#34;The SDK resolver &amp;#34;&lt;/span&gt;Microsoft.DotNet.MSBuildWorkloadSdkResolver&lt;span class=&#34;s2&#34;&gt;&amp;#34; failed while attempting to resolve the SDK &amp;#34;&lt;/span&gt;Microsoft.NET.SDK.WorkloadAutoImportPropsLocator&lt;span class=&#34;s2&#34;&gt;&amp;#34;. Exception: &amp;#34;&lt;/span&gt;System.IO.FileNotFoundException: Workload manifest microsoft.net.workload.emscripten.current: 10.0.102/10.0.100 from workload version 10.0.102 was not installed. Running &lt;span class=&#34;s2&#34;&gt;&amp;#34;dotnet workload repair&amp;#34;&lt;/span&gt; may resolve this.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.GetManifests&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.LoadManifestsFromProvider&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;IWorkloadManifestProvider manifestProvider&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.InitializeManifests&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.GetInstalledWorkloadPacksOfKind&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;WorkloadPackKind kind&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;+MoveNext&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;String sdkReferenceName, IWorkloadManifestProvider manifestProvider, IWorkloadResolver workloadResolver&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir, String globalJsonPath&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.WorkloadSdkResolver.Resolve&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.TryResolveSdkUsingSpecifiedResolvers&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;IReadOnlyList&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; resolvers, Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio, SdkResult&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt; sdkResult, IEnumerable&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;1&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt; errors, IEnumerable&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;1&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt; warnings&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;  /usr/local/share/dotnet/sdk/10.0.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.props
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;The build failed. Fix the build errors and run again.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;figure&gt;
    &lt;img src=&#34;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEituw3V9wTzNiPDrQpLyEps1bE8chHDGeTxEBFMYbZd12pUFotLW3_SkXPmKHGNasx8VyAHn55dOmlTFCz9teMcEqnAlT1MNQUYuRziy39uZ0cNE2v8jv0dOHQVPYEDgHQPk_r410okxXsg5ISHWZ79MkOCsK8Z4wGrjfenJSHZxFj5npoAGxRDQAVrPvo/s1600/dotnet-sdk-resolver-failure.jpg&#34; alt=&#34;.NET SDK Resolver Failure&#34;loading=&#34;lazy&#34;
    &gt;&lt;figcaption&gt;.NET SDK Resolver Failure&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;As suggested by the error message, I tried &lt;code&gt;dotnet workload repair&lt;/code&gt; hoping it would fix the issue, but another error message appeared:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Visual Studio 2019 Community Edition (Step by Step)</title>
      <link>https://www.junian.dev/dev/install-visual-studio-2019/</link>
      <pubDate>Sun, 08 Feb 2026 19:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/install-visual-studio-2019/</guid>
      <description>&lt;p&gt;Visual Studio 2019 might not be the newest kid on the block anymore, but it’s still very useful—especially if you’re working on legacy projects or older .NET Framework applications.&lt;/p&gt;
&lt;p&gt;I still install it from time to time, usually when dealing with an older codebase or opening an open-source repository that works best with VS 2019.
So here’s a quick, no-nonsense walkthrough of how I install &lt;strong&gt;Visual Studio 2019 Community Edition&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Create an Empty Orphan Git Branch</title>
      <link>https://www.junian.dev/dev/git-create-orphan-branch/</link>
      <pubDate>Fri, 06 Feb 2026 19:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/git-create-orphan-branch/</guid>
      <description>&lt;p&gt;Have you ever wanted to create a new, separate Git branch that doesn’t have any starting point from an existing branch?&lt;/p&gt;
&lt;p&gt;One common use case is from the early days of GitHub, when you needed to create a separate empty branch called &lt;code&gt;gh-pages&lt;/code&gt;. This branch was orphaned, meaning it had no relationship to the &lt;code&gt;master&lt;/code&gt; or &lt;code&gt;main&lt;/code&gt; branch, and was used to publish documentation sites to GitHub Pages.&lt;/p&gt;
&lt;p&gt;This approach makes sense because you don’t want to upload your application source code from the &lt;code&gt;main&lt;/code&gt; branch to GitHub Pages—only the static assets such as HTML, CSS, JavaScript, and other resources required for a static site.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Visual Studio Older Downloads (ISO &#43; Installer): 2022, 2019, 2017, 2015, 2013</title>
      <link>https://www.junian.dev/dev/visual-studio-downloads/</link>
      <pubDate>Tue, 03 Feb 2026 19:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/visual-studio-downloads/</guid>
      <description>&lt;p&gt;Some people have asked me to list all official Microsoft Visual Studio download links from 2013 through 2026 for the Community, Professional, and Enterprise editions.&lt;/p&gt;
&lt;p&gt;As you may know, Microsoft often hides older Visual Studio download links whenever a new version is released.&lt;/p&gt;
&lt;p&gt;So, instead of letting my fellow developers go down the Microsoft website rabbit hole, I decided to collect and index the download links here.&lt;/p&gt;
&lt;!-- omit in toc --&gt;
&lt;h2 id=&#34;is-it-safe-and-genuine&#34;&gt;Is It Safe and Genuine?&lt;/h2&gt;
&lt;p&gt;Good question. Never trust anything on the internet, including my website.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Set the Default Hugo Archetypes to the Next Day</title>
      <link>https://www.junian.dev/dev/hugo-archetypes-default-date-next-day/</link>
      <pubDate>Mon, 02 Feb 2026 19:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/hugo-archetypes-default-date-next-day/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re using the Hugo static site generator, the default date and time assigned to new content is the current date and time.
That’s perfectly normal, but what if you want to set the date to a different day, such as tomorrow or any other future date?&lt;/p&gt;
&lt;p&gt;I often need this because I usually write drafts today and publish them the next day.&lt;/p&gt;
&lt;p&gt;By default, the &lt;code&gt;date&lt;/code&gt; and &lt;code&gt;publishDate&lt;/code&gt; fields are typically defined in the &lt;code&gt;archetypes/default.md&lt;/code&gt; file like this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Deploy a Blazor WebAssembly Standalone App to GitHub Pages</title>
      <link>https://www.junian.dev/dev/deploy-blazor-webassembly-standalone-to-github-pages/</link>
      <pubDate>Fri, 30 Jan 2026 19:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/deploy-blazor-webassembly-standalone-to-github-pages/</guid>
      <description>&lt;p&gt;If you have ever built a .NET Blazor WebAssembly app, you may have separated the frontend and backend.
Since Blazor WASM is essentially just the frontend, you can deploy it to most static site hosting services, including GitHub Pages.&lt;/p&gt;
&lt;p&gt;Let’s get straight to the point. Follow these steps to create, publish, and deploy your standalone Blazor WebAssembly app.&lt;/p&gt;
&lt;p&gt;Install the latest &lt;a href=&#34;https://dotnet.microsoft.com/en-us/download&#34;&gt;.NET SDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Create a new Blazor WebAssembly standalone app project. Let’s name it &lt;code&gt;BlazorApp&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deploy a .NET 10 Blazor WebAssembly App to Cloudflare Pages</title>
      <link>https://www.junian.dev/dev/deploy-blazor-to-cloudflare-pages/</link>
      <pubDate>Wed, 28 Jan 2026 07:06:56 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/deploy-blazor-to-cloudflare-pages/</guid>
      <description>&lt;p&gt;Blazor is a modern way to build web applications.
Instead of relying on JavaScript, it allows you to use C#.
That’s the dream!
In this guide, you’ll learn how to create a web application using Blazor and deploy it online using Cloudflare Pages.&lt;/p&gt;
&lt;p&gt;Enough introduction. Let’s get started!&lt;/p&gt;
&lt;h2 id=&#34;install-net-10&#34;&gt;Install .NET 10&lt;/h2&gt;
&lt;p&gt;Blazor works with C#.
To start a Blazor project, you need to install the .NET SDK.
Simply &lt;a href=&#34;https://dotnet.microsoft.com/download&#34;&gt;download it&lt;/a&gt; and follow the installation instructions from the &lt;a href=&#34;https://dotnet.microsoft.com/download&#34;&gt;official website&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Visual Studio Code (VS Code) and Its Forks with Free AI Assistants</title>
      <link>https://www.junian.dev/dev/vscode-forks/</link>
      <pubDate>Tue, 27 Jan 2026 19:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/vscode-forks/</guid>
      <description>&lt;p&gt;Let me get this straight.
This is not a review post or anything like that.&lt;/p&gt;
&lt;p&gt;I’m simply sharing a list of Visual Studio Code forks that include AI features, along with the companies behind them.
This might be useful to some people.&lt;/p&gt;
&lt;p&gt;There’s no doubt that Microsoft knows how to build great IDEs.
I’ve been a long-time fan of Visual Studio (the full version, not the Code version), and VS Code comes in as my second favorite IDE.
Even though VS Code is open source, there weren’t many serious forks competing with it in the past.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Multiple .NET Versions on macOS with Homebrew</title>
      <link>https://www.junian.dev/dev/install-multiple-dotnet-macos-homebrew/</link>
      <pubDate>Wed, 03 Dec 2025 09:25:59 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/install-multiple-dotnet-macos-homebrew/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re a .NET developer using macOS, you may want to install multiple .NET SDK versions side by side.
While you can do this manually, it can become a headache to maintain in the long term. As you install more SDKs, leftover files can accumulate and fill up your storage.&lt;/p&gt;
&lt;p&gt;Uninstalling older versions manually can also be tedious. You can refer to the &lt;a href=&#34;https://learn.microsoft.com/en-us/dotnet/core/install/remove-runtime-sdk-versions?pivots=os-macos&#34;&gt;official documentation&lt;/a&gt; for removal instructions. I even wrote &lt;a href=&#34;https://www.junian.dev/dev/dotnet-sdk-runtime-macos-removal/&#34;&gt;an uninstallation guide&lt;/a&gt; to remind myself how to do it properly.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Microsoft SQL Server Developer Downloads - 2025, 2022, 2019, 2017</title>
      <link>https://www.junian.dev/dev/microsoft-sql-server-developer-edition-download-links/</link>
      <pubDate>Sat, 22 Nov 2025 07:45:43 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/microsoft-sql-server-developer-edition-download-links/</guid>
      <description>&lt;p&gt;You might need to install an older version of SQL Server during development for various reasons.
Fortunately, Microsoft still provides installers for previous versions of SQL Server.&lt;/p&gt;
&lt;p&gt;You can use the Developer Edition for development without worrying about licensing costs.
SQL Server Developer is a full-featured, free edition licensed for use as a development and test database in non-production environments.&lt;/p&gt;
&lt;p&gt;Be sure to use it only for development and not for production.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Microsoft SQL Server Express Downloads - 2025, 2022, 2019, 2017</title>
      <link>https://www.junian.dev/dev/microsoft-sql-server-express-download-links/</link>
      <pubDate>Fri, 21 Nov 2025 17:30:27 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/microsoft-sql-server-express-download-links/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;ve ever done software development for small businesses, you&amp;rsquo;re probably familiar with Microsoft SQL Server Express. SQL Server Express is a free edition of SQL Server, ideal for development and production use in desktop, web, and small server applications.&lt;/p&gt;
&lt;p&gt;If your software requires a specific version of SQL Server Express, don’t worry. Below are the official download links for all available SQL Server Express versions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Looking for SQL Server Developer edition?&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Visual Studio Professional Downloads - 2026, 2022, 2019, 2017, 2015</title>
      <link>https://www.junian.dev/dev/visual-studio-professional-download-links/</link>
      <pubDate>Fri, 21 Nov 2025 10:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/visual-studio-professional-download-links/</guid>
      <description>&lt;p&gt;When working with older .NET Framework projects, you may encounter issues when using the latest version of Visual Studio.&lt;/p&gt;
&lt;p&gt;Fortunately, this can be easily resolved by installing an older version of Visual Studio.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re a small business or part of a team, you likely already have a Visual Studio Professional license.
That may lead you to wonder: where can you download older versions of Visual Studio Professional?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If you&amp;rsquo;re a solo developer, open-source contributor, or hobbyist, you can use the &lt;a href=&#34;https://www.junian.dev/dev/visual-studio-community-download-links/&#34;&gt;Visual Studio Community edition&lt;/a&gt; for free.&lt;/em&gt;
&lt;em&gt;If you&amp;rsquo;re working in an enterprise environment, you’ll need the &lt;a href=&#34;https://www.junian.dev/dev/visual-studio-enterprise-download-links/&#34;&gt;Visual Studio Enterprise edition&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Visual Studio Enterprise Downloads - 2026, 2022, 2019, 2017, 2015</title>
      <link>https://www.junian.dev/dev/visual-studio-enterprise-download-links/</link>
      <pubDate>Fri, 21 Nov 2025 09:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/visual-studio-enterprise-download-links/</guid>
      <description>&lt;p&gt;It’s sometimes frustrating to open old or legacy .NET Framework projects with the latest version of Visual Studio.&lt;/p&gt;
&lt;p&gt;Fortunately, this can be easily solved by installing an older version of Visual Studio.&lt;/p&gt;
&lt;p&gt;Due to company policy or other requirements, you may need the Visual Studio Enterprise edition.
That often leads to the question: where can you download older versions of Visual Studio Enterprise?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If you&amp;rsquo;re a small business, you may want to get the &lt;a href=&#34;https://www.junian.dev/dev/visual-studio-professional-download-links/&#34;&gt;Visual Studio Professional edition&lt;/a&gt;.&lt;/em&gt;
&lt;em&gt;If you&amp;rsquo;re a solo developer, open-source contributor, or hobbyist, you can use the &lt;a href=&#34;https://www.junian.dev/dev/visual-studio-community-download-links/&#34;&gt;Visual Studio Community edition&lt;/a&gt; for free.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Visual Studio Community Downloads - 2026, 2022, 2019, 2017, 2015, 2013</title>
      <link>https://www.junian.dev/dev/visual-studio-community-download-links/</link>
      <pubDate>Wed, 12 Nov 2025 04:37:55 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/visual-studio-community-download-links/</guid>
      <description>&lt;p&gt;It’s sometimes frustrating to open old or legacy .NET Framework projects with the latest version of Visual Studio.&lt;/p&gt;
&lt;p&gt;Fortunately, this can be easily solved by installing an older version of Visual Studio.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If you&amp;rsquo;re a small business, you may want to get the &lt;a href=&#34;https://www.junian.dev/dev/visual-studio-professional-download-links/&#34;&gt;Visual Studio Professional edition&lt;/a&gt;.&lt;/em&gt;
&lt;em&gt;If you&amp;rsquo;re working in an enterprise environment, you’ll need the &lt;a href=&#34;https://www.junian.dev/dev/visual-studio-enterprise-download-links/&#34;&gt;Visual Studio Enterprise edition&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;While older Professional or Enterprise versions of Visual Studio are usually available on Microsoft’s website, the Community edition is not as easy to find.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SQL Server Management Studio - All Versions Download</title>
      <link>https://www.junian.dev/dev/sql-server-management-studio-all-versions-download/</link>
      <pubDate>Wed, 12 Nov 2025 01:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/sql-server-management-studio-all-versions-download/</guid>
      <description>&lt;p&gt;If you’re a software engineer or database administrator working with Microsoft SQL Server, you’re probably familiar with &lt;strong&gt;SQL Server Management Studio&lt;/strong&gt;, commonly known as &lt;strong&gt;SSMS&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In this post, I’ve compiled a list of all available SSMS versions that you can download directly from Microsoft’s servers.
You may need a specific version for compatibility or testing purposes, and that’s perfectly reasonable.&lt;/p&gt;
&lt;h2 id=&#34;manual-installation&#34;&gt;Manual Installation&lt;/h2&gt;
&lt;p&gt;Download and install the version you need using the links below.
All downloads are hosted by Microsoft, using domains such as &lt;code&gt;aka.ms&lt;/code&gt; and &lt;code&gt;go.microsoft.com&lt;/code&gt;, which are managed by Microsoft.
I don’t host these files myself or use third-party servers, so the downloads are safe.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Microsoft SQL Server on Apple Silicon ARM64 Mac</title>
      <link>https://www.junian.dev/dev/microsoft-sql-server-apple-silicon-mac/</link>
      <pubDate>Tue, 04 Nov 2025 19:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/microsoft-sql-server-apple-silicon-mac/</guid>
      <description>&lt;p&gt;Have you ever wanted to develop a web app on your Apple Silicon Mac (M1, M2, and so on &amp;hellip;) that uses Microsoft SQL Server as its database engine?
I often do that when working on ASP.NET apps, since they’re commonly paired with SQL Server.
Most of the time, I can just use a remote SQL Server instance for development.
But sometimes I need to run one locally.&lt;/p&gt;
&lt;p&gt;Unfortunately, Microsoft SQL Server doesn’t officially support &lt;strong&gt;ARM64 macOS&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My Experience Fixing Flutter Android Google Play 16 KB Page Size Violation</title>
      <link>https://www.junian.dev/dev/flutter-android-16kb-page-size/</link>
      <pubDate>Sun, 05 Oct 2025 17:38:08 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/flutter-android-16kb-page-size/</guid>
      <description>&lt;p&gt;Previously, I was doing some &lt;a href=&#34;https://www.junian.dev/dev/flutter-android-sdk-35-upgrade/&#34;&gt;Google Play homework&lt;/a&gt; to update my app&amp;rsquo;s target SDK to at least Android SDK 35.&lt;/p&gt;
&lt;p&gt;I thought I was done, but then Google sent me another violation email stating that my app now requires a 16 KB page size.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src=&#34;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ1tqudCxfhh4lwD73HvhvqxK6QBFQ7JiXgKum5iPpK5MkePFJl0TUQARaeBlCmqETmrsiTY1SjWjmLwgVDN5kHfsJSfhmqds_N_-8KNojHNFCPJJPcCj4-RQdWBbwXtKP2Lsx17SxO-gycdirK_eZ1VaOpiI-Mp8FsNjrWm6tN5soDnwOBL26F6QMPNQ/s1600/google-play-16kb-violation.png&#34; alt=&#34;Google Play 16 KB Page Size Requirement&#34;loading=&#34;lazy&#34;
    &gt;&lt;figcaption&gt;Google Play 16 KB Page Size Requirement&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;The deadline is November 1, 2025. I have a few weeks left, so here I am doing yet another annual Google Play homework.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Troubleshooting Flutter Android App to Target SDK 35 Upgrade</title>
      <link>https://www.junian.dev/dev/flutter-android-sdk-35-upgrade/</link>
      <pubDate>Tue, 30 Sep 2025 01:31:42 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/flutter-android-sdk-35-upgrade/</guid>
      <description>&lt;p&gt;Another year, another chore: upgrading the Android app target SDK. This year, Google requires Target SDK 35.&lt;/p&gt;
&lt;p&gt;So, here’s my experience upgrading an existing Flutter Android app. There were a few issues, but every problem has a solution.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; At the time of writing this tutorial, I was using Flutter &lt;code&gt;v3.10.6&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;set-target-sdk-to-35&#34;&gt;Set Target SDK to 35&lt;/h2&gt;
&lt;p&gt;First, update the Android target SDK version manually by editing the &lt;code&gt;android/local.properties&lt;/code&gt; file:&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-diff&#34; data-lang=&#34;diff&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gd&#34;&gt;-flutter.compileSdkVersion=34
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gi&#34;&gt;+flutter.compileSdkVersion=35
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gd&#34;&gt;-flutter.targetSdkVersion=34
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gi&#34;&gt;+flutter.targetSdkVersion=35
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; flutter.minSdkVersion=21
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; flutter.ndkVersion=26.1.10909125
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;After updating, build the Android bundle:&lt;/p&gt;</description>
    </item>
    <item>
      <title>GitHub Actions Bot Username and Email Address</title>
      <link>https://www.junian.dev/dev/github-actions-bot-username-email-address/</link>
      <pubDate>Mon, 29 Sep 2025 06:09:12 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/github-actions-bot-username-email-address/</guid>
      <description>&lt;p&gt;When writing a GitHub workflow, you may want it to automatically commit changes.&lt;/p&gt;
&lt;p&gt;To distinguish between commits made by humans and those made by bots, set the committer name and email address to the GitHub Actions Bot.&lt;/p&gt;
&lt;p&gt;Here are the details:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Username: &lt;code&gt;github-actions[bot]&lt;/code&gt;&lt;br&gt;
Email: &lt;code&gt;41898282+github-actions[bot]@users.noreply.github.com&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can configure these details for &lt;code&gt;git&lt;/code&gt; with:&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config --global user.name &lt;span class=&#34;s2&#34;&gt;&amp;#34;github-actions[bot]&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config --global user.email &lt;span class=&#34;s2&#34;&gt;&amp;#34;41898282+github-actions[bot]@users.noreply.github.com&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;Here is an example workflow step that commits and pushes changes if any files have been modified:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Allow Underscore Headers in Nginx</title>
      <link>https://www.junian.dev/dev/nginx-allow-underscore-header/</link>
      <pubDate>Sun, 28 Sep 2025 02:43:24 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/nginx-allow-underscore-header/</guid>
      <description>&lt;p&gt;Have you ever noticed that some HTTP request headers are missing when using Nginx?&lt;/p&gt;
&lt;p&gt;I experienced this issue myself. Headers containing underscores (such as &lt;code&gt;_Security_Token_&lt;/code&gt; or &lt;code&gt;_Device_ID_&lt;/code&gt;) were silently dropped by Nginx. This caused problems during mobile app testing, as token authentication kept failing.&lt;/p&gt;
&lt;p&gt;It turns out that HTTP headers with underscores are uncommon and generally discouraged when possible.&lt;/p&gt;
&lt;p&gt;The problem is, sometimes you don&amp;rsquo;t have control over how the upstream server works.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Run a .NET App from a Single C# File</title>
      <link>https://www.junian.dev/dev/dotnet-run-csharp-app/</link>
      <pubDate>Sat, 27 Sep 2025 05:44:27 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/dotnet-run-csharp-app/</guid>
      <description>&lt;p&gt;With .NET 10, you can run a C# file directly, no project or solution file required!&lt;/p&gt;
&lt;p&gt;This is especially useful for automation scripts, DevOps tasks, or quick experimentation.&lt;/p&gt;
&lt;p&gt;In this tutorial, I&amp;rsquo;ll show you how it works on macOS (or any supported Unix-based system).&lt;/p&gt;
&lt;h2 id=&#34;getting-started-with-dotnet-app-runcs&#34;&gt;Getting Started with dotnet app run.cs&lt;/h2&gt;
&lt;p&gt;First, install the &lt;a href=&#34;https://dotnet.microsoft.com/en-us/download/dotnet/10.0&#34;&gt;.NET 10 SDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On macOS, you can use Homebrew:&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;brew install junian/dotnet/dotnet-sdk@10.0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;Create a new file and make it executable:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Fix Git Refusing to Merge Unrelated Histories Issue</title>
      <link>https://www.junian.dev/dev/git-refusing-to-merge-unrelated-histories/</link>
      <pubDate>Thu, 25 Sep 2025 03:00:21 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/git-refusing-to-merge-unrelated-histories/</guid>
      <description>&lt;p&gt;When I tried to merge a &lt;code&gt;git&lt;/code&gt; branch from a different repository, I got the following error:&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;% git merge development-branch
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fatal: refusing to merge unrelated histories&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;Git is refusing to merge the branch because the histories do not share a common ancestor.&lt;/p&gt;
&lt;p&gt;The error message &lt;code&gt;fatal: refusing to merge unrelated histories&lt;/code&gt; means that the two branches have completely separate histories.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A Simple Mathematical Expression Tokenizer in C&#43;&#43;</title>
      <link>https://www.junian.dev/dev/cpp-math-expression-tokenizer/</link>
      <pubDate>Tue, 16 Sep 2025 14:50:37 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/cpp-math-expression-tokenizer/</guid>
      <description>&lt;p&gt;Back in college, I was given the task of implementing a math expression tokenizer function in C++.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s similar to LLM tokenization, but also quite different.&lt;/p&gt;
&lt;p&gt;Given the following math expression as a string: &lt;code&gt;(A+B)-9*X&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The tokens are: [&lt;code&gt;(&lt;/code&gt;, &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;B&lt;/code&gt;, &lt;code&gt;)&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt;, &lt;code&gt;9&lt;/code&gt;, &lt;code&gt;*&lt;/code&gt;, &lt;code&gt;X&lt;/code&gt;]&lt;/p&gt;
&lt;p&gt;Another example with this math expression: &lt;code&gt;100+VARX+VARY-VARZ^2&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The tokens are: [&lt;code&gt;100&lt;/code&gt;, &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;VARX&lt;/code&gt;, &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;VARY&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt;, &lt;code&gt;VARZ&lt;/code&gt;, &lt;code&gt;^&lt;/code&gt;, &lt;code&gt;2&lt;/code&gt;]&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s my implementation:&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cpp&#34; data-lang=&#34;cpp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#include&lt;/span&gt; &lt;span class=&#34;cpf&#34;&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;namespace&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;std&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;isAlphabet&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;char&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;a&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;z&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;A&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;Z&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;$&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;_&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;isNumber&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;char&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;0&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;9&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;isOperator&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;char&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;+&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;-&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;/&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;^&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;isBranch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;char&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;(&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;)&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;isNull&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;char&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39;\0&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;isSpace&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;char&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;chr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;sc&#34;&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;typedef&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;struct&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;MathTokenizer&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// the expression string
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;string&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;str&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// pointer of char of expression
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;char&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// reset pointer to the first character of the expression
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;reset&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;str&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;at&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// get token from expression
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;string&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;getToken&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;string&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;// if pointer is null then end this process
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isNull&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;// if pointer is space then check next
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;// ignore spaces
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isSpace&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isNull&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isSpace&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;k&#34;&gt;break&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;// if operator or branch
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isOperator&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;isBranch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;// if variable / alphabet
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isAlphabet&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isAlphabet&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;isNumber&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;n&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;k&#34;&gt;break&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;// if number
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isNumber&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isNumber&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;n&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;k&#34;&gt;break&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;n&#34;&gt;pointer&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;result&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MathTokenizer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;main&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;MathTokenizer&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;exp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;string&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;// input expression
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;getline&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cin&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;exp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;str&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;exp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;reset&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;// show tokens
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;s&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;exp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;getToken&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;printf&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;%s&lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\n&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;c_str&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;());&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;Get the complete source on my &lt;a href=&#34;https://github.com/junian/cpp-console-apps/tree/master/src/math-expression-tokenizer&#34;&gt;Git repository&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Set the Default GitHub Branch to &#39;master&#39;</title>
      <link>https://www.junian.dev/dev/github-master-branch/</link>
      <pubDate>Tue, 09 Sep 2025 12:27:54 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/github-master-branch/</guid>
      <description>&lt;p&gt;Consider this scenario where you create a new Git repository using the command-line tool.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ mkdir new-repo
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ &lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; new-repo
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ git init
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Initialized empty Git repository in /Users/junian/new-repo/.git/
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ touch README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ git add .
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ git commit -m &lt;span class=&#34;s2&#34;&gt;&amp;#34;Init&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;master &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;root-commit&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; d088569&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; Init
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; file changed, &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; insertions&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;+&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; deletions&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;-&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; create mode &lt;span class=&#34;m&#34;&gt;100644&lt;/span&gt; README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ git status
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;On branch master
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nothing to commit, working tree clean&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;As you can see, the &lt;code&gt;git&lt;/code&gt; CLI still defaults to the &lt;code&gt;master&lt;/code&gt; branch. I respect that and am fine with it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Uninstall Old .NET SDK and Runtime Versions on macOS</title>
      <link>https://www.junian.dev/dev/dotnet-sdk-runtime-macos-removal/</link>
      <pubDate>Mon, 08 Sep 2025 09:43:28 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/dotnet-sdk-runtime-macos-removal/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re a .NET developer using macOS, you might not realize that old versions of the .NET SDK and Runtime can take up valuable storage space.
When you install a new .NET version, previous versions are usually left behind.
This is often helpful for testing different .NET versions side by side.&lt;/p&gt;
&lt;p&gt;Fortunately, you can easily identify all installed .NET versions on macOS using Terminal.&lt;/p&gt;
&lt;h2 id=&#34;check-installed-net-sdks-and-runtimes&#34;&gt;Check Installed .NET SDKs and Runtimes&lt;/h2&gt;
&lt;p&gt;First, let&amp;rsquo;s see which .NET SDKs and Runtimes are installed on your system. Run the following command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>SVN Cheat Sheet</title>
      <link>https://www.junian.dev/dev/svn-cheat-sheet/</link>
      <pubDate>Fri, 05 Sep 2025 05:48:31 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/svn-cheat-sheet/</guid>
      <description>&lt;p&gt;This article contains a list of cheat sheets, common problems, and solutions that I encountered while working with the SVN version control system.&lt;/p&gt;
&lt;p&gt;Although I don&amp;rsquo;t use SVN regularly anymore, there are still some projects that rely on it, such as older versions of &lt;a href=&#34;https://opendental.com/manual/downloads.html&#34;&gt;Open Dental Software&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Hopefully, this cheat sheet will be helpful to some of you.&lt;/p&gt;
&lt;h2 id=&#34;get-current-svn-revision&#34;&gt;Get Current SVN Revision&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: I want to see the current revision for a specific SVN repository.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Git Pull &#39;Rebase in Progress&#39; Issue</title>
      <link>https://www.junian.dev/dev/git-pull-rebase-in-progress/</link>
      <pubDate>Mon, 10 Mar 2025 10:00:13 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/git-pull-rebase-in-progress/</guid>
      <description>&lt;p&gt;When I tried to pull a Git repository with &lt;strong&gt;SourceTree&lt;/strong&gt;, I encountered the following error:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Rebase In Progress&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It appears that you have a rebase in progress that was probably interrupted because of a conflict. If you&amp;rsquo;ve resolved the conflicts in your working copy, please choose whether to continue the rebase or abort this process where you are now.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure&gt;
    &lt;img src=&#34;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0hzeFZy0H_EiffF45kUpMVeZp6sr6XZD266jxjf77LeRuYZVshW-IFXXpepahH2aPJEWIvmI5RqPTXSjjxobjf46hvrDcuKIoe7Yaq-QXpW1UKPfchJtkSw_QNSYMFJc_SUM-9R-3W5T0cZF_RxyWUu5aN6Zn9IwO0RXG5X6WCyB6lZQ0j59MUCyVqP4D/s1600/git-pull-rebase-in-progress.png&#34; alt=&#34;Git Pull &amp;lsquo;Rebase In Progress&amp;rsquo; issue&#34;loading=&#34;lazy&#34;
    &gt;&lt;figcaption&gt;Git Pull &amp;lsquo;Rebase In Progress&amp;rsquo; issue&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;I didn&amp;rsquo;t remember &lt;strong&gt;whether&lt;/strong&gt; I had been doing a Git rebase before.
But well, let&amp;rsquo;s try to fix it in the Terminal.&lt;/p&gt;</description>
    </item>
    <item>
      <title>WinForms 32-bit &#39;Designer Could Not Be Shown&#39; Issue</title>
      <link>https://www.junian.dev/dev/dotnet-winforms-32bit-designer-issue/</link>
      <pubDate>Sun, 09 Mar 2025 10:30:40 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/dotnet-winforms-32bit-designer-issue/</guid>
      <description>&lt;p&gt;When I was working on a company WinForms project in Visual Studio, I encountered the following error:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: frmDataEditor &amp;mdash; The base class &amp;lsquo;Client.Forms&amp;rsquo; could not be loaded. Ensure the assembly has been referenced and that all projects have been built.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here&amp;rsquo;s the complete Stack Trace:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Solving the Xamarin.Forms iOS &#39;Could Not Load the Framework IDEDistribution&#39; Issue</title>
      <link>https://www.junian.dev/dev/xamarin-forms-ios-framework-idedistribution-issue/</link>
      <pubDate>Thu, 13 Feb 2025 16:03:36 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/xamarin-forms-ios-framework-idedistribution-issue/</guid>
      <description>&lt;p&gt;Xamarin.Forms is deprecated as of May 2024. I get it.
But some of us are still trying to maintain legacy Xamarin projects.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Not in the mood for reading? Watch the &lt;a href=&#34;https://www.junian.dev/dev/xamarin-forms-ios-framework-idedistribution-issue/#video&#34;&gt;video&lt;/a&gt; instead.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It&amp;rsquo;s 2025, and I tried to run a Xamarin.Forms iOS project with the latest Xcode version on macOS.
It failed with the following error message.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;error HE0004: Could not load the framework &amp;lsquo;IDEDistribution&amp;rsquo; (path: /Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution):
dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution, 0x0001): Library not loaded: @rpath/AppThinning.framework/Versions/A/AppThinning
Referenced from: &amp;lt;6F88EF9E-AE57-3231-9DD6-36E9CC59D914&amp;gt; /Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution
Reason: tried: &amp;lsquo;/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.framework/Versions/A/AppThinning&amp;rsquo; (no such file), &amp;lsquo;/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/Frameworks/AppThinning.framework/Versions/A/AppThinning&amp;rsquo; (no such file), &amp;lsquo;/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.framework/Versions/A/AppThinning&amp;rsquo; (no such file), &amp;lsquo;/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/Frameworks/AppThinning.framework/Versions/A/AppThinning&amp;rsquo; (no such file), &amp;lsquo;/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/MonoBundle/AppThinning.framework/Versions/A/AppThinning&amp;rsquo; (no such file)&lt;/p&gt;</description>
    </item>
    <item>
      <title>freeCodeCamp Responsive Web Design Learning Journey (V8 / 2022 Curriculum)</title>
      <link>https://www.junian.dev/dev/learn-freecodecamp-responsive-web-design/</link>
      <pubDate>Thu, 13 Feb 2025 04:56:21 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/learn-freecodecamp-responsive-web-design/</guid>
      <description>&lt;p&gt;As part of my personal development, I&amp;rsquo;ll regularly share my learning journey here.
This page is dedicated to my progress in earning the freeCodeCamp Responsive Web Design certification.
All updates will be in video format.
If you&amp;rsquo;d like to stay updated as soon as new content is released, feel free to subscribe to my channel.&lt;/p&gt;
&lt;h2 id=&#34;learn-html-by-building-a-cat-photo-app&#34;&gt;Learn HTML by Building a Cat Photo App&lt;/h2&gt;
&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;
      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/j3I84FR2U6Q?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;
    &lt;/div&gt;
    &lt;p&gt;&lt;a href=&#34;https://www.youtube.com/@JunianDev?sub_confirmation=1&#34; target=&#34;_blank&#34;&gt;&lt;img src=&#34;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCSx6KT2geZz3TgDYUlDWgamXCCztHusZY4FsB5gQfyhAu-omBphLzVSc8wD6o7crJ64XYaN6lmMrQ6FN9zvulN1t-P-CCa9ZvLLFn7LGnXpS-Rb5rQHqS3DwLrkbS_tAHzDcrH0sUxzkSEeeTnAis7dZpzZJhouuPnI4USQnXfmrb37gP7CD0uHR4qh8I/s300/youtube-subscribe-button-and-bell-icon.png&#34; alt=&#34;Subscribe to Junian Dev YouTube channel&#34; /&gt;&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automating Git Cleanup Across Multiple Directories with a Shell Script</title>
      <link>https://www.junian.dev/dev/multiple-git-repos-cleanup/</link>
      <pubDate>Tue, 17 Dec 2024 15:42:26 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/multiple-git-repos-cleanup/</guid>
      <description>&lt;p&gt;Managing multiple Git repositories can be a tedious task.
One task I often perform is ensuring each repository is clean and reset to its original state.
Instead of manually navigating into each directory and running Git commands, I like to automate the process with a simple shell script.&lt;/p&gt;
&lt;h2 id=&#34;objective-of-the-script&#34;&gt;Objective of the Script&lt;/h2&gt;
&lt;p&gt;This script automates two key tasks for all Git repositories in the current working directory:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;git clean -fdx&lt;/code&gt;&lt;/strong&gt;: Removes untracked files, directories, and ignored files.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;git reset --hard HEAD&lt;/code&gt;&lt;/strong&gt;: Resets the repository to the last commit, discarding all local changes.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The script loops through each directory, checks if it’s a Git repository, and then performs the cleanup operations.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Run Brave Browser without CORS Restriction</title>
      <link>https://www.junian.dev/dev/brave-disable-cors/</link>
      <pubDate>Mon, 18 Nov 2024 06:26:16 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/brave-disable-cors/</guid>
      <description>&lt;p&gt;As a web developer, you likely need to test your REST API locally. When using a browser like Brave Browser, you might encounter issues such as the following message.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Access to fetch at &amp;lsquo;http://localhost:8080/api&amp;rsquo; from origin &amp;lsquo;http://localhost:8000&amp;rsquo; has been blocked by CORS policy: No &amp;lsquo;Access-Control-Allow-Origin&amp;rsquo; header is present on the requested resource. If an opaque response serves your needs, set the request&amp;rsquo;s mode to &amp;rsquo;no-cors&amp;rsquo; to fetch the resource with CORS disabled.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Run Safari Browser without CORS Restriction</title>
      <link>https://www.junian.dev/dev/safari-disable-cors/</link>
      <pubDate>Sun, 17 Nov 2024 11:28:56 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/safari-disable-cors/</guid>
      <description>&lt;p&gt;As a web developer, you likely need to test your REST API locally. When using a browser like Safari, you might encounter issues such as the following messages.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Origin http://localhost:8081 is not allowed by Access-Control-Allow-Origin. Status code: 200&lt;/p&gt;
&lt;p&gt;Fetch API cannot load http://localhost:8080/api/ due to access control checks.&lt;/p&gt;
&lt;p&gt;Failed to load resource: Origin http://localhost:8081 is not allowed by Access-Control-Allow-Origin. Status code: 200&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Don&amp;rsquo;t worry, this is actually a strong security feature implemented by modern web browsers.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fizz Buzz - LeetCode in C#</title>
      <link>https://www.junian.dev/dev/fizz-buzz/</link>
      <pubDate>Thu, 14 Nov 2024 12:01:57 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/fizz-buzz/</guid>
      <description>&lt;p&gt;The Fizz Buzz problem is a classic exercise that is often used to teach basic programming concepts such as loops and conditionals.&lt;/p&gt;
&lt;p&gt;In this article, I&amp;rsquo;ll show you my attempt to solve this problem.&lt;/p&gt;
&lt;h2 id=&#34;problem-description&#34;&gt;Problem Description&lt;/h2&gt;
&lt;details&gt;
&lt;p&gt;Given an integer &lt;code&gt;n&lt;/code&gt;, return a string array &lt;code&gt;answer&lt;/code&gt; &lt;em&gt;(&lt;strong&gt;1-indexed&lt;/strong&gt;) where&lt;/em&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;answer[i] == &amp;quot;FizzBuzz&amp;quot;&lt;/code&gt; if &lt;code&gt;i&lt;/code&gt; is divisible by &lt;code&gt;3&lt;/code&gt; and &lt;code&gt;5&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;answer[i] == &amp;quot;Fizz&amp;quot;&lt;/code&gt; if &lt;code&gt;i&lt;/code&gt; is divisible by &lt;code&gt;3&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;answer[i] == &amp;quot;Buzz&amp;quot;&lt;/code&gt; if &lt;code&gt;i&lt;/code&gt; is divisible by &lt;code&gt;5&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;answer[i] == i&lt;/code&gt; (as a string) if none of the above conditions are true.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;example-1&#34;&gt;Example 1:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Input:&lt;/strong&gt; &lt;code&gt;n = 3&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Output:&lt;/strong&gt; &lt;code&gt;[&amp;quot;1&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;Fizz&amp;quot;]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;example-2&#34;&gt;Example 2:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Input:&lt;/strong&gt; &lt;code&gt;n = 5&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Output:&lt;/strong&gt; &lt;code&gt;[&amp;quot;1&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;Fizz&amp;quot;,&amp;quot;4&amp;quot;,&amp;quot;Buzz&amp;quot;]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;example-3&#34;&gt;Example 3:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Input:&lt;/strong&gt; &lt;code&gt;n = 15&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Output:&lt;/strong&gt; &lt;code&gt;[&amp;quot;1&amp;quot;,&amp;quot;2&amp;quot;,&amp;quot;Fizz&amp;quot;,&amp;quot;4&amp;quot;,&amp;quot;Buzz&amp;quot;,&amp;quot;Fizz&amp;quot;,&amp;quot;7&amp;quot;,&amp;quot;8&amp;quot;,&amp;quot;Fizz&amp;quot;,&amp;quot;Buzz&amp;quot;,&amp;quot;11&amp;quot;,&amp;quot;Fizz&amp;quot;,&amp;quot;13&amp;quot;,&amp;quot;14&amp;quot;,&amp;quot;FizzBuzz&amp;quot;]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;constraints&#34;&gt;Constraints:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;1 &amp;lt;= n &amp;lt;= 10&lt;sup&gt;4&lt;/sup&gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/details&gt;
&lt;!--adsense--&gt;
&lt;h2 id=&#34;intuition&#34;&gt;Intuition&lt;/h2&gt;
&lt;p&gt;When breaking down the problem, the task is to iterate through a sequence of numbers while applying simple divisibility rules to determine the correct output for each number.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Palindrome Number - LeetCode in C#</title>
      <link>https://www.junian.dev/dev/palindrome-number/</link>
      <pubDate>Sun, 10 Nov 2024 17:03:55 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/palindrome-number/</guid>
      <description>&lt;h2 id=&#34;problem&#34;&gt;Problem&lt;/h2&gt;
&lt;details&gt;
&lt;p&gt;Given an integer &lt;code&gt;x&lt;/code&gt;, return &lt;code&gt;true&lt;/code&gt; &lt;em&gt;if&lt;/em&gt; &lt;code&gt;x&lt;/code&gt; &lt;em&gt;is a&lt;/em&gt; &lt;em&gt;&lt;strong&gt;palindrome&lt;/strong&gt;&lt;/em&gt; &lt;em&gt;, and&lt;/em&gt; &lt;code&gt;false&lt;/code&gt; &lt;em&gt;otherwise&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Input:&lt;/strong&gt; &lt;code&gt;x = 121&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Output:&lt;/strong&gt; &lt;code&gt;true&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explanation:&lt;/strong&gt; 121 reads as 121 from left to right and from right to left.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example 2:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Input:&lt;/strong&gt; &lt;code&gt;x = -121&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Output:&lt;/strong&gt; &lt;code&gt;false&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explanation:&lt;/strong&gt; From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example 3:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Input:&lt;/strong&gt; &lt;code&gt;x = 10&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Output:&lt;/strong&gt; &lt;code&gt;false&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explanation:&lt;/strong&gt; Reads 01 from right to left. Therefore it is not a palindrome.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Constraints:&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Remove Duplicates From Sorted Array - LeetCode in C#</title>
      <link>https://www.junian.dev/dev/remove-duplicates-from-sorted-array/</link>
      <pubDate>Sat, 09 Nov 2024 14:46:13 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/remove-duplicates-from-sorted-array/</guid>
      <description>&lt;h2 id=&#34;problem-description&#34;&gt;Problem Description&lt;/h2&gt;
&lt;details&gt;
&lt;p&gt;Given an integer array &lt;code&gt;nums&lt;/code&gt; sorted in &lt;strong&gt;non-decreasing order&lt;/strong&gt;, remove the duplicates &lt;a href=&#34;https://en.wikipedia.org/wiki/In-place_algorithm&#34;&gt;&lt;strong&gt;in-place&lt;/strong&gt;&lt;/a&gt; such that each unique element appears only &lt;strong&gt;once&lt;/strong&gt;. The &lt;strong&gt;relative order&lt;/strong&gt; of the elements should be kept the &lt;strong&gt;same&lt;/strong&gt;. Then return &lt;em&gt;the number of unique elements in&lt;/em&gt; &lt;code&gt;nums&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Consider the number of unique elements of &lt;code&gt;nums&lt;/code&gt; to be &lt;code&gt;k&lt;/code&gt;, to get accepted, you need to do the following things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change the array &lt;code&gt;nums&lt;/code&gt; such that the first &lt;code&gt;k&lt;/code&gt; elements of &lt;code&gt;nums&lt;/code&gt; contain the unique elements in the order they were present in &lt;code&gt;nums&lt;/code&gt; initially. The remaining elements of &lt;code&gt;nums&lt;/code&gt; are not important as well as the size of &lt;code&gt;nums&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Return &lt;code&gt;k&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Custom Judge:&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Two Sum - LeetCode in C# - Hash Table Solution</title>
      <link>https://www.junian.dev/dev/two-sum-hash-table/</link>
      <pubDate>Fri, 08 Nov 2024 18:51:32 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/two-sum-hash-table/</guid>
      <description>&lt;h2 id=&#34;problem&#34;&gt;Problem&lt;/h2&gt;
&lt;details&gt;
&lt;p&gt;Given an array of integers &lt;code&gt;nums&lt;/code&gt; and an integer &lt;code&gt;target&lt;/code&gt;, return &lt;em&gt;indices of the two numbers such that they add up to &lt;code&gt;target&lt;/code&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;You may assume that each input would have &lt;strong&gt;&lt;em&gt;exactly&lt;/em&gt; one solution&lt;/strong&gt;, and you may not use the &lt;em&gt;same&lt;/em&gt; element twice.&lt;/p&gt;
&lt;p&gt;You can return the answer in any order.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Input:&lt;/strong&gt; &lt;code&gt;nums = [2,7,11,15], target = 9&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Output:&lt;/strong&gt; &lt;code&gt;[0,1]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explanation:&lt;/strong&gt; Because &lt;code&gt;nums[0] + nums[1] == 9&lt;/code&gt;, we return &lt;code&gt;[0, 1]&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example 2:&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Two Sum - LeetCode in C# - Brute force approach</title>
      <link>https://www.junian.dev/dev/two-sum-bruteforce/</link>
      <pubDate>Fri, 08 Nov 2024 13:39:47 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/two-sum-bruteforce/</guid>
      <description>&lt;p&gt;&lt;em&gt;You might want to read the &lt;a href=&#34;https://www.junian.dev/leetcode/two-sum-hash-table/&#34;&gt;Hash Table&lt;/a&gt; solution. It&amp;rsquo;s better.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;intuition&#34;&gt;Intuition&lt;/h2&gt;
&lt;p&gt;When I first encountered the Two Sum problem, my initial thought was to check each possible pair of numbers in the array.
If a pair sums to the target value, then that would be our solution.&lt;/p&gt;
&lt;p&gt;This brute force method should work, but intuitively, I thought there might be more efficient ways.&lt;/p&gt;
&lt;p&gt;However, starting with the simplest idea often helps to understand the problem better and refine the approach.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Run Microsoft Edge without CORS Restriction</title>
      <link>https://www.junian.dev/dev/microsoft-edge-disable-cors/</link>
      <pubDate>Fri, 25 Oct 2024 12:59:57 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/microsoft-edge-disable-cors/</guid>
      <description>&lt;p&gt;As a web developer, you likely need to test your REST API locally. When using a browser like Microsoft Edge, you might encounter issues such as the following message.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Access to fetch at &amp;lsquo;http://localhost:8000/api&amp;rsquo; from origin &amp;lsquo;http://localhost:3000&amp;rsquo; has been blocked by CORS policy: No &amp;lsquo;Access-Control-Allow-Origin&amp;rsquo; header is present on the requested resource. If an opaque response serves your needs, set the request&amp;rsquo;s mode to &amp;rsquo;no-cors&amp;rsquo; to fetch the resource with CORS disabled.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Removing Full-Screen Intent Permission from Flutter Android</title>
      <link>https://www.junian.dev/dev/flutter-android-remove-permission-use-full-screen-intent/</link>
      <pubDate>Sat, 12 Oct 2024 13:13:36 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/flutter-android-remove-permission-use-full-screen-intent/</guid>
      <description>&lt;p&gt;Today I&amp;rsquo;m trying to submit a new version of the Flutter Android app to Google Play Store.
I didn&amp;rsquo;t put any new features, just some bug fixes.
I didn&amp;rsquo;t even change the dependencies.
Normally no issue whatsoever when I send it to the Google Play Store.&lt;/p&gt;
&lt;p&gt;But, something unexpected happened.
I got an error message from the Play Store with the following message.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Your app uses the USE_FULL_SCREEN_INTENT permission. From May 31, 2024, some apps may no longer be eligible to have this permission pre-granted at install. Apps that aren&amp;rsquo;t eligible or approved for this, must request permission from the user to launch an activity with full-screen intent. If the permission isn&amp;rsquo;t granted and you don&amp;rsquo;t check for this, your app will crash when full-screen intent is being used.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Ensure Rosetta 2 is Installed on macOS</title>
      <link>https://www.junian.dev/dev/macos-install-rosetta-2/</link>
      <pubDate>Wed, 09 Oct 2024 09:00:00 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/macos-install-rosetta-2/</guid>
      <description>&lt;p&gt;If you are using a Mac with Apple Silicon (M1 / M2 / M3), you may encounter software or applications that are not natively designed for the ARM-based architecture.&lt;/p&gt;
&lt;p&gt;To run these Intel-based apps on your Mac, you need Rosetta 2, a translation tool that enables compatibility.&lt;/p&gt;
&lt;p&gt;This guide will walk you through how to ensure that Rosetta 2 is installed on your macOS.&lt;/p&gt;
&lt;p&gt;To get started, you&amp;rsquo;ll need to open the Terminal app on your Mac. You can find it in the Applications &amp;gt; Utilities folder, or you can use Spotlight to search for it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Run Google Chrome without CORS Restriction</title>
      <link>https://www.junian.dev/dev/google-chrome-disable-cors/</link>
      <pubDate>Mon, 07 Oct 2024 10:02:06 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/google-chrome-disable-cors/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re a Web developer you probably have a task to test your REST API locally.
When you&amp;rsquo;re using a browser like Google Chrome, you may experience some issues like the following message.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Access to fetch at &amp;lsquo;http://localhost:8080/api&amp;rsquo; from origin &amp;lsquo;http://localhost:8000&amp;rsquo; has been blocked by CORS policy: No &amp;lsquo;Access-Control-Allow-Origin&amp;rsquo; header is present on the requested resource. If an opaque response serves your needs, set the request&amp;rsquo;s mode to &amp;rsquo;no-cors&amp;rsquo; to fetch the resource with CORS disabled.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Folder Browser Dialog on Windows with C#</title>
      <link>https://www.junian.dev/dev/csharp-open-folder-dialog/</link>
      <pubDate>Sun, 05 May 2024 13:42:11 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/csharp-open-folder-dialog/</guid>
      <description>&lt;p&gt;In this guide, I&amp;rsquo;ll walk you through the process of implementing a folder selection UI using C#.&lt;/p&gt;
&lt;p&gt;In many applications, users need to specify a folder where certain files will be saved or retrieved.
Providing a user-friendly way to select folders enhances the overall usability of your application.&lt;/p&gt;
&lt;p&gt;To implement a folder selection dialog in C#, we&amp;rsquo;ll use the &lt;code&gt;FolderBrowserDialog&lt;/code&gt; class provided by the .NET framework.
This class allows users to browse and select folders from their file system with ease.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Can&#39;t Open Form [Design] View in WinForms Project</title>
      <link>https://www.junian.dev/dev/winforms-unable-open-design-view/</link>
      <pubDate>Sun, 05 May 2024 09:48:56 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/winforms-unable-open-design-view/</guid>
      <description>&lt;p&gt;Have you ever been developing a WinForms project and encountered a situation where you couldn&amp;rsquo;t use the View Designer?&lt;/p&gt;
&lt;p&gt;This problem can occur when you&amp;rsquo;re using the latest SDK-style project but are still targeting an older version of .NET, such as 4.8 or below.&lt;/p&gt;
&lt;p&gt;Rest assured, you&amp;rsquo;re not alone. The solution is rather straightforward.&lt;/p&gt;
&lt;p&gt;In Visual Studio, simply right-click on your project file and select &lt;strong&gt;Edit Project File&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Now, you just need to include a new &lt;code&gt;ItemGroup&lt;/code&gt; for your Form files.&lt;/p&gt;</description>
    </item>
    <item>
      <title>VSCode Avalonia Extension Download .NET Runtime Issue</title>
      <link>https://www.junian.dev/dev/vscode-avalonia-requested-to-download-dotnet-runtime/</link>
      <pubDate>Wed, 17 Apr 2024 16:08:38 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/vscode-avalonia-requested-to-download-dotnet-runtime/</guid>
      <description>&lt;p&gt;So I want to start using AvaloniaUI on macOS, but suddenly it always happens.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;AvaloniaTeam.vscode-avalonia requested to download the .NET Runtime.
Downloading .NET version(s) 8.0.4~arm64 &amp;hellip;.Error
Failed to download .NET 8.0:
Web Request to &lt;a href=&#34;https://dot.net/v1/dotnet-install.sh&#34;&gt;https://dot.net/v1/dotnet-install.sh&lt;/a&gt; Failed: n[r].split is not a function. Aborting. Please ensure that you are online.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To solve that, just open the VSCode &lt;code&gt;settings.json&lt;/code&gt; and configure it with the following settings.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;dotnetAcquisitionExtension.existingDotnetPath&amp;#34;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;extensionId&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;ms-dotnettools.csharp&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;path&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/usr/local/share/dotnet/dotnet&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;extensionId&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;ms-dotnettools.csdevkit&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;path&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/usr/local/share/dotnet/dotnet&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;extensionId&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;visualstudiotoolsforunity.vstuc&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;path&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/usr/local/share/dotnet/dotnet&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;extensionId&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;AvaloniaTeam.vscode-avalonia&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;#34;path&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;/usr/local/share/dotnet/dotnet&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;That&amp;rsquo;s it, now you can use &lt;code&gt;AvaloniaUI&lt;/code&gt; on VSCode with auto-complete and everything.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Retrieving Keychain Passwords in Swift for macOS</title>
      <link>https://www.junian.dev/dev/swift-get-keychain-password/</link>
      <pubDate>Wed, 17 Apr 2024 10:45:40 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/swift-get-keychain-password/</guid>
      <description>&lt;p&gt;In Swift development for macOS applications, securing sensitive information like passwords is equally important.
macOS provides a secure storage mechanism called Keychain, where you can store passwords, keys, tokens, and other sensitive data.
This tutorial will guide you through the process of retrieving passwords from the Keychain in Swift for macOS applications.&lt;/p&gt;
&lt;p&gt;To work with the Keychain, you need to import the &lt;code&gt;Security&lt;/code&gt; framework in your Swift file.
Now, let&amp;rsquo;s create a function that retrieves passwords from the Keychain.
Add the following function to your Swift file.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Enter an x86_64 Shell on macOS: A Guide for Apple Silicon Users</title>
      <link>https://www.junian.dev/dev/macos-x86_64-shell-from-arm64/</link>
      <pubDate>Tue, 31 Oct 2023 06:44:28 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/macos-x86_64-shell-from-arm64/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re the owner of an Apple Silicon Mac, you might find yourself in situations where you need to run software designed for the x86_64 or Intel environment. This could be for compiling and installing the Apple Game Porting Toolkit or simply testing your application in an x86_64 environment. The good news is, macOS offers a seamless way to switch between these environments using a feature called Rosetta 2. In this guide, we&amp;rsquo;ll walk you through the steps to enter an x86_64 shell on your ARM64 Mac, making it a breeze to switch back and forth as needed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Fix the &#39;zsh compinit: insecure directories&#39; Error on macOS</title>
      <link>https://www.junian.dev/dev/macos-fix-zsh-compinit-insecure-directories/</link>
      <pubDate>Mon, 30 Oct 2023 20:34:43 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/macos-fix-zsh-compinit-insecure-directories/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;ve recently installed the &lt;a href=&#34;https://brew.sh&#34;&gt;Homebrew package manager&lt;/a&gt; on macOS, you might encounter an error message in your Terminal similar to this:&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-zsh&#34; data-lang=&#34;zsh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;zsh compinit: insecure directories, run compaudit &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; list.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Ignore insecure directories and &lt;span class=&#34;k&#34;&gt;continue&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;y&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; or abort compinit &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;n&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;?
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;compinit: initialization aborted&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;This error can be frustrating, but you don&amp;rsquo;t need to worry.
This guide will walk you through the steps to resolve it.
We&amp;rsquo;ll cover what causes the error and how to fix it quickly.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How To Import and Manipulate Large Datasets in Python Using Pandas</title>
      <link>https://www.junian.dev/dev/python-pandas-large-datasets/</link>
      <pubDate>Sat, 18 Apr 2020 05:52:47 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/python-pandas-large-datasets/</guid>
      <description>&lt;p&gt;As a Python developer, you will often have to work with large datasets. Python is known for being a language that is well-suited to this task.&lt;/p&gt;
&lt;p&gt;With that said, Python itself does not have much in the way of built-in capabilities for data analysis. Instead, data analysts make use of a Python library called &lt;a href=&#34;https://pandas.pydata.org&#34;&gt;pandas&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this article, you will learn how to import and manipulate large datasets in Python using pandas.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Fix Hugo JSON-LD Escaping Problem</title>
      <link>https://www.junian.dev/dev/hugo-fix-json-ld-escaping/</link>
      <pubDate>Thu, 02 Apr 2020 21:35:54 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/hugo-fix-json-ld-escaping/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been using Hugo static site generator for a long time.
It&amp;rsquo;s from version 0.34 if I remember correctly.
I&amp;rsquo;ve been using that version for a year and so far it works just fine.
I build my theme based on that version too.
And it&amp;rsquo;s been forever I keep the theme code as it is because I thought that&amp;rsquo;s good enough.&lt;/p&gt;
&lt;p&gt;Recently I decided to give the update for Hugo version 0.68.3.
The purpose is just to want to catch up with the latest version.&lt;/p&gt;</description>
    </item>
    <item>
      <title>String Comparison by Ignoring Case in C#</title>
      <link>https://www.junian.dev/dev/csharp-string-comparison-ignore-case/</link>
      <pubDate>Thu, 02 Apr 2020 10:19:09 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/csharp-string-comparison-ignore-case/</guid>
      <description>&lt;p&gt;String value in C# is case-sensitive.
That means lower case and upper case texts are considered different when you compare them.&lt;/p&gt;
&lt;p&gt;But, there are some cases when you need to compare two strings and ignore their case.
For example when you&amp;rsquo;re building a search engine.&lt;/p&gt;
&lt;p&gt;To compare two strings by ignoring their case, you can just put an additional parameter when you&amp;rsquo;re using &lt;code&gt;string.Equals()&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;Take a look the following snippet as an example.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Base64 String Encoding and Decoding in C#</title>
      <link>https://www.junian.dev/dev/csharp-base64-string-encode-decode/</link>
      <pubDate>Tue, 31 Mar 2020 20:28:58 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/csharp-base64-string-encode-decode/</guid>
      <description>&lt;p&gt;Base64 is a radix-64 ASCII string format that represents binary data.
Each digit of base64 encoded string represents exactly 6 bits of data.&lt;/p&gt;
&lt;p&gt;It is designed to carry binary data across platforms that only support text content.&lt;/p&gt;
&lt;p&gt;The usage is mostly popular in Web platform.
For example it&amp;rsquo;s being used to embed image files inside HTML or embed font file inside CSS.&lt;/p&gt;
&lt;p&gt;Even though the main purpose is to store binary data into a text content, base64 sometimes is being used to hide a text.
For example to prevent the content of your website scraped by robot.&lt;/p&gt;</description>
    </item>
    <item>
      <title>&#39;Hello, World!&#39; Program in C#</title>
      <link>https://www.junian.dev/dev/csharp-hello-world/</link>
      <pubDate>Tue, 31 Mar 2020 19:25:12 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/csharp-hello-world/</guid>
      <description>&lt;p&gt;Hi, welcome to C# FAQs.
I create this section to collect and write frequently used C# methods.
I will also write the description, or the step by step tutorial with simple english so you can understand it easily.&lt;/p&gt;
&lt;p&gt;For the first post, I&amp;rsquo;ll show you how to write a C# program that prints &amp;ldquo;Hello, World!&amp;rdquo; on your screen.
This is the simplest program in any programming language.
It&amp;rsquo;s a good first step for anyone learning to code.
After you finish this, you&amp;rsquo;ll understand the basic syntax in C#.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Save C# Image Object into Oracle BLOB</title>
      <link>https://www.junian.dev/dev/csharp-image-to-oracle-blob/</link>
      <pubDate>Wed, 13 Nov 2019 06:00:13 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/csharp-image-to-oracle-blob/</guid>
      <description>&lt;p&gt;Some of my friends requested me to make a tutorial about the Oracle database and C#.
This time, I’d like to share about how to Save Image or Picture from C# Object into Oracle BLOB Type.
It’s very easy if you know the trick.&lt;/p&gt;
&lt;p&gt;To make the tutorial simple, let&amp;rsquo;s assume a table with 1 field.
It&amp;rsquo;ll be used to store a collection of photos.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;CREATE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TABLE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PHOTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PHOTO_BIN&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;BLOB&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;Next, open or create a new C# project.
Add &lt;code&gt;Oracle.ManagedDataAccess&lt;/code&gt; NuGet package to your project.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Simple OpenVPN Server Set Up with Docker</title>
      <link>https://www.junian.dev/dev/docker-openvpn-server/</link>
      <pubDate>Thu, 22 Aug 2019 11:02:53 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/docker-openvpn-server/</guid>
      <description>&lt;p&gt;When I was doing some works, there was a requirement to whitelist development machine by IP Address from the United States.
Since I was located in one of South East Asia countries, obviously I didn&amp;rsquo;t have a connection with US IP Address.
So it would be reasonable to buy a VPN service for this.&lt;/p&gt;
&lt;p&gt;But why buy a VPN service if we could use the existing VPS and set up a VPN server on it?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Passwordless SSH Server on macOS</title>
      <link>https://www.junian.dev/dev/macos-ssh-server-no-password/</link>
      <pubDate>Tue, 07 May 2019 09:41:30 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/macos-ssh-server-no-password/</guid>
      <description>&lt;p&gt;One time I need to add access my &lt;a href=&#34;https://amzn.to/2GZNWKG&#34;&gt;MacBook Pro&lt;/a&gt; remotely using ssh from a &lt;a href=&#34;https://amzn.to/2vFMB6n&#34;&gt;Windows 10&lt;/a&gt; machine.
It&amp;rsquo;s very easy actually to enable ssh server on macOS.
You just need to open System Preferences → Sharing → check Remote Login and that&amp;rsquo;s it.
Simply connect it using your client machine with &lt;code&gt;ssh username@ip-address&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The problem is, by default this ssh server only accept password login.&lt;/p&gt;
&lt;p&gt;To enable passwordless login using private key authentication, we need to configure further.
Open your favorite terminal application on your macOS.
Edit &lt;code&gt;sshd_config&lt;/code&gt; file using your favorite text editor.
The file is located at &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt;.
Since it requires admin credential, you need to edit it using &lt;code&gt;sudo&lt;/code&gt;.
Here is an example using &lt;code&gt;vim&lt;/code&gt; editor.&lt;/p&gt;</description>
    </item>
    <item>
      <title>QR Code Generation on Terminal</title>
      <link>https://www.junian.dev/dev/terminal-qr-code-generation/</link>
      <pubDate>Tue, 16 Apr 2019 14:50:36 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/terminal-qr-code-generation/</guid>
      <description>&lt;p&gt;There was a time when I need to transfer data from my MacBook Pro to my iPhone.
There are many ways to transfer the data.&lt;/p&gt;
&lt;p&gt;But one time, my Mac and my iPhone are on a different network in the same place.&lt;/p&gt;
&lt;p&gt;I need to use an ssh client from my iPhone.
But the iOS app unable to generate ssh keys.
So I need to create the key from my MacBook Pro.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Text-Based Password Manager</title>
      <link>https://www.junian.dev/dev/text-based-password-manager/</link>
      <pubDate>Tue, 16 Apr 2019 10:57:29 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/text-based-password-manager/</guid>
      <description>&lt;p&gt;Everyone needs a password manager.
I have dozens of credentials to several websites.
Re-using password across websites is no.
Memorizing dozens of different password is also a no.
The only way is to use a password manager.&lt;/p&gt;
&lt;p&gt;For so long, I&amp;rsquo;ve been searching for the simplest possible password manager.
I only need two criteria: plaintext and git-friendly.&lt;/p&gt;
&lt;h2 id=&#34;why-plaintext&#34;&gt;Why Plaintext?&lt;/h2&gt;
&lt;p&gt;Yeah, you heard that right, it has to be plaintext.
But that doesn&amp;rsquo;t mean it has to be stored as real plain text, where everyone or every machine can read it.
That would be so wrong.
What I mean is it has to be stored as simple text files, not binary.
If you ever see the content of your public and private ssh keys, that&amp;rsquo;s what I mean.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Create a Local Git Server</title>
      <link>https://www.junian.dev/dev/local-git-server/</link>
      <pubDate>Mon, 15 Apr 2019 13:17:17 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/local-git-server/</guid>
      <description>&lt;p&gt;In this tutorial, I&amp;rsquo;ll show you how to create a git server in your local network.&lt;/p&gt;
&lt;p&gt;You might be thinking why would I?
Usually, when we&amp;rsquo;re working git repository, we go to online services like GitHub.
We create a private project for privacy.
But that&amp;rsquo;s not enough for all cases.&lt;/p&gt;
&lt;p&gt;You maybe need a git repository to store &lt;a href=&#34;https://www.passwordstore.org/&#34;&gt;password&lt;/a&gt;.
Putting it in a cloud service is not cool.&lt;/p&gt;
&lt;p&gt;There is a very simple way to set up your own git server.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Full-Text RSS in Hugo</title>
      <link>https://www.junian.dev/dev/hugo-full-text-rss/</link>
      <pubDate>Tue, 26 Feb 2019 13:15:56 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/hugo-full-text-rss/</guid>
      <description>How to include full blog content in Hugo-generated site&#39;s RSS</description>
    </item>
    <item>
      <title>Fixing &#39;Managed Debugging Assistant LoaderLock&#39; Error</title>
      <link>https://www.junian.dev/dev/managed-debugging-assistant-loaderlock/</link>
      <pubDate>Fri, 14 Sep 2018 12:36:45 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/managed-debugging-assistant-loaderlock/</guid>
      <description>&lt;p&gt;Recently I&amp;rsquo;ve been doing some tasks that require me to build OpenDental from &lt;a href=&#34;https://www.opendental.com/manual/sourcecode.html&#34;&gt;source code&lt;/a&gt;.
It is a Dental Practice software with some graphical features.
They are developing those graphical features by using using DirectX API.&lt;/p&gt;
&lt;p&gt;This software have been developed since a long time ago so I expect that there will be some incompatibility if I&amp;rsquo;m using latest Visual Studio.
In my case, I use Visual Studio 2017 v15.8.4 to compile and run the program.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Complete C# String Hash Functions</title>
      <link>https://www.junian.dev/dev/csharp-string-hash/</link>
      <pubDate>Fri, 14 Sep 2018 06:34:40 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/csharp-string-hash/</guid>
      <description>&lt;p&gt;For a while I&amp;rsquo;ve been seeing my blog traffic and surprisingly there are some of you are landed here by searching about &lt;a href=&#34;https://www.junian.dev/csharp-md5/&#34;&gt;MD5 string hash in C#&lt;/a&gt;, specifically used for storing password.
I wrote the first draft of that tutorial when I was still in college while learning C# as a student, so it&amp;rsquo;s really old tutorial.&lt;/p&gt;
&lt;p&gt;As we know, MD5 isn&amp;rsquo;t recommended anymore because it is designed to be very fast and efficient.
By using modern computers and techniques, it is possible to &amp;ldquo;brute force&amp;rdquo; the hash output, in order to retrieve the original input.
Because of this, many security experts suggest not to use it for password hashing.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Solving Sharepoint ClientContext Socket Exception in C#</title>
      <link>https://www.junian.dev/dev/sharepoint-clientcontext-socket-exception/</link>
      <pubDate>Fri, 07 Sep 2018 06:39:53 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/sharepoint-clientcontext-socket-exception/</guid>
      <description>&lt;p&gt;So, you&amp;rsquo;ve been writing a Sharepoint client application and it&amp;rsquo;s running just fine.
After several weeks or months, you noticed some errors were showing up.
If you see a lot of &lt;code&gt;SocketException&lt;/code&gt; error messages like following snippet, then this article is for you.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Net&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WebException&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Unable&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;to&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;connect&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;to&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;the&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;remote&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;server&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;---&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Net&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Sockets&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SocketException&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Only&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;one&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;usage&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;of&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;each&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;socket&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;address&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;protocol&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;network&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;address&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;port&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;is&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;normally&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;permitted&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;127.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0.1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;443&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     &lt;span class=&#34;n&#34;&gt;at&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Net&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Sockets&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Socket&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;DoConnect&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EndPoint&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;endPointSnapshot&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SocketAddress&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;socketAddress&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     &lt;span class=&#34;n&#34;&gt;at&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Net&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ServicePoint&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ConnectSocketInternal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Boolean&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;connectFailure&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Socket&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;s4&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Socket&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;s6&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Socket&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;socket&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;IPAddress&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;address&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ConnectSocketState&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;state&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;IAsyncResult&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;asyncResult&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Exception&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;exception&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;In my previous article about &lt;a href=&#34;https://www.junian.dev/sharepoint-socket-exception/&#34;&gt;Sharepoint CSOM Socket Exception&lt;/a&gt;, I wrote about on how to solve this issue by editing some registry values.
I did it and worked beautifully, but only for several days.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Creating Xamarin.Mac App Distribution in DMG File</title>
      <link>https://www.junian.dev/dev/xamarin-mac-dmg-creation/</link>
      <pubDate>Sat, 25 Aug 2018 05:57:45 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/xamarin-mac-dmg-creation/</guid>
      <description>&lt;p&gt;When you finished developing a macOS desktop app using Xamarin and want to distribute it to end user, you have 3 choices using Visual Studio: Apple App Store distribution, save to disk as &lt;code&gt;.app&lt;/code&gt; file, and portable &lt;code&gt;.pkg&lt;/code&gt; installer.
Except for &lt;code&gt;.app&lt;/code&gt; distribution, you&amp;rsquo;re going to need an Apple Developer ID to create them.&lt;/p&gt;
&lt;p&gt;Now, what if you currently for some reasons don&amp;rsquo;t have an Apple Developer ID.&lt;/p&gt;
&lt;p&gt;One solution is you can just zip the &lt;code&gt;.app&lt;/code&gt; file and distribute it.
But personally, I think that&amp;rsquo;s not an elegant solution because some users don&amp;rsquo;t know that they should put the file to &lt;code&gt;/Applications/&lt;/code&gt; folder.
Even though that&amp;rsquo;s not mandatory, it&amp;rsquo;s better to organize all the apps inside &lt;code&gt;/Applications/&lt;/code&gt; folder.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Inserting an Ad Unit to Hugo Content without Shortcode</title>
      <link>https://www.junian.dev/dev/hugo-in-article-ad/</link>
      <pubDate>Thu, 09 Aug 2018 09:12:59 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/hugo-in-article-ad/</guid>
      <description>&lt;p&gt;Recently I just discovered that Google AdSense now have a &lt;a href=&#34;https://support.google.com/adsense/answer/7320111?hl=en&#34;&gt;native in-article ad unit&lt;/a&gt;.
This is interesting because this ad unit blend well with the content but reader will still easily tell if it&amp;rsquo;s an ad.
Since Google already optimize it, we as publisher won&amp;rsquo;t need to worry too much about intrusive ads in the middle of article.&lt;/p&gt;
&lt;p&gt;So now I want to try put it in my Hugo static site.
You can actually use hugo shortcode for this, there is nothing wrong with that.
But writing a simple html tag is easier than writing a shortcode in the middle of article.
Not to mention, your markdown file will still valid based on CommonMark spec.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sharepoint CSOM Socket Exception</title>
      <link>https://www.junian.dev/dev/sharepoint-socket-exception/</link>
      <pubDate>Mon, 06 Aug 2018 13:45:14 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/sharepoint-socket-exception/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;UPDATE (2018-09-05):&lt;/strong&gt;
&lt;em&gt;New additional &lt;a href=&#34;https://www.junian.dev/dev/sharepoint-socket-exception/#solution-2-change-tcp-timed-wait-delay&#34;&gt;solution&lt;/a&gt; by changing TCP &lt;code&gt;TIME_WAIT&lt;/code&gt; delay.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Months ago I&amp;rsquo;ve made a C# script to synchronize data from external source into a Sharepoint Site using Sharepoint CSOM and PnP.
It&amp;rsquo;s been running just fine until recently it stopped working.
I saw the logs and see a lot of &lt;code&gt;SocketException&lt;/code&gt; error messages like the one below.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Net&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WebException&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Unable&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;to&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;connect&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;to&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;the&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;remote&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;server&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;---&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Net&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Sockets&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SocketException&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Only&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;one&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;usage&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;of&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;each&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;socket&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;address&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;protocol&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;network&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;address&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;port&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;is&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;normally&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;permitted&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;127.0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0.1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;443&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;n&#34;&gt;at&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Net&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Sockets&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Socket&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;DoConnect&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;EndPoint&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;endPointSnapshot&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SocketAddress&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;socketAddress&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;n&#34;&gt;at&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Net&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ServicePoint&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ConnectSocketInternal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Boolean&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;connectFailure&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Socket&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;s4&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Socket&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;s6&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Socket&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;socket&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;IPAddress&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;address&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ConnectSocketState&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;state&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;IAsyncResult&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;asyncResult&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Exception&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;exception&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;So then I did a research and found a stackoverflow.com thread which have a simple explanation by &lt;a href=&#34;https://stackoverflow.com/users/111554/jrista&#34;&gt;jrista&lt;/a&gt; on why it happened.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Wrap Image with Figure Tag on Hugo without Shortcode</title>
      <link>https://www.junian.dev/dev/hugo-image-figure-wrap/</link>
      <pubDate>Sun, 05 Aug 2018 00:13:16 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/hugo-image-figure-wrap/</guid>
      <description>&lt;p&gt;Recently I&amp;rsquo;ve been thinking of migrating my blog from Blogger.com to a static site.
After doing some research I decided to use Hugo.&lt;/p&gt;
&lt;p&gt;One thing I like about Hugo is that they can produce a site from Markdown files.
Now this markdown file is following CommonMark spec by default, which is great.
But I have a case to always wrap images of my content inside a &lt;code&gt;figure&lt;/code&gt; tag.&lt;/p&gt;
&lt;p&gt;I actually can do this using Hugo &lt;a href=&#34;https://gohugo.io/content-management/shortcodes/#figure&#34;&gt;shortcode&lt;/a&gt;, but I don&amp;rsquo;t want to use that because I want to make sure my markdown files follow CommonMark spec. So it must be pure Markdown content with frontmatter, without filling it with a custom rule from Hugo.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CMake Version 3 Installation on Ubuntu 14.04</title>
      <link>https://www.junian.dev/dev/cmake3-ubuntu-14-04-installation/</link>
      <pubDate>Sat, 04 Aug 2018 10:25:08 +0700</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/cmake3-ubuntu-14-04-installation/</guid>
      <description>&lt;p&gt;Recently I&amp;rsquo;ve been trying to do research on &lt;a href=&#34;https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home&#34;&gt;OpenAirInterface&lt;/a&gt; using a LimeSDR.
Since I&amp;rsquo;m using their &lt;code&gt;master&lt;/code&gt; branch source code, I have to use the old Ubuntu 14.04.
For some reasons, I need to test it using the latest &lt;a href=&#34;https://wiki.myriadrf.org/Lime_Suite&#34;&gt;LimeSuite&lt;/a&gt; source code and compile it myself.&lt;/p&gt;
&lt;p&gt;One thing I realized when I did building process for LimeSuite, it throws an error saying that the installed &lt;code&gt;cmake&lt;/code&gt; version in the system doesn&amp;rsquo;t meet the requirements.
It needs &lt;code&gt;cmake&lt;/code&gt; version 3, but mine was version 2.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Can&#39;t Start Android Emulator on macOS? It&#39;s Probably Conflicting with Docker</title>
      <link>https://www.junian.dev/dev/android-emulator-docker-conflict-macos/</link>
      <pubDate>Mon, 05 Jun 2017 08:55:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/android-emulator-docker-conflict-macos/</guid>
      <description>&lt;p&gt;Weeks ago, when I was working on Android project, I noticed something unusual on my macOS machine. I couldn&amp;rsquo;t start my Android emulator. Every time I built the app, it just never showed up.&lt;/p&gt;
&lt;p&gt;I rarely use real phone to test my app since Google now provides best Android emulator experience. So that&amp;rsquo;s why I always use Android emulator as first solution to test my app. So this kind of problem really made me down.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Xamarin Mobile Apps Continuous Integration and Delivery with Jenkins and HockeyApp</title>
      <link>https://www.junian.dev/dev/xamarin-jenkins-hockeyapp/</link>
      <pubDate>Tue, 30 May 2017 09:38:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/xamarin-jenkins-hockeyapp/</guid>
      <description>&lt;p&gt;Laziness is probably the middle name of every programmer, especially when it comes to doing repetitive (usually) boring stuff, again and again. One of them is building app from latest source code.&lt;/p&gt;
&lt;p&gt;Traditionally, we commit our work, pull our colleague&amp;rsquo;s code, merge them, build the binary file, and send it to testers. Not sure how many times we do that stuff every day.&lt;/p&gt;
&lt;p&gt;Luckily, there is always a solution for that kind of repetitive task, by using Continuous Integration (CI) and Continuous Delivery (CD).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fullscreen Video Background Control for Xamarin.Forms</title>
      <link>https://www.junian.dev/dev/xamarin-forms-video-background/</link>
      <pubDate>Fri, 03 Mar 2017 07:17:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/xamarin-forms-video-background/</guid>
      <description>&lt;p&gt;One of the cool trend on mobile UI I&amp;rsquo;ve seen a lot is using video as View background. You can see it on some big mobile app products like Tumblr, Spotify, and Vine.
As you can see, they have this cool Home View with sign in and sing up button with video playing in background.
This feature is so cool and can make your app look more professional.&lt;/p&gt;
&lt;p&gt;This time, I&amp;rsquo;ll show you how to implement it in Xamarin.Forms app.
All we need is to implement two custom renderers for Android and iOS each.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#x1f3c6;
&lt;em&gt;Best Mobile Article of March 2017 : Second Prize at &lt;a href=&#34;https://web.archive.org/web/20241113224229/https://www.codeproject.com/Articles/1174042/Fullscreen-Video-Background-Control-for-Xamarin-Fo&#34;&gt;CodeProject&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;creating-video-view-control-for-xamarinforms&#34;&gt;Creating Video View Control for Xamarin.Forms&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s create a new Xamarin.Forms PCL project first and name it &lt;code&gt;BackgroundVideo&lt;/code&gt;. Now let&amp;rsquo;s head to the PCL library and create a new class called &lt;code&gt;Video&lt;/code&gt; inherited from &lt;code&gt;Xamarin.Forms.View&lt;/code&gt;.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Xamarin.Forms&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;namespace&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;BackgroundVideo.Controls&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Video&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;View&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;For the sake of the tutorial, we&amp;rsquo;re going to make this control with simple requirements.&lt;/p&gt;
&lt;!--adsense--&gt;
&lt;p&gt;We need a bindable property to point which video to be displayed. I&amp;rsquo;m going to call it &lt;code&gt;Source&lt;/code&gt; property. It&amp;rsquo;s a string to locate which video file to be played. On iOS, &lt;code&gt;Source&lt;/code&gt; property is relative to &lt;code&gt;Resources&lt;/code&gt; directory as for Android, it is relative to &lt;code&gt;Assets&lt;/code&gt; directory.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;static&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;readonly&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;BindableProperty&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SourceProperty&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;BindableProperty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Create&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;nameof&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Source&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;typeof&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;typeof&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Empty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;BindingMode&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TwoWay&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Source&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;get&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GetValue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SourceProperty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SetValue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SourceProperty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;Next thing we need is a boolean to define if we want the video in loop or not. Let&amp;rsquo;s call this property &lt;code&gt;Loop&lt;/code&gt;. By default, I set this value as &lt;code&gt;true&lt;/code&gt; so when you set a video &lt;code&gt;Source&lt;/code&gt; property, it would be looped by default.&lt;/p&gt;
&lt;p&gt;Finally, we&amp;rsquo;re going to need a callback fired when video is finished. For simplicity, I use &lt;code&gt;Action&lt;/code&gt; class called &lt;code&gt;OnFinishedPlaying&lt;/code&gt;. You can modify it to event or anything you comfortable with.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;static&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;readonly&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;BindableProperty&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;LoopProperty&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;BindableProperty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Create&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;nameof&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Loop&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;typeof&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;typeof&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kc&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;BindingMode&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TwoWay&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Loop&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;get&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GetValue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LoopProperty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SetValue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LoopProperty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Action&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnFinishedPlaying&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;After we created this class, next thing to do is to implement custom renderers for both iOS and Android.&lt;/p&gt;
&lt;h2 id=&#34;video-view-control-ios-custom-renderer&#34;&gt;Video View Control iOS Custom Renderer&lt;/h2&gt;
&lt;p&gt;First thing to do is to create a custom renderer class called &lt;code&gt;VideoRenderer&lt;/code&gt; inherited from &lt;code&gt;ViewRenderer&amp;lt;Video, UIView&amp;gt;&lt;/code&gt;. The idea is to use iOS native video player with the help of &lt;code&gt;MPMoviePlayerController&lt;/code&gt; class and set its native control to our &lt;code&gt;Video&lt;/code&gt; custom view. Also we&amp;rsquo;re going to need an &lt;code&gt;NSObject&lt;/code&gt; to listen the event from video player wether it is ended or not.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;System.IO&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;BackgroundVideo.Controls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;BackgroundVideo.iOS.Renderers&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Foundation&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;MediaPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;UIKit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Xamarin.Forms&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Xamarin.Forms.Platform.iOS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;[assembly: ExportRenderer(typeof(Video), typeof(VideoRenderer))]&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;namespace&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;BackgroundVideo.iOS.Renderers&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;VideoRenderer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ViewRenderer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;UIView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;MPMoviePlayerController&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;NSObject&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;notification&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;To start iOS video player, we need to check wether the video from &lt;code&gt;Source&lt;/code&gt; property exists in Resources budnle or not. If it doesn&amp;rsquo;t exist, we&amp;rsquo;ll display an empty view.&lt;/p&gt;
&lt;p&gt;If the video file exists, we need to create &lt;code&gt;MPMoviePlayerController&lt;/code&gt; and parse the location of the video file as &lt;code&gt;NSUrl&lt;/code&gt;. To make our custom control clear, without border or anything, we need to set &lt;code&gt;ControlStyle&lt;/code&gt; to &lt;code&gt;MPMovieControlStyle.None&lt;/code&gt; and background color to &lt;code&gt;UIColor.Clear&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Also, we probably will have one video file for any resolution. You don&amp;rsquo;t want it to look stretched on some device, right? To make the video resolution looks consistent, we need to set video player &lt;code&gt;ScalingMode&lt;/code&gt; to &lt;code&gt;MPMovieScalingMode.AspectFill&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We also have this &lt;code&gt;Loop&lt;/code&gt; property to define wether the video playing will be looped or not. To set it to loop, we need to change video player &lt;code&gt;RepeatMode&lt;/code&gt; to &lt;code&gt;MPMovieRepeatMode.One&lt;/code&gt;. Otherwise, set it to &lt;code&gt;MPMovieRepeatMode.None&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Finally, to make video player play the file, we call &lt;code&gt;PrepareToPlay()&lt;/code&gt; function. To display the video to our custom control, we need to use &lt;code&gt;SetNativeControl()&lt;/code&gt; function.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;InitVideoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;path&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Path&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Combine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;NSBundle&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MainBundle&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BundlePath&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Source&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(!&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;NSFileManager&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;DefaultManager&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;FileExists&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;path&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Video not exist&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMoviePlayerController&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ControlStyle&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMovieControlStyle&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;None&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ScalingMode&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMovieScalingMode&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AspectFill&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RepeatMode&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMovieRepeatMode&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;One&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;View&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BackgroundColor&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;UIColor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Clear&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;SetNativeControl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;View&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Load the video from the app bundle. &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;NSUrl&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;videoURL&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;NSUrl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;path&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Create and configure the movie player. &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMoviePlayerController&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;videoURL&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ControlStyle&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMovieControlStyle&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;None&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ScalingMode&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMovieScalingMode&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AspectFill&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RepeatMode&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Loop&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMovieRepeatMode&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;One&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMovieRepeatMode&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;None&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;View&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BackgroundColor&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;UIColor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Clear&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;foreach&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;UIView&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;subView&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;View&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Subviews&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;subView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BackgroundColor&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;UIColor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Clear&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PrepareToPlay&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;SetNativeControl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;View&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;The rest of the code is to override &lt;code&gt;OnElementChanged&lt;/code&gt; and &lt;code&gt;OnElementPropertyChanged&lt;/code&gt; function so it can be functionally working from Xamarin.Forms project. Under &lt;code&gt;OnElementChanged&lt;/code&gt;, we need to listen to video player playback finish event and invoke &lt;code&gt;OnFinishedPlaying&lt;/code&gt; action. The following snippet is the simplest code necessary to make it work.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;protected&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;override&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnElementChanged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ElementChangedEventArgs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;base&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OnElementChanged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Control&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;InitVideoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OldElement&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;c1&#34;&gt;// Unsubscribe  &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;notification&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;?.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Dispose&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;NewElement&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;c1&#34;&gt;// Subscribe  &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;notification&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMoviePlayerController&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Notifications&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ObservePlaybackDidFinish&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sender&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;cm&#34;&gt;/* Access strongly typed args */&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Notification: {0}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Notification&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;FinishReason: {0}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;FinishReason&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;?.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OnFinishedPlaying&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;?.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Invoke&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;protected&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;override&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnElementPropertyChanged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;object&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;sender&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ComponentModel&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PropertyChangedEventArgs&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;base&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OnElementPropertyChanged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sender&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Control&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PropertyName&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SourceProperty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PropertyName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;InitVideoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PropertyName&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LoopProperty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PropertyName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;liveImage&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;as&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RepeatMode&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Loop&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMovieRepeatMode&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;One&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MPMovieRepeatMode&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;None&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;Now that iOS implementation is completed, let&amp;rsquo;s head to our Android project.&lt;/p&gt;
&lt;h2 id=&#34;video-view-custom-renderer-for-android&#34;&gt;Video View Custom Renderer for Android&lt;/h2&gt;
&lt;p&gt;Create a new custom renderer on Android project and let&amp;rsquo;s name it &lt;code&gt;VideoRenderer&lt;/code&gt;, too. We&amp;rsquo;ll inherit this renderer with &lt;code&gt;ViewRenderer&amp;lt;Video, FrameLayout&amp;gt;&lt;/code&gt;, meaning it will be displayed as &lt;code&gt;FrameLayout&lt;/code&gt; in native Android control.&lt;/p&gt;
&lt;p&gt;One thing that made Android implementation a bit complicated is that we need two kind of views if you want to cover old Android versions. If you just want to cover modern Android OS from Ice Cream Sandwich or more, you can just focus on &lt;code&gt;TextureView&lt;/code&gt; implementation, if not you&amp;rsquo;ll also need to implement it using &lt;code&gt;VideoView&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Please note that &lt;code&gt;VideoView&lt;/code&gt; implementation here is not optimal. Maybe you&amp;rsquo;ll notice some flickering. That&amp;rsquo;s why I add view called &lt;code&gt;_placeholder&lt;/code&gt;. This is just an empty view. It&amp;rsquo;ll be displayed when no video playing or when in video source changed transition. If the video file ready to play and display, &lt;code&gt;_placeholder&lt;/code&gt; will be hidden.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Android.Graphics&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Android.Graphics.Drawables&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Android.Media&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Android.OS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Android.Runtime&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Android.Views&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Android.Widget&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;BackgroundVideo.Controls&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;BackgroundVideo.Droid.Renderers&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Xamarin.Forms&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;Xamarin.Forms.Platform.Android&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;[assembly: ExportRenderer(typeof(Video), typeof(VideoRenderer))]&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;namespace&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;BackgroundVideo.Droid.Renderers&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;VideoRenderer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ViewRenderer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;FrameLayout&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;,&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                 &lt;span class=&#34;n&#34;&gt;TextureView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ISurfaceTextureListener&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                 &lt;span class=&#34;n&#34;&gt;ISurfaceHolderCallback&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_isCompletionSubscribed&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;FrameLayout&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_mainFrameLayout&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Android&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Views&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;View&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_mainVideoView&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Android&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Views&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;View&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_placeholder&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;Now before we thing about what video container to use, we need to implement the video player itself. Android already provide us with their &lt;code&gt;MediaPlayer&lt;/code&gt; class. We&amp;rsquo;ll need to use this object and make sure it only created once. We can reuse the same object if we change the video source.&lt;/p&gt;
&lt;p&gt;We need to set &lt;code&gt;Completion&lt;/code&gt; event to implement our &lt;code&gt;OnFinishedPlaying&lt;/code&gt; callback. We also need to set &lt;code&gt;Looping&lt;/code&gt; property to our custom &lt;code&gt;Loop&lt;/code&gt; property.&lt;/p&gt;
&lt;p&gt;There is one thing that different from our iOS implementation, there is no easy property set to display video resolution as aspect fill! That means we need to implement our own method into custom function called &lt;code&gt;AdjustTextureViewAspect()&lt;/code&gt;. This function will be called on &lt;code&gt;VideoSizeChanged&lt;/code&gt; callback. We&amp;rsquo;ll talk about this implementation later.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MediaPlayer&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;internal&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MediaPlayer&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;VideoPlayer&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;get&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MediaPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(!&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_isCompletionSubscribed&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;_isCompletionSubscribed&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Completion&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Player_Completion&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;VideoSizeChanged&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sender&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;AdjustTextureViewAspect&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Info&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sender&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;onInfo what={0}, extra={1}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;What&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Extra&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;What&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;MediaInfo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;VideoRenderingStart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;[MEDIA_INFO_VIDEO_RENDERING_START] placeholder GONE&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;n&#34;&gt;_placeholder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Visibility&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ViewStates&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Gone&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Prepared&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sender&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;_mainVideoView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Visibility&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ViewStates&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Visible&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Start&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Looping&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Loop&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Player_Completion&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;object&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;sender&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;EventArgs&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;?.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OnFinishedPlaying&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;?.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Invoke&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;Now that we have our video player object, next thing is to create function that play video from &lt;code&gt;Source&lt;/code&gt; property. Please remember that video file on Android need to be stored under &lt;code&gt;Assets&lt;/code&gt; directory. We can open this file by using &lt;code&gt;Assets.OpenFd(fullPath)&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;If the file doesn&amp;rsquo;t exist, it&amp;rsquo;ll throw &lt;code&gt;Java.IO.IOException&lt;/code&gt;. That means we don&amp;rsquo;t need to display anything on our video container.&lt;/p&gt;
&lt;p&gt;If the file exists, we just need to reset our video player, then set data source based on previous step. We can&amp;rsquo;t just play the video directly, so we need to prepare it first. When preparation complete, it&amp;rsquo;ll trigger &lt;code&gt;Prepared&lt;/code&gt; event and display the video to one of our implemented video view from previous step.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;PlayVideo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;fullPath&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;Android&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Content&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Res&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AssetFileDescriptor&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;afd&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;try&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;afd&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Context&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Assets&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OpenFd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;fullPath&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;catch&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Java&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;IO&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;IOException&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ex&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Play video: &amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Source&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34; not found because &amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ex&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;_mainVideoView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Visibility&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ViewStates&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Gone&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;catch&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Exception&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ex&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Error openfd: &amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ex&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;_mainVideoView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Visibility&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ViewStates&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Gone&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;afd&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Lenght &amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;afd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;VideoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Reset&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;VideoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SetDataSource&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;afd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;FileDescriptor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;afd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;StartOffset&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;afd&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;VideoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PrepareAsync&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;As previously mentioned, Android doesn&amp;rsquo;t provide us easy property to scale our video to aspect fill. You know it yourself that Android devices have so many screen resolution so keep the video like it is is not an option. We need to scale it properly so it won&amp;rsquo;t look stretched.&lt;/p&gt;
&lt;p&gt;Good news is, we can do that if we use &lt;code&gt;TextureView&lt;/code&gt;. Bad news is for now I don&amp;rsquo;t know how to implement it with &lt;code&gt;VideoView&lt;/code&gt;. But it&amp;rsquo;s better than nothing right?&lt;/p&gt;
&lt;p&gt;The idea to make video scale properly is to use matrix to scale the content of &lt;code&gt;TextureView&lt;/code&gt;. It is scaled up or down based on video size and view size. Then, after it&amp;rsquo;s scaled, it is positioned at the center of the view.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;AdjustTextureViewAspect&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;videoWidth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;videoHeight&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(!(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_mainVideoView&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;is&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;TextureView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Control&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;control&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Control&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;textureView&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_mainVideoView&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;as&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;TextureView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;controlWidth&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;control&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;controlHeight&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;control&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;aspectRatio&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;double&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;videoHeight&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;videoWidth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;newWidth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;newHeight&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;controlHeight&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;controlWidth&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;aspectRatio&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// limited by narrow width; restrict height  &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;newWidth&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;controlWidth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;newHeight&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;controlWidth&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;aspectRatio&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// limited by short height; restrict width  &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;newWidth&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;controlHeight&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;aspectRatio&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;newHeight&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;controlHeight&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;xoff&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;controlWidth&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;newWidth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;yoff&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;controlHeight&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;newHeight&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;video=&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;videoWidth&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;x&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;videoHeight&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;s&#34;&gt;&amp;#34; view=&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;controlWidth&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;x&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;controlHeight&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;s&#34;&gt;&amp;#34; newView=&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;newWidth&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;x&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;newHeight&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;s&#34;&gt;&amp;#34; off=&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;xoff&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;,&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;yoff&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;txform&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Matrix&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;textureView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GetTransform&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;txform&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;txform&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SetScale&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;newWidth&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;controlWidth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;newHeight&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;controlHeight&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;txform&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PostTranslate&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;xoff&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;yoff&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;textureView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SetTransform&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;txform&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;As mentioned earlier, if we want to support a wide range of Android OS, we need to implement it into &lt;code&gt;TextureView&lt;/code&gt; and &lt;code&gt;VideoView&lt;/code&gt;. This will be implemented under &lt;code&gt;OnElementChanged&lt;/code&gt; function. Both implementation have some same properties. We will make their Background color to transparent and layout parameters to match parent. This way it won&amp;rsquo;t have any color to display when there is no video, and it&amp;rsquo;ll fill entire container.&lt;/p&gt;
&lt;p&gt;Following snippet is how to implement it on our Video custom renderer. You see it&amp;rsquo;s similar with our iOS implementation, except for container creation and video playing.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;protected&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;override&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnElementChanged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ElementChangedEventArgs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;base&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OnElementChanged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Control&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;_mainFrameLayout&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;FrameLayout&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Context&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;_placeholder&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Android&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Views&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;View&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Context&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;Background&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ColorDrawable&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Xamarin&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Forms&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Transparent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ToAndroid&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;LayoutParameters&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;LayoutParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;ViewGroup&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LayoutParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MatchParent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;ViewGroup&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LayoutParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MatchParent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Build&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;VERSION&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SdkInt&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;BuildVersionCodes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;IceCreamSandwich&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Using VideoView&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;videoView&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;VideoView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Context&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;Background&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ColorDrawable&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Xamarin&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Forms&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Transparent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ToAndroid&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;Visibility&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ViewStates&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Gone&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;LayoutParameters&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;LayoutParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;n&#34;&gt;ViewGroup&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LayoutParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MatchParent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;n&#34;&gt;ViewGroup&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LayoutParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MatchParent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;ISurfaceHolder&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;holder&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;videoView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Holder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Build&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;VERSION&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SdkInt&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;BuildVersionCodes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Honeycomb&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;holder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SetType&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SurfaceType&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PushBuffers&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;holder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AddCallback&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;_mainVideoView&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;videoView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Using TextureView&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;textureView&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;TextureView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Context&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;Background&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ColorDrawable&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Xamarin&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Forms&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Transparent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ToAndroid&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;Visibility&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ViewStates&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Gone&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;LayoutParameters&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;LayoutParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;n&#34;&gt;ViewGroup&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LayoutParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MatchParent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;n&#34;&gt;ViewGroup&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LayoutParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;MatchParent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;textureView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SurfaceTextureListener&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;_mainVideoView&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;textureView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;_mainFrameLayout&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AddView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_mainVideoView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;_mainFrameLayout&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AddView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_placeholder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;SetNativeControl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_mainFrameLayout&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;PlayVideo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Source&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OldElement&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Unsubscribe  &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_isCompletionSubscribed&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;_isCompletionSubscribed&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Completion&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;-=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Player_Completion&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;NewElement&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Subscribe  &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_isCompletionSubscribed&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;_isCompletionSubscribed&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;n&#34;&gt;_videoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Completion&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Player_Completion&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;protected&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;override&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnElementPropertyChanged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;object&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;sender&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ComponentModel&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PropertyChangedEventArgs&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;base&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OnElementPropertyChanged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sender&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Control&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PropertyName&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SourceProperty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PropertyName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Play video: &amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Source&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;PlayVideo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Source&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PropertyName&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LoopProperty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PropertyName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Is Looping? &amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Loop&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;VideoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Looping&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Loop&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;Since we&amp;rsquo;re using &lt;code&gt;TextureView&lt;/code&gt; and &lt;code&gt;VideoView&lt;/code&gt;, there is some function from interfaces need to be implemented. One of them is to remove video when texture or surface is destroyed. To do that, we&amp;rsquo;re going to need to set &lt;code&gt;_placeholder&lt;/code&gt; visibility to visible.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;RemoveVideo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;_placeholder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Visibility&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ViewStates&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Visible&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;When using &lt;code&gt;TextureView&lt;/code&gt;, we need to implement &lt;code&gt;TextureView.ISurfaceTextureListener&lt;/code&gt; interface. We set video player&amp;rsquo;s surface when texture available and hide it when texture destroyed. Following snippet shows you how to implement it.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#region&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Surface&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Texture&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Listener&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnSurfaceTextureAvailable&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SurfaceTexture&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;surface&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Surface.TextureAvailable&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;VideoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SetSurface&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Surface&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;surface&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;));&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnSurfaceTextureDestroyed&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SurfaceTexture&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;surface&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Surface.TextureDestroyed&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;RemoveVideo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnSurfaceTextureSizeChanged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SurfaceTexture&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;surface&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Surface.TextureSizeChanged&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OnSurfaceTextureUpdated&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SurfaceTexture&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;surface&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Surface.TextureUpdated&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#endregion&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;When using &lt;code&gt;VideoView&lt;/code&gt;, we need to implement &lt;code&gt;ISurfaceHolderCallback&lt;/code&gt; interface. Similar with &lt;code&gt;TextureView&lt;/code&gt;, we set video player&amp;rsquo;s display when surface created and hide it when surface destroyed. The complete implementation of this interface can be see on following snippet.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#region&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Surface&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Holder&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Callback&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SurfaceChanged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ISurfaceHolder&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;holder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GeneratedEnum&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Format&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;format&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Surface.Changed&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SurfaceCreated&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ISurfaceHolder&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;holder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Surface.Created&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;VideoPlayer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SetDisplay&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;holder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SurfaceDestroyed&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ISurfaceHolder&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;holder&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;Console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;WriteLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Surface.Destroyed&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;RemoveVideo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#endregion&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;That&amp;rsquo;s all we need for Android. Now that we all have everything needed, we can test this control to Xamarin.Forms Page.&lt;/p&gt;
&lt;h2 id=&#34;testing-to-xamarinforms-page&#34;&gt;Testing to Xamarin.Forms Page&lt;/h2&gt;
&lt;p&gt;Before we create a test page, I recommend you to prepare your own video file. It is recommended as vertical video so a lot of space won&amp;rsquo;t be wasted.&lt;/p&gt;
&lt;p&gt;But, if you don&amp;rsquo;t have any video to test, don&amp;rsquo;t worry. You can download free videos to use from &lt;a href=&#34;https://coverr.co&#34;&gt;Coverr&lt;/a&gt;. They don&amp;rsquo;t have any vertical videos, we can still use it. You can either crop it into vertical video or you can just use it as it is since we already handle scaling to aspect fill on our code.&lt;/p&gt;
&lt;p&gt;So use any video you like. I recommend any file as long as it&amp;rsquo;s mp4 video with h264 encoding. In this tutorial, I use video from Coverr called &lt;strong&gt;Orchestra&lt;/strong&gt;. You can download it from &lt;a href=&#34;https://coverr.co/s3/zip/Orchestra.zip&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;
&lt;em&gt;For some Android and iOS devices, especially the old products, they probably can&amp;rsquo;t play some mp4 files. This is mostly caused by not-supported baseline profile. To fix that, you can re-encode the video using a tool like &lt;code&gt;ffmpeg&lt;/code&gt; and change its baseline profile based on your preferences. See following table to check baseline profile compatibility with iOS. See &lt;a href=&#34;https://developer.android.com/guide/topics/media/media-formats.html&#34;&gt;Supported Media Formats&lt;/a&gt; from official Android guide, too.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure&gt;
  &lt;div class=&#34;table-responsive&#34;&gt;
    &lt;table class=&#34;table table-bordered table-striped&#34;&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;strong&gt;Profile&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;Level&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;Devices&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;Options&lt;/strong&gt;&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;Baseline&lt;/td&gt;
          &lt;td&gt;3.0&lt;/td&gt;
          &lt;td&gt;All devices&lt;/td&gt;
          &lt;td&gt;&lt;tt&gt;-profile:v baseline -level 3.0&lt;/tt&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;Baseline&lt;/td&gt;
          &lt;td&gt;3.1&lt;/td&gt;
          &lt;td&gt;iPhone 3G and later, iPod touch 2nd generation and later&lt;/td&gt;
          &lt;td&gt;&lt;tt&gt;-profile:v baseline -level 3.1&lt;/tt&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;Main&lt;/td&gt;
          &lt;td&gt;3.1&lt;/td&gt;
          &lt;td&gt;iPad (all versions), Apple TV 2 and later, iPhone 4 and later&lt;/td&gt;
          &lt;td&gt;&lt;tt&gt;-profile:v main -level 3.1&lt;/tt&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;Main&lt;/td&gt;
          &lt;td&gt;4.0&lt;/td&gt;
          &lt;td&gt;Apple TV 3 and later, iPad 2 and later, iPhone 4s and later&lt;/td&gt;
          &lt;td&gt;&lt;tt&gt;-profile:v main -level 4.0&lt;/tt&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;High&lt;/td&gt;
          &lt;td&gt;4.0&lt;/td&gt;
          &lt;td&gt;Apple TV 3 and later, iPad 2 and later, iPhone 4s and later&lt;/td&gt;
          &lt;td&gt;&lt;tt&gt;-profile:v high -level 4.0&lt;/tt&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;High&lt;/td&gt;
          &lt;td&gt;4.1&lt;/td&gt;
          &lt;td&gt;iPad 2 and later, iPhone 4s and later, iPhone 5c and later&lt;/td&gt;
          &lt;td&gt;&lt;tt&gt;-profile:v high -level 4.1&lt;/tt&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;High&lt;/td&gt;
          &lt;td&gt;4.2&lt;/td&gt;
          &lt;td&gt;iPad Air and later, iPhone 5s and later&lt;/td&gt;
          &lt;td&gt;&lt;tt&gt;-profile:v high -level 4.2&lt;/tt&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
  &lt;figcaption class=&#34;caption text-muted&#34;&gt;h.264 baseline profiles for iOS. Source: &lt;a href=&#34;https://trac.ffmpeg.org/wiki/Encode/H.264&#34; rel=&#34;nofollow noreferrer&#34;&gt;ffmpeg&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;After you get your video file, place it to the folders for each OS. On Android, you should put it under &lt;code&gt;Assets&lt;/code&gt; directory. On iOS, you should put it under &lt;code&gt;Resources&lt;/code&gt; directory. For this tutorial I put the file under &lt;code&gt;Assets/Videos&lt;/code&gt; on Android and &lt;code&gt;Resources/Videos&lt;/code&gt; on iOS.&lt;/p&gt;
&lt;p&gt;Once you put them all to correct folder, we need to create our Page on Xamarin.Forms PCL project.&lt;/p&gt;
&lt;p&gt;This is a simple page with smallest components. We&amp;rsquo;ll create a Home Page, with video background, two text boxes for username and password, and to buttons for sign in and sign up. There is no logic in this page, I just want to show you how to make a beautiful home page.&lt;/p&gt;
&lt;p&gt;For better controls placement, I use Grid as container. See following snippet for the complete XAML.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;ContentPage&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;xmlns=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;http://xamarin.com/schemas/2014/forms&amp;#34;&lt;/span&gt;   
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;na&#34;&gt;xmlns:x=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;http://schemas.microsoft.com/winfx/2009/xaml&amp;#34;&lt;/span&gt;   
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;na&#34;&gt;xmlns:local=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;clr-namespace:BackgroundVideo&amp;#34;&lt;/span&gt;   
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;na&#34;&gt;xmlns:controls=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;clr-namespace:BackgroundVideo.Controls&amp;#34;&lt;/span&gt;   
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;na&#34;&gt;x:Class=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;BackgroundVideo.BackgroundVideoPage&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;Grid&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Padding=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;RowSpacing=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;ColumnSpacing=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;lt;controls:Video&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;x:Name=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;video&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Source=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Videos/Orchestra.mp4&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Loop=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;true&amp;#34;&lt;/span&gt;   
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;na&#34;&gt;HorizontalOptions=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Fill&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;VerticalOptions=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Fill&amp;#34;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;lt;StackLayout&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;VerticalOptions=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Center&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;HorizontalOptions=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;FillAndExpand&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Padding=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;20,10,10,20&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;lt;Entry&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Placeholder=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;username&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;FontSize=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Large&amp;#34;&lt;/span&gt;   
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;na&#34;&gt;FontFamily=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Georgia&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;HeightRequest=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;50&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;Entry.PlaceholderColor&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;nt&#34;&gt;&amp;lt;OnPlatform&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;x:TypeArguments=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Color&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Android=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Silver&amp;#34;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;/Entry.PlaceholderColor&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;Entry.TextColor&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;nt&#34;&gt;&amp;lt;OnPlatform&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;x:TypeArguments=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Color&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Android=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;White&amp;#34;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;/Entry.TextColor&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;lt;/Entry&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;lt;Entry&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Placeholder=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;password&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;FontSize=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Large&amp;#34;&lt;/span&gt;   
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;na&#34;&gt;FontFamily=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Georgia&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;HeightRequest=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;50&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;IsPassword=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;true&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;Entry.PlaceholderColor&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;nt&#34;&gt;&amp;lt;OnPlatform&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;x:TypeArguments=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Color&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Android=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Silver&amp;#34;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;/Entry.PlaceholderColor&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;Entry.TextColor&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;nt&#34;&gt;&amp;lt;OnPlatform&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;x:TypeArguments=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Color&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Android=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;White&amp;#34;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;/Entry.TextColor&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;lt;/Entry&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;lt;BoxView&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Color=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Transparent&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;HeightRequest=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;10&amp;#34;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Text=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;sign in&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;BackgroundColor=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;#3b5998&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;TextColor=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;#ffffff&amp;#34;&lt;/span&gt;   
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;na&#34;&gt;FontSize=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Large&amp;#34;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;lt;Button&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Text=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;sign up&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;BackgroundColor=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;#fa3c4c&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;TextColor=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;#ffffff&amp;#34;&lt;/span&gt;   
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;na&#34;&gt;FontSize=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Large&amp;#34;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;lt;/StackLayout&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;/Grid&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/ContentPage&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;That&amp;rsquo;s it. If you don&amp;rsquo;t want the video to be looped, just change its &lt;code&gt;Loop&lt;/code&gt; property. If you want to do something when video ended, just set &lt;code&gt;OnFinishedPlaying&lt;/code&gt; from C# code. Now let&amp;rsquo;s see how it runs.&lt;/p&gt;
&lt;h2 id=&#34;see-it-in-action&#34;&gt;See it in Action&lt;/h2&gt;
&lt;p&gt;If you set everything correctly, The following figure is how it run on iOS device or emulator. As you can see, there are two text boxes and two buttons. The video is playing as the page background smoothly.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src=&#34;https://1.bp.blogspot.com/-BPhUGnz5MXs/WKSFn_fwZqI/AAAAAAAACnY/sZVnlO04W34kKSfjCWoJK0L0jbd2YIU7gCLcB/s1600/xamarin-ios-background-video-demo.gif&#34; alt=&#34;Xamarin iOS Background Video Demo&#34; title=&#34;Xamarin iOS Background Video Demo&#34;loading=&#34;lazy&#34;
    &gt;&lt;figcaption&gt;Xamarin iOS Background Video Demo&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;Similar with iOS version, the following animated gif image shows how it looks on Android device or emulator. See that text box style difference from iOS version. But let&amp;rsquo;s care about it later, the point is video background consistently work just like iOS.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src=&#34;https://2.bp.blogspot.com/-EbsuH4CM_Sw/WKSF7QDdVjI/AAAAAAAACnc/gsu8JykbrBYWHRaaMxtw6mOQ7yyj8gjLQCLcB/s1600/xamarin-android-background-video-demo.gif&#34; alt=&#34;Xamarin Android Background Video Demo&#34; title=&#34;Xamarin Android Background Video Demo&#34;loading=&#34;lazy&#34;
    &gt;&lt;figcaption&gt;Xamarin Android Background Video Demo&lt;/figcaption&gt;&lt;/figure&gt;&lt;p&gt;All you need to do the rest is to make styling more consistent through any platforms.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;
&lt;p&gt;Once again, all I can say is you can make any cross platform control you want by using Custom Renderer. As long as you understand how to code in native language (well, you can Google it though), you can create anything.&lt;/p&gt;
&lt;p&gt;As for performance, I believe I said it earlier, you probably see some flickering on old Android devices. For now I don&amp;rsquo;t have any idea to optimize it.&lt;/p&gt;
&lt;p&gt;If you have any idea and suggestion, feel free to leave a comment below.&lt;/p&gt;
&lt;p&gt;You can download &lt;a href=&#34;https://github.com/juniandotnet/xamarin-background-video&#34;&gt;completed project on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://trac.ffmpeg.org/wiki/Encode/H.264&#34;&gt;Encode/H.264&lt;/a&gt; – FFmpeg&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://forums.xamarin.com/discussion/40580/play-video-in-background-like-spotify-using-xamarin-forms-and-android-renderer&#34;&gt;Play video in background (like spotify) using xamarin forms and android renderer&lt;/a&gt; - Xamarin Community Forums&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://brightinventions.pl/blog/frame-video-view/&#34;&gt;How to avoid flickering and black screen issues when using VideoView?&lt;/a&gt; | Bright Inventions&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://medium.com/@kschaller/ios-video-backgrounds-6eead788f190&#34;&gt;iOS Video Backgrounds&lt;/a&gt; – Kai Schaller – Medium&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Simple Custom Fonts Helper in Xamarin.Forms for Android</title>
      <link>https://www.junian.dev/dev/xamarin-forms-android-custom-font/</link>
      <pubDate>Thu, 09 Feb 2017 07:33:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/xamarin-forms-android-custom-font/</guid>
      <description>&lt;p&gt;When creating a mobile app, we want it to look great. Not just by design but also typography great. Xamarin.Forms already provide custom font mechanism. But I don&amp;rsquo;t see it efficient enough because it has to be declared differently for each platform. Look at the example snippet below.&lt;/p&gt;

&lt;figure class=&#34;highlight&#34;&gt;
    &lt;button class=&#34;btn-clipboard chroma&#34; title=&#34;Copy to clipboard&#34;&gt;&lt;i class=&#34;fa icon-clipboard&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 24 24&#34; class=&#34;feather feather-copy&#34;&gt;&lt;rect x=&#34;9&#34; y=&#34;9&#34; width=&#34;13&#34; height=&#34;13&#34; rx=&#34;2&#34; ry=&#34;2&#34;/&gt;&lt;path d=&#34;M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1&#34;/&gt;&lt;/svg&gt;&lt;/i&gt;&lt;span class=&#34;msg-clipboard&#34;&gt;&lt;/span&gt;&lt;/button&gt;
    &lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;Label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;Text=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Hello Forms with XAML&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;lt;Label.FontFamily&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;OnPlatform&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;x:TypeArguments=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;x:String&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nt&#34;&gt;&amp;lt;OnPlatform.iOS&amp;gt;&lt;/span&gt;Oswald-Regular&lt;span class=&#34;nt&#34;&gt;&amp;lt;/OnPlatform.iOS&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nt&#34;&gt;&amp;lt;OnPlatform.Android&amp;gt;&lt;/span&gt;Oswald-Regular.ttf#Oswald-Regular&lt;span class=&#34;nt&#34;&gt;&amp;lt;/OnPlatform.Android&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nt&#34;&gt;&amp;lt;OnPlatform.WinPhone&amp;gt;&lt;/span&gt;Assets/Fonts/Oswald-Regular.ttf#Oswald&lt;span class=&#34;nt&#34;&gt;&amp;lt;/OnPlatform.WinPhone&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nt&#34;&gt;&amp;lt;/OnPlatform&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;lt;/Label.FontFamily&amp;gt;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/Label&amp;gt;&lt;/span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
    
&lt;/figure&gt;&lt;p&gt;See that how for each platform it&amp;rsquo;s different string. On iOS, you just need to set font name. As for Android and WinPhone you need to declare path to font file and font name. All I want to do is to just call the font name like iOS does and for every platform it&amp;rsquo;ll render correctly like following snippet.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How To Play Audio Files in Xamarin.Forms</title>
      <link>https://www.junian.dev/dev/xamarin-forms-play-audio/</link>
      <pubDate>Wed, 08 Feb 2017 12:25:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/xamarin-forms-play-audio/</guid>
      <description>&lt;p&gt;Audio, sound, or music can be essential part of mobile apps.
Unfortunately, Xamarin.Forms doesn&amp;rsquo;t support this directly from their API.
But of course, it can be implemented easily by using &lt;code&gt;DependencyService&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This time I&amp;rsquo;ll show you how to implement this Audio Player in Xamarin.Forms with the help of &lt;code&gt;DependencyService&lt;/code&gt;.
Also, I&amp;rsquo;ll show you how to integrate it using simple MVVM Pattern.&lt;/p&gt;
&lt;p&gt;First thing first, create a new Xamarin.Forms Solution.&lt;/p&gt;
&lt;p&gt;Use Portable Class library and XAML for user interface.
Let&amp;rsquo;s name this solution &lt;code&gt;AudioPlayer&lt;/code&gt;.
Now that we&amp;rsquo;ve created a new solution, we&amp;rsquo;ll have three projects: Portable Library, iOS, and Android.
We&amp;rsquo;ll implement one by one starting from our core Portable Library.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Running Your First ASP.NET Core Web App with MySQL on Ubuntu 16.04</title>
      <link>https://www.junian.dev/dev/aspnet-core-mysql-ubuntu-16-04/</link>
      <pubDate>Tue, 24 Jan 2017 09:15:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/aspnet-core-mysql-ubuntu-16-04/</guid>
      <description>&lt;p&gt;Since Microsoft open sourcing their .NET Platform, which is called .NET Core, they stole my attention again. I always love using .NET Framework. I develop desktop apps using it. I develop mobile apps using Xamarin. But I rarely use its web platform for one simple reason, it requires Windows-based Server to run.&lt;/p&gt;
&lt;p&gt;Now that Microsoft and community actively develop its framework for cross-platform environment, I stumble upon and see the latest stable build which is version 1.1. I read their blog and found out about news that ASP.NET Core 1.1 with Kestrel was ranked as the fastest mainstream fullstack web framework in the &lt;a href=&#34;https://aka.ms/techempower&#34;&gt;TechEmpower plaintext benchmark&lt;/a&gt;. That&amp;rsquo;s such a nice claim and gave me attention to try their product.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Record Twitch Streams Automatically in Python</title>
      <link>https://www.junian.dev/dev/python-record-twitch/</link>
      <pubDate>Thu, 19 Jan 2017 10:56:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/python-record-twitch/</guid>
      <description>&lt;p&gt;Let&amp;rsquo;s say you like to watch people playing game. Or maybe you like to study a game strategy from someone else. Or maybe you just find a player funny while playing a game. Of course you&amp;rsquo;re going to search those videos on Internet. Some videos are streamable at any time, like YouTube videos, but some are just live stream with a certain schedule, like Twitch.&lt;/p&gt;
&lt;p&gt;If it&amp;rsquo;s streamable anytime, it&amp;rsquo;s not a problem because we can watch it anytime we want. But what if it&amp;rsquo;s a live stream and you&amp;rsquo;re busy, or at work, or at other place that make you can&amp;rsquo;t watch video right at the time. By the time you&amp;rsquo;re home and plan to watch the video, it probably has ended.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Camera Face Detection in C# using Emgu CV and WPF</title>
      <link>https://www.junian.dev/dev/csharp-emgucv-camera-face-detection/</link>
      <pubDate>Thu, 29 Dec 2016 09:49:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/csharp-emgucv-camera-face-detection/</guid>
      <description>&lt;p&gt;Hi there, this is a new tutorial category in my blog. It&amp;rsquo;s Computer Vision. In this blog, I&amp;rsquo;d like to show you something cool. It&amp;rsquo;s how to perform Face Detection using your camera or Webcam. You&amp;rsquo;ll see how your application can detect faces from a captured image. Curious about it? Let&amp;rsquo;s take a look how to do that.&lt;/p&gt;
&lt;p&gt;This what you need to follow this tutorial:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Microsoft Visual Studio 2010. Or if you don&amp;rsquo;t have one, you can use 2008 version.&lt;/li&gt;
&lt;li&gt;Emgu CV (OpenCV in .NET). You can download the latest version in this link: &lt;a href=&#34;https://www.emgu.com/wiki/index.php/Main_Page&#34;&gt;www.emgu.com/wiki/index.php/Main_Page&lt;/a&gt; and follow the installation instruction.&lt;/li&gt;
&lt;li&gt;Basic Knowledge of C# Programming.&lt;/li&gt;
&lt;li&gt;Familiar in WPF Development.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After you&amp;rsquo;ve got what you need, it&amp;rsquo;s time to rock!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Simple HTTP Web Server and Client in Python</title>
      <link>https://www.junian.dev/dev/python-http-server-client/</link>
      <pubDate>Tue, 20 Dec 2016 13:49:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/python-http-server-client/</guid>
      <description>&lt;p&gt;This time I&amp;rsquo;d like to show you how to make a simple HTTP server and client in python.
It&amp;rsquo;s a bit different from other tutorials I&amp;rsquo;ve ever wrote and I&amp;rsquo;d like to say that I&amp;rsquo;m also a beginner in python.
But, I&amp;rsquo;ll try to make sure you understand what I wrote because this tutorial is easy.&lt;/p&gt;
&lt;p&gt;First, you need to know what HTTP is.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems.
HTTP is the foundation of data communication for the World Wide Web.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Load External Image into WPF using OpenFileDialog</title>
      <link>https://www.junian.dev/dev/wpf-load-external-image/</link>
      <pubDate>Tue, 13 Dec 2016 13:31:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/wpf-load-external-image/</guid>
      <description>&lt;p&gt;This is my first time I made a tutorial about WPF. I don’t think it’s a new technique, but I just want to share what I learned at home. I assume that you understand WPF a little bit. In this tutorial I’d like to show you how to load external image into WPF using &lt;code&gt;OpenFileDialog&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;step-1&#34;&gt;Step 1&lt;/h2&gt;
&lt;p&gt;Create a new WPF Project, &lt;em&gt;File&lt;/em&gt; → &lt;em&gt;New&lt;/em&gt; → &lt;em&gt;Project&amp;hellip;&lt;/em&gt; and chose &lt;em&gt;WPF Application&lt;/em&gt; (by the way, I’m using Visual Studio 2008 in this tutorial). You’ll see an empty window called &lt;code&gt;Window1.xaml&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Password Encryption using MD5 Hash Algorithm in C#</title>
      <link>https://www.junian.dev/dev/csharp-md5/</link>
      <pubDate>Thu, 08 Dec 2016 09:57:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/csharp-md5/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Update (Sep 14, 2018)&lt;/strong&gt;:
&lt;em&gt;The new &lt;a href=&#34;https://www.junian.dev/csharp-string-hash/&#34;&gt;complete string hash algorithms in C#&lt;/a&gt; tutorial is available.&lt;/em&gt;
&lt;em&gt;I would suggest not to use MD5 anymore, because it&amp;rsquo;s not safe and easily collide.&lt;/em&gt;
&lt;em&gt;But I&amp;rsquo;ll leave the original tutorial here for educational purpose.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It’s really bad if someone knew your password.
As a software developer, we have an ethic that we also don’t want to see other’s password.
Which mean, storing password in a plain text is a nope.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How To Make A 2D Animation using Timer with C&#43;&#43; .NET</title>
      <link>https://www.junian.dev/dev/cpp-dotnet-2d-animation/</link>
      <pubDate>Tue, 06 Dec 2016 21:09:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/cpp-dotnet-2d-animation/</guid>
      <description>&lt;p&gt;On my last post (&lt;a href=&#34;https://www.junian.dev/2014/07/how-to-draw-2d-primitive-objects-with-c.html&#34;&gt;How To Draw 2D Primitive Objects on Windows Forms Application using C++ .NET&lt;/a&gt;), we&amp;rsquo;ve learned about how to draw some 2D objects on Form and Panel. That&amp;rsquo;s not difficult right? But now, in this post, we&amp;rsquo;ll learn about how to move that objects. Of course it&amp;rsquo;ll be very boring if that objects didn&amp;rsquo;t move. So, let&amp;rsquo;s get started! Don&amp;rsquo;t forget that I&amp;rsquo;m using Microsoft Visual Studio 2008 Professional Edition in this tutorial.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How To Draw 2D Primitive Objects with C&#43;&#43; .NET</title>
      <link>https://www.junian.dev/dev/cpp-dotnet-draw-2d-primitive/</link>
      <pubDate>Thu, 01 Dec 2016 20:47:00 +0000</pubDate>
      <author>author@junian.dev (Junian Triajianto)</author>
      <guid>https://www.junian.dev/dev/cpp-dotnet-draw-2d-primitive/</guid>
      <description>&lt;p&gt;First of all, I&amp;rsquo;d like to present my first tutorial about C++ / CLI CLR .NET Programming. This time it&amp;rsquo;s about Graphical User Interface in C++ .NET (in this case, I don&amp;rsquo;t want to use native C++). Okay, I assume that you have a little knowledge about C++ .NET GUI and of course, I also assume that you understand how to program in C++ CLR behaviour. So, here we go the tutorial!&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
