James Montemagno
James Montemagno

Live, Love, Bike, and Code.

Tags


James Montemagno

Android

Using Java SDK 11 on Xamarin Android Builds on Azure DevOps & GitHub Actions

Everything is building great in your CI/CD pipeline and then BOOM your build fails for no reason. You didn't change anything in your code!?!?! That was me this morning as I was updating my InAppBilling Plugin for .NET. I got hit with this beauty: error XA0031: Java SDK 11.0 or above is required when using $(TargetFrameworkVersion) v13.0 What is going on?!?!? Starting with Visual Studio 2022 17.8, which was just released, the Xamarin.Andriod tooling requires Java SDK 11.... but the default…

James Montemagno James Montemagno

Developing Android Apps on Windows Arm Devices

I have gone all in on Arm devices! My main MAC machine is a Mac Book Air M1 and now my main driver at work is a Windows Dev Kit 2023 (aka Project Volterra). One tricky thing for developers is getting all the software we use to work properly on Arm. Things have come a long way since the original release of Arm devices for Mac and Windows. I have a full setup guide for my M1 for Xamarin and now .NET MAUI development, but what about Windows? Visual Studio 2022 recently released a full native Arm v…

James Montemagno James Montemagno

Goodbye Android Emulators, the Windows Subsystem for Android is Here!

Android Emulators have been a pain in everyone's side for pretty much ever [https://docs.microsoft.com/xamarin/android/get-started/installation/android-emulator/?WT.mc_id=friends-0000-jamont] . Intel HAXM is great, but limited to Intel, then there were custom emulators like Xamarin Android Player and Genymotion, but required additional installs, and finally Hyper-V support, which brought with it AMD support, and side by side Docker support as well. But now, Windows 11 is here and so is a bra…

James Montemagno James Montemagno

Switching from Android to iPhone - 1 Month Later

Last month for my birthday I decided to make the big switch from Android to iPhone after being an Android exclusive user for nearly 11 years. My life has mostly been infused with Android/Google devices, which have included my long love of Android phones, Android TV, and Android based smart displays. For the last two years I have been rocking the Pixel 2 XL, which is been a solid device with an amazing camera. I have been waiting and waiting for Google to release something great in their main or…

James Montemagno James Montemagno

Shrink Your Android App Size with One Setting

When you are developing Android apps your app size can grow really fast.  We can get so caught up in the day to day that we forget how important it is to keep down the app size of our app. It may not seem like a 20MB APK is that much, but when you have limited internet or reception it can be a real pain. As an Android developer you have to develop for multiple ABIs, add a ton of resources and translations, and of course you have you have all of your source code and dependencies. You may have a…

James Montemagno James Montemagno

Setting Android Status Bar Background & Icon Colors

Over the past few months, I have been attempting to figure out the best ways to implement a light theme and dark theme in my Hanselman.Forms app. Working closely with my friend Kym Phillpotts [https://twitter.com/kphillpotts] we came up with a very nice theme changer for Xamarin.Forms, that allowed us to change all of the colors dynamically. The result is a very nice looking application that allows the users to pick their theme or use system defaults. One thing that bugged me in the original…

James Montemagno James Montemagno

Investing Time in the Xamarin Linker for Smaller App Sizes

When developing an app, 99% of our time goes into writing the code, testing the functionality, and making small UI tweaks to please our end users. Most of this is done in debug mode which optimizes compilation and app size for speed, which makes sense. When we flip that flag to Release with the default settings, we often pay very little attention as to what is happening to our app. We get a nice APK or IPA and ship it up to the app store and we are done. However, if we just spent a little time f…

James Montemagno James Montemagno

Azure DevOps Settings for Xamarin iOS 13 and Android 10 Apps

Settings up continuous integration can be tricky when there are new versions coming out. Recently Visual Studio 2019 updated to support Xcode 11, iOS 13, Android 10, .NET Core 3, and C# 8. What a whirlwind of new updates that CI servers got all around the same time! This means that as you were updating your apps your hosted machines also got updated and probably broke your builds :(. My good friend Jonathan Peppers wrote an amazing tool called Boots [https://devblogs.microsoft.com/xamarin/boots-…

James Montemagno James Montemagno