Monday, January 7, 2019

4th day with Xamarin

The 3rd day of Xamarin was spent configuring MVVM, Dependency Injection and a Dialog Service in the application. Also, I had a working application for both Android and iOS.

Now, that I have a working app I would like to set up CI/CD for my Android and iOS apps.

I am going to use AppCenter to build and distribute my app. Check out video "Continuous Integration With App Center Build for Xamarin Apps" on Microsoft Developers channel.

You can create a free account on AppCenter but, it will have some restrictions. However, If you are going to use it as an Individual then it should be enough for you.


If you follow the video you should be able to create a project for both Android and iOS project.

Once you create an app, there will be instructions for adding AppCenter analytics and crashes for the application. Follow the instructions for Xamarin.Forms, you would need to switch to the tab with heading Xamarin.Forms.

Once you do that you should be able to see the Analytics in the analytics section. If you run the app in Simulator, you will see something like this


Prepare Android Project For Release


Next, we need to Prepare the Android project for release. Follow the steps mentioned in Microsoft docs 'Preparing an Application for Release'

If you will follow the steps you should be able to prepare your application for release. However, I am going to explain a few things here for which I faced an issue or I think are missing in the document.

Application Icon


Different resolution of devices needs a different resolution of icons. I could not find any link for Android devices. Refer to the default icon in "Resources.mimap" folder to check the resolution of icons for different resolutions.

For iOS refer to the link "Application Icons for Xamarin.iOS".

Linker


Linker decided what assemblies/classes/methods are being and used and needs to be included in the package. Read the article 'Using The Linker in Xamarin Projects' to more knowledge about it.

Disable Debug in Release mode


You should not have to do anything. Because there will be code in the MainApplication.cs class in the core project to disable the debugging in the release mode.

Supported CPU Architectures


You might want to change the supported CPU architectures of the application as per your app requirement. You can see the list of supported CPU architectures after clicking Advance button in the Android Options project settings.



By Default single package is created for all the supported CPU architectures. If you select multiple CPU Architectures it is going to increase the size of the package. 

I would suggest reading the article on Generating One package per ABI. If you want to create a separate package for separate CPU architectures.

ProGuard


ProgGuard is Android SDK tool and you can read more about it in the Progaurd section. I did turn it On for my app but I faced multiple build issues and I guess, I would need a custom Proguard configuration file to clear all those warnings and errors. I might write a separate article for this If I need it in the future.

Signing


AppCenter will ask for uploading keystore file to sign the application. Follow steps in the article 'Create a new Certificate' to generate keystore file and upload it to AppCenter in the build steps.

Try to build the project in release mode in VS before starting to build on AppCenter. If you can successfully build it in VS you should be able to build it in AppCenter as well.


 If you have configured the build to be distributed to a group then, those Users will receive an email notification whenever a new build will be published. I have set up the distribution of app on 'master' branch. Now, whenever I will merge my code to master branch there will be a new version of the app available for all the test users.

Once it is distributed Users can login to 'HockeyApp' on Android and can see the app and can download it.



Now we have an end 2 end Continous Integration and Deeployment of app for test cycle. I would want to have automated deployment to Google Play store as well once we have the app in good condition.

I will cover iOS in separate article as that needs Apple Developer program enrollment to sign  the application.






Wednesday, January 2, 2019

3rd day with Xamarin

The second day with Xamarin was spent setting up the permissions and Azure build Pipeline to build the Android and iOS projects.

Today I am planning to do
  • MVVM in the app 
  • Setting up Dependency Injection 
  • Dialog Service

MVVM


MVVM is Model-View-ViewModel and you can read about it on Microsoft website Here. It is an application pattern that allows us to build de-coupled components. I would suggest reading through the article to get a better understanding of  MVVM components before reading ahead.

Monday, December 10, 2018

2nd day with Xamarin

The first day with Xamarin I able to create a new Xamarin app and integrated google maps and able to run it in the simulator.

If you read the previous post. I did make it work on the simulator using the Plugin.Permissions. However, when I ran the application in the simulator it did work but I did not see any messages requesting for access permissions.

So, I am going to try to run the app on the device and see what happens.

The device I am going to use is Moto X running Android version 6.0.1. I am not gonna bore you with how to setup the device as you may not be going to use the same device. Just the basic stuff you need

  • USB drivers for the device
  • A USB cable with data pins. Normal charging cables won't work.
  • Put the device in the debug mode.

Sunday, December 9, 2018

1st day with Xamarin

I started to create an app in Xamarin as I have been reading creating-mobile-apps-xamarin-forms by Microsoft. As a beginner, I can say that it has taught me well.

Today I thought to try and spin up a simple app using Xamarin Forms. Let's start from the start I will be putting up all the issues, bus, Environment Setup steps I had to do while doing it.

Let’s get started.

Few conventions

  • #: Issue faced and resolution

First I would suggest going through my friend Kael's blogs to get you started with the Android SDK setup. Few things which are important for Simulator.

Saturday, July 22, 2017

HTML 5 tutorials Part 4 - Introduction to HTML5

Initial 3 parts Part1Part 2 and Part 3 we talked about the basics of HTML. I know most of the developers usually know about this stuff but it is always to brush up the basics before talking about the new stuff.

From this part we will start more on HTML5. First question that come to mind is what are the problems that are being solved by HTML5?

What is HTML5?


HTML5 is combination of new html elements and lots of new JavaScript APIs. I know this not a definition you were expecting but in reality this is it. So do we really need to call it HTML5? I think we can just say HTML as there will be new development but I guess there won't be any HTML6. It will be called on HTML.

Problems solved by HTML5


SEO

Previous we use one tag mostly in the web page design, I guess you know it is div. So for search engine to identify different parts of the page is by scanning the ids. So we need to keep consistent ids across the web pages. How this is solved by HTML5?

HTML5 provide us different html tags like header, main, footer which are used to specify the header content, main content and footer content of the page. Which makes is easy for the search engines to find specific contents of the page. It provides semantics for the web pages.


Mobile Friendly


Billions of people are now using mobile device and we want to make sure that our web pages are more suitable for mobile. If you open up a web page on mobile than you get an option to make the web page mobile friendly and read in mobile mode. As soon as you click on this option the web page completely change the design as per the mobile form factor. So it is easy to develop the web page for vast variety of mobile form factors.

Multi Media


HTML5 provide tags which can be used to host the multi media content like music, video, graphs and games. Now developer can develop a full fledged  game only in HTML5 and supporting CSS3 and javascript. So we do not need to use Flash or Silverlight to show videos or animated stuff on web pages. 

we will discuss these features in details as we move along the tutorials. I am sure there are other many important things which can be done easily in HTML5. Please add these to comments to share with others.


So here is the basic structure of HTML5 page that you can see.