{"id":3951,"date":"2019-01-03T21:11:59","date_gmt":"2019-01-03T21:11:59","guid":{"rendered":"http:\/\/putridparrot.com\/blog\/?p=3951"},"modified":"2019-01-03T21:21:09","modified_gmt":"2019-01-03T21:21:09","slug":"deployment-our-xamarin-forms-app-to-android","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/deployment-our-xamarin-forms-app-to-android\/","title":{"rendered":"Preparing a Xamarin Forms app. for deployment to Android"},"content":{"rendered":"<p>So I&#8217;ve created a cross platform application using Xamarin Forms and Visual Studio 2017 and now I want to get it deployed on some devices &#8211; in this post I&#8217;m concentrating on Android devices. So let&#8217;s look at what we need to do to get this application deployed&#8230;<\/p>\n<p>I&#8217;m going to assume that the application version, icon, permission requirements and all those &#8220;standard&#8221; things have been implemented\/setup and concentrate on getting the application ready for deployment to our device(s).<\/p>\n<p><strong>Release build<\/strong><\/p>\n<p>Obviously, like any other application, we&#8217;ll want to minimize the size of our application and remove any debug centric code that might be wrapped in #if DEBUG etc.<\/p>\n<p>Select the Android project (ensure the build is set to Release), right mouse click and select properties and in Android Options ensure <em>Use Shared Runtime<\/em> and <em>Use Fast Deployment (debug model only)<\/em> are unchecked.<\/p>\n<p><strong>Archive and prepare for distribution<\/strong><\/p>\n<p>The process of bundling up an Android application is known as generating an archive. Right mouse click on the Android project in your solution and select <em>Archive<\/em>. Visual Studio will now go about archiving your application bundle.<\/p>\n<p>Now click the <em>Distribute<\/em> button where you&#8217;ll be able to target the application&#8217;s distribution channel. I have two options Ad Hoc and Google Play. I&#8217;m going to stick to Ad Hoc which allows me to use email, a web site etc. to distribute my application via side loading.<\/p>\n<p>We need to <a href=\"https:\/\/docs.microsoft.com\/en-gb\/xamarin\/android\/deploy-test\/signing\/index?tabs=windows\" rel=\"noopener\" target=\"_blank\">sign our application<\/a>, so if you&#8217;ve not yet got a keystore\/identity set-up you can just click the + button.<\/p>\n<p><em>Note: Even if you&#8217;re just creating a new keystore for each application you&#8217;ll need to make sure you remember your password as this will be required to complete the signing process.<\/em><\/p>\n<p>Fill in the options and then press Save As and you&#8217;ll be prompted for the keystore password. <\/p>\n<p>We have now created an APK which can be installed onto you Android device. In my case I&#8217;m using Microsoft&#8217;s AppCenter to allow specific users to access the application for testing.<\/p>\n<p><strong>References<\/strong><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-gb\/xamarin\/android\/deploy-test\/release-prep\/?tabs=windows\" rel=\"noopener\" target=\"_blank\">Preparing an Application for Release<\/a><br \/>\n<a href=\"https:\/\/docs.microsoft.com\/en-gb\/xamarin\/android\/deploy-test\/signing\/?tabs=windows\" rel=\"noopener\" target=\"_blank\">Signing the Android Application Package<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I&#8217;ve created a cross platform application using Xamarin Forms and Visual Studio 2017 and now I want to get it deployed on some devices &#8211; in this post I&#8217;m concentrating on Android devices. So let&#8217;s look at what we need to do to get this application deployed&#8230; I&#8217;m going to assume that the application [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[120,92],"tags":[],"class_list":["post-3951","post","type-post","status-publish","format-standard","hentry","category-android","category-xamarin"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/3951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=3951"}],"version-history":[{"count":5,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/3951\/revisions"}],"predecessor-version":[{"id":6691,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/3951\/revisions\/6691"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=3951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=3951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=3951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}