Animations are a great way to add polish to your user interface and make your app stand out. Xamarin.Forms includes its own animation infrastructure that allows for easy creation of simple animations, while also being versatile enough to create complex animations. The Xamarin.Forms animation classes target different properties of visual elements, with a typical animation […]
Gerald Versluis: Continuous integration/continuous delivery for your Xamarin app with VSTS and HockeyApp – Part Android
In addition to my previous posts about this subject, I got some reactions that it was iOS only!
And I can’t deny that. If you haven’t noticed by now, I’m an iOS guy and I’m proud of it! Nevertheless, one of the main advantages of Xamarin is that you can swing both ways (and even more than both!). So for most projects I try to at least support iOS and Android. Therefore, let me be complete and also explain how to setup your building and deployment pipeline for Android as well!
Spoiler alert; it isn’t much different from iOS.
Then what is the difference?
There are a few subtle differences throughout the whole process. Let’s start by looking at the build definition.
While the concept remains the same, the actual steps in you definition differ a little bit.
If you’ve read my other blog posts, you’ll notice two things: the flow is the same, but the actual build step for our App is a different one than for iOS.
You can identify it by the little Apple – and in this screen little Android – icon. All it means is that you have some other stuff you can configure. For iOS you need to configure stuff like provisioning profiles, etc. that is iOS specific. You don’t need that for Android, so you won’t see it back here. Something that you do configure here is the JDK version you want to use for compiling your app. Although Ive never had to configure anything about it.
Another this that is a bit different is the way you version your app. Although the means to do it stay the same.
Here we also use the build step available to us in VSTS. But for our Android app we need to do a regex search in the AndroidManifest.xml file. Again, Richard Woollcott did a far better post about that, so check that out for the details on this.
Also you’ll notice that the signing of our binary is a separate step for our Android app.
Also no rocket science here. If you’ve built an Android app before you know how to do this manually.
Just make sure you check in your keystore file in your repository and reference to it. Then put your password in and the rest will happen automagically!
This enables you to send your apk file over to HockeyApp or even the Google Play store!
Apple apps cannot be send directly to the App Store from 3rd party software, but with Android you actually can! The build task isn’t in VSTS by default, but you can download it from the Marketplace here.
Of course your Android app has to be tested as well, which can be done with the awesome Test Cloud! Actually this doesn’t have much differences with the iOS one apart from some configuration.
Make sure you have the Xamarin.Android build step in there (you can copy it from the build definition above!) and configure your Test Cloud build task a bit different. In this case you have to send over your apk file instead of the ipa, and your probably want some other devices in here as well.
Actually that is all that’s different! Well probably I’ve forgotten about some bits and pieces, but as you can take away from above is that it is all in the details. Replacing .ipa with .apk gets you a long way already.
Actually one more thing! Although your app feels like one app on different platforms, HockeyApp sees your same app on different platforms as two different apps. So if you want to distribute through there, make sure you create a separate app for that and connect the new App ID to your Android build definitions.
Good luck! If you have any questions, don’t hesitate to contact me!
Also if you all want to see this work live, my guest lecture on this will be on Xamarin University next Tuesday. You can sign up for it here (University account required).
Today, I do my best to run through tons of awesome examples of creating and consuming .NET Standard with Xamarin projects. I also give a brief overview of .NET Standard libraries and their compat with PCL projects.
Today, we are extremely pleased to release support for .NET Standard Libraries for all Xamarin applications. This includes creating and consuming local .NET Standard Libraries, but also adding .NET Standard Libraries from NuGet directly to your Xamarin apps. It’s now easier than ever to share code across all .NET platforms, including the recently introduced .NET […]
Be a part of all of the new and exciting events that are happening all over the world and in your neighborhood this month, including Xamarin Dev Days! Now is the perfect time to learn how you can build mobile apps for iOS, Android, and Windows in C# using Xamarin, which is now included in […]
Our goal is to empower every developer to build amazing mobile apps but when you do have questions, who better to learn from than your fellow developers? We all know Stack Overflow is one of a few great places to ask questions and sharpen our skills. With the release of the new Stack Overflow Documentation website, sharing your […]